private void updateSkinMappingUsingTypeLocaleSkin ( 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 defaultLocaleDir = PathNormalizer . asDirPath ( itRootDir . next ( ) ) ; String defaultLocaleDirName = PathNormalizer . getPathName ( defaultLocaleDir ) ; String localeRootDir = PathNormalizer . getParentPath ( defaultLocaleDir ) ; String skinName = null ; String localeName = null ; if ( ! LocaleUtils . LOCALE_SUFFIXES . contains ( defaultLocaleDirName ) ) { // The // rootDir // point // to // a // skin // directory skinName = defaultLocaleDirName ; localeName = PathNormalizer . getPathName ( localeRootDir ) ; localeRootDir = PathNormalizer . getParentPath ( localeRootDir ) ; } else { localeName = defaultLocaleDirName ; } 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 ( defaultLocaleDir , skinRootDirectories ) ; Map < String , VariantSet > variantsMap = getVariants ( rsBrowser , localeRootDir , skinName , localeName , false ) ; skinMapping . put ( localeRootDir , variantsMap ) ; } CssSkinVariantResolver skinResolver = ( CssSkinVariantResolver ) config . getGeneratorRegistry ( ) . getVariantResolver ( JawrConstant . SKIN_VARIANT_TYPE ) ; if ( skinResolver == null ) { skinResolver = new CssSkinVariantResolver ( defaultSkinName , config . getSkinCookieName ( ) ) ; config . getGeneratorRegistry ( ) . registerVariantResolver ( skinResolver ) ; } else { skinResolver . setDefaultSkin ( defaultSkinName ) ; skinResolver . setSkinCookieName ( config . getSkinCookieName ( ) ) ; } }
Returns the skin mapping from the Jawr config here the resource mapping type is locale_skin