Package org.apache.myfaces.resource
Class ExternalContextContractResourceLoader
java.lang.Object
org.apache.myfaces.resource.ResourceLoader
org.apache.myfaces.resource.ContractResourceLoader
org.apache.myfaces.resource.ExternalContextContractResourceLoader
- Author:
- lu4242
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.myfaces.resource.ResourceLoader
ResourceLoader.VersionComparator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Pattern
It checks version like this: /1.js, /1_0.js, /1_0_0.js, /100_100.js Used on getResourceVersion to filter resourcesprotected static final Pattern
It checks version like this: /1/, /1_0/, /1_0_0/, /100_100/ Used on getLibraryVersion to filter resource directoriesFields inherited from class org.apache.myfaces.resource.ContractResourceLoader
VERSION_INVALID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateResourceMeta
(String prefix, String libraryName, String libraryVersion, String resourceName, String resourceVersion, String contractName) getLibraryVersion
(String path, String contractName) Return the max available version found (if exists) or return null if no version available.getResourceInputStream
(ResourceMeta resourceMeta) getResourcePaths
(String contractName, String path) getResourceURL
(ResourceMeta resourceMeta) Return the max available version found (if exists) or return null if no version available.getResourceVersion
(String path, String contractName) iterator
(FacesContext facesContext, String path, int maxDepth, ResourceVisitOption... options) boolean
libraryExists
(String libraryName, String contractName) Methods inherited from class org.apache.myfaces.resource.ContractResourceLoader
createResourceMeta, getLibraryVersion, getResourceVersion, libraryExists
Methods inherited from class org.apache.myfaces.resource.ResourceLoader
getPrefix, getVersionComparator, resourceExists, setPrefix, setVersionComparator
-
Field Details
-
VERSION_CHECKER
It checks version like this: /1/, /1_0/, /1_0_0/, /100_100/ Used on getLibraryVersion to filter resource directories -
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 Details
-
ExternalContextContractResourceLoader
-
-
Method Details
-
getResourcePaths
-
getResourceVersion
- Specified by:
getResourceVersion
in classContractResourceLoader
-
getLibraryVersion
Description copied from class:ContractResourceLoader
Return the max available version found (if exists) or return null if no version available.- Specified by:
getLibraryVersion
in classContractResourceLoader
-
getResourceURL
Description copied from class:ResourceLoader
Return the max available version found (if exists) or return null if no version available.- Specified by:
getResourceURL
in classResourceLoader
-
getResourceInputStream
- Specified by:
getResourceInputStream
in classResourceLoader
-
createResourceMeta
public ResourceMeta createResourceMeta(String prefix, String libraryName, String libraryVersion, String resourceName, String resourceVersion, String contractName) - Specified by:
createResourceMeta
in classContractResourceLoader
-
libraryExists
- Specified by:
libraryExists
in classContractResourceLoader
-
iterator
public Iterator<String> iterator(FacesContext facesContext, String path, int maxDepth, ResourceVisitOption... options) - Overrides:
iterator
in classResourceLoader
-