java.lang.Object
com.sun.faces.application.resource.ResourceManager
This class is used to lookup 
ResourceInfo instances and cache any that are successfully looked up to reduce
 the computational overhead with the scanning/version checking.- Since:
- 2.0
- 
Constructor SummaryConstructorsConstructorDescriptionResourceManager(ResourceCache cache) ResourceManager(Map<String, Object> appMap, ResourceCache cache) Constructs a newResourceManager.
- 
Method SummaryModifier and TypeMethodDescriptionfindResource(String libraryName, String resourceName, String contentType, boolean isViewResource, FacesContext ctx) findResource(String libraryName, String resourceName, String contentType, FacesContext ctx) findViewResource(String resourceName, String contentType, FacesContext facesContext) getViewResources(FacesContext facesContext, String path, int maxDepth, ResourceVisitOption... options) booleanisContractsResource(String path) 
- 
Constructor Details- 
ResourceManager
- 
ResourceManagerConstructs a newResourceManager. Note: if the currentProjectStageisProjectStage.Developmentcaching orResourceInfoinstances will not occur.- Parameters:
- appMap- the application map
- cache- the resource cache
 
 
- 
- 
Method Details- 
findResourcepublic ResourceInfo findResource(String libraryName, String resourceName, String contentType, FacesContext ctx) Attempt to lookup a ResourceInfobased on the specifiedlibraryNameandresourceNameImplementation Note: Synchronization is necessary when looking up compressed resources. This ensures the atomicity of the content being compressed. As such, the cost of doing this is low as once the resource is in the cache, the lookup won't be performed again until the cache is cleared. That said, it's not a good idea to have caching disabled in a production environment if leveraging compression. If the resource isn't compressable, then we don't worry about creating a few extra copies of ResourceInfo until the cache is populated. - Parameters:
- libraryName- the name of the library (if any)
- resourceName- the name of the resource
- contentType- the content type of the resource. This will be used to determine if the resource is compressable
- ctx- the- FacesContextfor the current request
- Returns:
- a ResourceInfoif a resource if found matching the provided arguments, otherwise, returnnull
 
- 
findViewResourcepublic ResourceInfo findViewResource(String resourceName, String contentType, FacesContext facesContext) 
- 
findResourcepublic ResourceInfo findResource(String libraryName, String resourceName, String contentType, boolean isViewResource, FacesContext ctx) 
- 
getViewResourcespublic Stream<String> getViewResources(FacesContext facesContext, String path, int maxDepth, ResourceVisitOption... options) 
- 
getBaseContractsPath
- 
isContractsResource
 
-