private void updateSkinMappingUsingTypeSkinLocale ( ResourceBrowser rsBrowser , JawrConfig config , Map < String , Map < String , VariantSet > > skinMapping , Set < String > skinRootDirectories ) { String defaultSkinName = null ; String defaultLocaleName = null ; // Check if there are no directory which is contained in another root // directory for ( Iterator < String > itRootDir = skinRootDirectories . iterator ( ) ; itRootDir . hasNext ( ) ; ) { String defaultSkinDir = PathNormalizer . asDirPath ( itRootDir . next ( ) ) ; String defaultSkinDirName = PathNormalizer . getPathName ( defaultSkinDir ) ; String skinRootDir = PathNormalizer . getParentPath ( defaultSkinDir ) ; String skinName = null ; String localeName = null ; if ( LocaleUtils . LOCALE_SUFFIXES . contains ( defaultSkinDirName ) ) { // The // rootDir // point // to // a // locale // directory localeName = defaultSkinDirName ; skinName = PathNormalizer . getPathName ( skinRootDir ) ; skinRootDir = PathNormalizer . getParentPath ( skinRootDir ) ; } else { skinName = defaultSkinDirName ; } if ( defaultSkinName == null ) { defaultSkinName = skinName ; } else if ( ! defaultSkinName . equals ( skinName ) ) { throw new BundlingProcessException ( "The default skin for the skin root directories are not the same. Please check your configuration." ) ; } if ( defaultLocaleName == null ) { defaultLocaleName = localeName ; } else if ( ! defaultLocaleName . equals ( localeName ) ) { throw new BundlingProcessException ( "The default locale for the skin root directories are not the same. Please check your configuration." ) ; } checkRootDirectoryNotOverlap ( defaultSkinDir , skinRootDirectories ) ; Map < String , VariantSet > variantsMap = getVariants ( rsBrowser , skinRootDir , skinName , localeName , true ) ; skinMapping . put ( skinRootDir , variantsMap ) ; } // Init resolver cssSkinResolver . setDefaultSkin ( defaultSkinName ) ; cssSkinResolver . setSkinCookieName ( config . getSkinCookieName ( ) ) ; }
Returns the skin mapping from the Jawr config here the resource mapping type is skin_locale