java.lang.Object
jakarta.faces.application.ViewResource
jakarta.faces.application.Resource
jakarta.faces.application.ResourceWrapper
org.omnifaces.resourcehandler.RemappedResource
- All Implemented Interfaces:
FacesWrapper<Resource>,Externalizable,Serializable
- Direct Known Subclasses:
CDNResource
This
Resource implementation remaps the given resource to the given request path.- Since:
- 2.1
- Author:
- Bauke Scholtz
- See Also:
-
Field Summary
Fields inherited from class jakarta.faces.application.Resource
COMPONENT_RESOURCE_KEY -
Constructor Summary
ConstructorsConstructorDescriptionDo not use this constructor.RemappedResource(Resource resource, String requestPath) Constructs a new resource which remaps the given wrapped resource to the given request path.RemappedResource(String resourceName, String libraryName, String requestPath) Constructs a new resource which remaps the given requested resource and library name to the given request path. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetURL()inthashCode()voidreadExternal(ObjectInput input) voidsetLibraryName(String libraryName) voidsetResourceName(String resourceName) booleanuserAgentNeedsUpdate(FacesContext context) voidwriteExternal(ObjectOutput output) Methods inherited from class jakarta.faces.application.ResourceWrapper
setContentType
-
Constructor Details
-
RemappedResource
public RemappedResource()Do not use this constructor. It's merely there forExternalizable. -
RemappedResource
Constructs a new resource which remaps the given wrapped resource to the given request path.- Parameters:
resource- The resource to be remapped.requestPath- The remapped request path.
-
RemappedResource
Constructs a new resource which remaps the given requested resource and library name to the given request path.- Parameters:
resourceName- The requested resource name.libraryName- The requested library name.requestPath- The remapped request path.
-
-
Method Details
-
getWrapped
- Specified by:
getWrappedin interfaceFacesWrapper<Resource>- Overrides:
getWrappedin classResourceWrapper
-
getResourceName
- Overrides:
getResourceNamein classResourceWrapper
-
setResourceName
- Overrides:
setResourceNamein classResourceWrapper
-
getLibraryName
- Overrides:
getLibraryNamein classResourceWrapper
-
setLibraryName
- Overrides:
setLibraryNamein classResourceWrapper
-
getContentType
- Overrides:
getContentTypein classResourceWrapper
-
getRequestPath
- Overrides:
getRequestPathin classResourceWrapper
-
getInputStream
- Overrides:
getInputStreamin classResourceWrapper- Throws:
IOException
-
getResponseHeaders
- Overrides:
getResponseHeadersin classResourceWrapper
-
getURL
- Overrides:
getURLin classResourceWrapper
-
userAgentNeedsUpdate
- Overrides:
userAgentNeedsUpdatein classResourceWrapper
-
equals
-
hashCode
public int hashCode() -
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-