public static void saveApplicationBindings ( Application app ) { File descDir = new File ( app . getDirectory ( ) , Constants . PROJECT_DIR_DESC ) ; File appBindingsFile = new File ( descDir , APP_BINDINGS_FILE ) ; // Convert the bindings map Map < String , String > format = new HashMap <> ( ) ; for ( Map . Entry < String , Set < String > > entry : app . getApplicationBindings ( ) . entrySet ( ) ) { String s = Utils . format ( entry . getValue ( ) , ", " ) ; format . put ( entry . getKey ( ) , s ) ; } // Save it Properties props = new Properties ( ) ; props . putAll ( format ) ; try { Utils . createDirectory ( descDir ) ; Utils . writePropertiesFile ( props , appBindingsFile ) ; } catch ( IOException e ) { Logger logger = Logger . getLogger ( ConfigurationUtils . class . getName ( ) ) ; logger . severe ( "Failed to save application bindings for " + app + ". " + e . getMessage ( ) ) ; Utils . logException ( logger , e ) ; } }
Saves the application bindings into the DM s directory .