java.lang.Object
org.omnifaces.resourcehandler.ResourceIdentifier
Convenience class to represent a resource identifier.
- Since:
- 1.3
- Author:
- Bauke Scholtz
-
Constructor Summary
ConstructorsConstructorDescriptionResourceIdentifier(Resource resource) Create a new instance based on given resource.ResourceIdentifier(UIComponent componentResource) Create a new instance based on library and name attributes of the given component resource.ResourceIdentifier(String resourceIdentifier) Create a new instance based on given standard Faces resource identifier string formatlibrary:name.ResourceIdentifier(String library, String name) Create a new instance based on given resource library and name. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetIntegrity(FacesContext context) Returns the resource integrity as base64 encoded sha384 hash.Returns the resource library.getName()Returns the resource name.inthashCode()toString()Returns the resource identifier as string in standard Faces resource identifier formatlibrary:name.
-
Constructor Details
-
ResourceIdentifier
Create a new instance based on given standard Faces resource identifier string formatlibrary:name.- Parameters:
resourceIdentifier- The standard Faces resource identifier.
-
ResourceIdentifier
Create a new instance based on library and name attributes of the given component resource.- Parameters:
componentResource- The component resource.
-
ResourceIdentifier
Create a new instance based on given resource library and name.- Parameters:
library- The resource lirbary.name- The resource name.
-
ResourceIdentifier
Create a new instance based on given resource.- Parameters:
resource- The resource.- Since:
- 3.13
-
-
Method Details
-
getLibrary
Returns the resource library.- Returns:
- The resource library.
-
getName
Returns the resource name.- Returns:
- The resource name.
-
getIntegrity
Returns the resource integrity as base64 encoded sha384 hash. This is lazily computed and will return an empty string when the integrity could not be computed. The reason for the compute failure will be logged as WARNING.- Returns:
- The resource integrity as base64 encoded sha384 hash.
- Since:
- 3.13
-
equals
-
hashCode
public int hashCode() -
toString
Returns the resource identifier as string in standard Faces resource identifier formatlibrary:name. If there is no library, then only the name is returned without the colon separator like soname.
-