- 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
public class RemappedResource extends ResourceWrapper implements Externalizable
ThisResourceimplementation remaps the given resource to the given request path.- Since:
 - 2.1
 - Author:
 - Bauke Scholtz
 - See Also:
 - Serialized Form
 
 
- 
- 
Field Summary
- 
Fields inherited from class jakarta.faces.application.Resource
COMPONENT_RESOURCE_KEY 
 - 
 
- 
Constructor Summary
Constructors Constructor Description RemappedResource()Do 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)StringgetContentType()InputStreamgetInputStream()StringgetLibraryName()StringgetRequestPath()StringgetResourceName()Map<String,String>getResponseHeaders()URLgetURL()ResourcegetWrapped()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 Detail
- 
RemappedResource
public RemappedResource()
Do not use this constructor. It's merely there forExternalizable. 
- 
RemappedResource
public RemappedResource(Resource resource, String requestPath)
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
public 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.- Parameters:
 resourceName- The requested resource name.libraryName- The requested library name.requestPath- The remapped request path.
 
 - 
 
- 
Method Detail
- 
getWrapped
public Resource getWrapped()
- Specified by:
 getWrappedin interfaceFacesWrapper<Resource>- Overrides:
 getWrappedin classResourceWrapper
 
- 
getResourceName
public String getResourceName()
- Overrides:
 getResourceNamein classResourceWrapper
 
- 
setResourceName
public void setResourceName(String resourceName)
- Overrides:
 setResourceNamein classResourceWrapper
 
- 
getLibraryName
public String getLibraryName()
- Overrides:
 getLibraryNamein classResourceWrapper
 
- 
setLibraryName
public void setLibraryName(String libraryName)
- Overrides:
 setLibraryNamein classResourceWrapper
 
- 
getContentType
public String getContentType()
- Overrides:
 getContentTypein classResourceWrapper
 
- 
getRequestPath
public String getRequestPath()
- Overrides:
 getRequestPathin classResourceWrapper
 
- 
getInputStream
public InputStream getInputStream() throws IOException
- Overrides:
 getInputStreamin classResourceWrapper- Throws:
 IOException
 
- 
getResponseHeaders
public Map<String,String> getResponseHeaders()
- Overrides:
 getResponseHeadersin classResourceWrapper
 
- 
getURL
public URL getURL()
- Overrides:
 getURLin classResourceWrapper
 
- 
userAgentNeedsUpdate
public boolean userAgentNeedsUpdate(FacesContext context)
- Overrides:
 userAgentNeedsUpdatein classResourceWrapper
 
- 
readExternal
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
- Specified by:
 readExternalin interfaceExternalizable- Throws:
 IOExceptionClassNotFoundException
 
- 
writeExternal
public void writeExternal(ObjectOutput output) throws IOException
- Specified by:
 writeExternalin interfaceExternalizable- Throws:
 IOException
 
 - 
 
 -