Package org.apache.myfaces.resource
Class ExternalContextResourceLoader
- java.lang.Object
- 
- org.apache.myfaces.resource.ResourceLoader
- 
- org.apache.myfaces.resource.ExternalContextResourceLoader
 
 
- 
 public class ExternalContextResourceLoader extends ResourceLoader A resource loader implementation which loads resources from the webapp root. It uses the methods on ExternalContext for handle resources.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.apache.myfaces.resource.ResourceLoaderResourceLoader.VersionComparator
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected static PatternRESOURCE_VERSION_CHECKERIt checks version like this: /1.js, /1_0.js, /1_0_0.js, /100_100.js Used on getResourceVersion to filter resourcesprotected static PatternVERSION_CHECKERIt checks version like this: /1/, /1_0/, /1_0_0/, /100_100/ Used on getLibraryVersion to filter resource directories- 
Fields inherited from class org.apache.myfaces.resource.ResourceLoaderVERSION_INVALID
 
- 
 - 
Constructor SummaryConstructors Constructor Description ExternalContextResourceLoader(String prefix)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceMetacreateResourceMeta(String prefix, String libraryName, String libraryVersion, String resourceName, String resourceVersion)StringgetLibraryVersion(String path)Return the max available version found (if exists) or return null if no version available.InputStreamgetResourceInputStream(ResourceMeta resourceMeta)protected Set<String>getResourcePaths(String path)URLgetResourceURL(String resourceId)URLgetResourceURL(ResourceMeta resourceMeta)Return the max available version found (if exists) or return null if no version available.StringgetResourceVersion(String path)Iterator<String>iterator(FacesContext facesContext, String path, int maxDepth, ResourceVisitOption... options)booleanlibraryExists(String libraryName)- 
Methods inherited from class org.apache.myfaces.resource.ResourceLoadercreateResourceMeta, getPrefix, getVersionComparator, resourceExists, setPrefix, setVersionComparator
 
- 
 
- 
- 
- 
Field Detail- 
VERSION_CHECKERprotected static final Pattern VERSION_CHECKER It checks version like this: /1/, /1_0/, /1_0_0/, /100_100/ Used on getLibraryVersion to filter resource directories
 - 
RESOURCE_VERSION_CHECKERprotected static final Pattern RESOURCE_VERSION_CHECKER It checks version like this: /1.js, /1_0.js, /1_0_0.js, /100_100.js Used on getResourceVersion to filter resources
 
- 
 - 
Constructor Detail- 
ExternalContextResourceLoaderpublic ExternalContextResourceLoader(String prefix) 
 
- 
 - 
Method Detail- 
getResourceVersionpublic String getResourceVersion(String path) - Specified by:
- getResourceVersionin class- ResourceLoader
 
 - 
getLibraryVersionpublic String getLibraryVersion(String path) Description copied from class:ResourceLoaderReturn the max available version found (if exists) or return null if no version available.- Specified by:
- getLibraryVersionin class- ResourceLoader
 
 - 
getResourceURLpublic URL getResourceURL(ResourceMeta resourceMeta) Description copied from class:ResourceLoaderReturn the max available version found (if exists) or return null if no version available.- Specified by:
- getResourceURLin class- ResourceLoader
 
 - 
getResourceInputStreampublic InputStream getResourceInputStream(ResourceMeta resourceMeta) - Specified by:
- getResourceInputStreamin class- ResourceLoader
 
 - 
createResourceMetapublic ResourceMeta createResourceMeta(String prefix, String libraryName, String libraryVersion, String resourceName, String resourceVersion) - Specified by:
- createResourceMetain class- ResourceLoader
 
 - 
libraryExistspublic boolean libraryExists(String libraryName) - Specified by:
- libraryExistsin class- ResourceLoader
 
 - 
iteratorpublic Iterator<String> iterator(FacesContext facesContext, String path, int maxDepth, ResourceVisitOption... options) - Overrides:
- iteratorin class- ResourceLoader
 
 
- 
 
-