protected List < FilePathMapping > getFileMappings ( String path , GeneratorContext context , List < Locale > locales ) { List < FilePathMapping > fMappings = new ArrayList <> ( ) ; String fileSuffix = PROPERTIES_FILE_SUFFIX ; String [ ] names = path . split ( RESOURCE_BUNDLE_SEPARATOR ) ; for ( String resourcePath : names ) { resourcePath = resourcePath . replace ( ' ' , JawrConstant . URL_SEPARATOR_CHAR ) ; for ( Locale locale : locales ) { String resourceBundlePath = control . toBundleName ( resourcePath , locale ) + fileSuffix ; URL rbURL = LocaleUtils . getResourceBundleURL ( resourceBundlePath , context . getServletContext ( ) ) ; if ( rbURL != null ) { File f = FileUtils . urlToFile ( rbURL ) ; String fileName = f . getAbsolutePath ( ) ; if ( StringUtils . isNotEmpty ( fileName ) ) { long lastModified = rsHandler . getLastModified ( fileName ) ; FilePathMapping fMapping = new FilePathMapping ( fileName , lastModified ) ; fMappings . add ( fMapping ) ; } } } } return fMappings ; }
Returns the list of file path mapping associate to the resource bundles locales