Package org.apache.myfaces.resource
Class RootExternalContextResourceLoader
- java.lang.Object
-
- org.apache.myfaces.resource.ResourceLoader
-
- org.apache.myfaces.resource.RootExternalContextResourceLoader
-
public class RootExternalContextResourceLoader 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.ResourceLoader
ResourceLoader.VersionComparator
-
-
Field Summary
-
Fields inherited from class org.apache.myfaces.resource.ResourceLoader
VERSION_INVALID
-
-
Constructor Summary
Constructors Constructor Description RootExternalContextResourceLoader()
-
Method Summary
All 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.ResourceLoader
createResourceMeta, getPrefix, getVersionComparator, resourceExists, setPrefix, setVersionComparator
-
-
-
-
Method Detail
-
getResourceVersion
public String getResourceVersion(String path)
- Specified by:
getResourceVersionin classResourceLoader
-
getLibraryVersion
public 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 classResourceLoader
-
getResourceURL
public 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 classResourceLoader
-
getResourceInputStream
public InputStream getResourceInputStream(ResourceMeta resourceMeta)
- Specified by:
getResourceInputStreamin classResourceLoader
-
createResourceMeta
public ResourceMeta createResourceMeta(String prefix, String libraryName, String libraryVersion, String resourceName, String resourceVersion)
- Specified by:
createResourceMetain classResourceLoader
-
libraryExists
public boolean libraryExists(String libraryName)
- Specified by:
libraryExistsin classResourceLoader
-
iterator
public Iterator<String> iterator(FacesContext facesContext, String path, int maxDepth, ResourceVisitOption... options)
- Overrides:
iteratorin classResourceLoader
-
-