private void storeJawrBundleMapping ( boolean mappingFileExists , boolean force ) { if ( config . getUseBundleMapping ( ) && ( ! mappingFileExists || force ) ) { bundleMapping . setProperty ( JawrConstant . JAWR_CONFIG_HASHCODE , getJawrConfigHashcode ( ) ) ; resourceBundleHandler . storeJawrBundleMapping ( bundleMapping ) ; if ( resourceBundleHandler . getResourceType ( ) . equals ( JawrConstant . CSS_TYPE ) ) { // Retrieve the image servlet mapping BinaryResourcesHandler binaryRsHandler = ( BinaryResourcesHandler ) config . getContext ( ) . getAttribute ( JawrConstant . BINARY_CONTEXT_ATTRIBUTE ) ; if ( binaryRsHandler != null ) { // Here we update the image mapping if we are using the // build time bundle processor JawrConfig binaryJawrConfig = binaryRsHandler . getConfig ( ) ; // If we use the full image bundle mapping and the jawr // working directory is not located inside the web // application // We store the image bundle maping which now contains the // mapping for CSS images String jawrWorkingDirectory = binaryJawrConfig . getJawrWorkingDirectory ( ) ; if ( binaryJawrConfig . getUseBundleMapping ( ) && ( jawrWorkingDirectory == null || ! jawrWorkingDirectory . startsWith ( JawrConstant . URL_SEPARATOR ) ) ) { // Store the bundle mapping Properties props = new Properties ( ) ; props . putAll ( binaryRsHandler . getBinaryPathMap ( ) ) ; props . setProperty ( JawrConstant . JAWR_CONFIG_HASHCODE , Integer . toString ( binaryJawrConfig . getConfigProperties ( ) . hashCode ( ) ) ) ; binaryRsHandler . getRsBundleHandler ( ) . storeJawrBundleMapping ( props ) ; } } } } }
Stores the Jawr bundle mapping