Package org.apache.myfaces.resource
Class ResourceImpl
- java.lang.Object
-
- jakarta.faces.application.ViewResource
-
- jakarta.faces.application.Resource
-
- org.apache.myfaces.resource.ResourceImpl
-
- All Implemented Interfaces:
ContractResource
public class ResourceImpl extends Resource implements ContractResource
Default implementation for resources
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
FACES_JS_RESOURCE_NAME
protected static String
JAKARTA_FACES_LIBRARY_NAME
-
Fields inherited from class jakarta.faces.application.Resource
COMPONENT_RESOURCE_KEY
-
Fields inherited from interface org.apache.myfaces.resource.ContractResource
CONTRACT_SELECTED
-
-
Constructor Summary
Constructors Constructor Description ResourceImpl(ResourceMeta resourceMeta, ResourceLoader resourceLoader, ResourceHandlerSupport support, String contentType)
ResourceImpl(ResourceMeta resourceMeta, ResourceLoader resourceLoader, ResourceHandlerSupport support, String contentType, URL url, String requestPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContractName()
InputStream
getInputStream()
protected long
getLastModified(FacesContext facesContext)
String
getRequestPath()
protected ResourceHandlerSupport
getResourceHandlerSupport()
ResourceLoader
getResourceLoader()
protected ResourceMeta
getResourceMeta()
Map<String,String>
getResponseHeaders()
URL
getURL()
boolean
isContractResource()
boolean
userAgentNeedsUpdate(FacesContext context)
-
Methods inherited from class jakarta.faces.application.Resource
getContentType, getLibraryName, getResourceName, setContentType, setLibraryName, setResourceName, toString
-
-
-
-
Field Detail
-
JAKARTA_FACES_LIBRARY_NAME
protected static final String JAKARTA_FACES_LIBRARY_NAME
- See Also:
- Constant Field Values
-
FACES_JS_RESOURCE_NAME
protected static final String FACES_JS_RESOURCE_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ResourceImpl
public ResourceImpl(ResourceMeta resourceMeta, ResourceLoader resourceLoader, ResourceHandlerSupport support, String contentType)
-
ResourceImpl
public ResourceImpl(ResourceMeta resourceMeta, ResourceLoader resourceLoader, ResourceHandlerSupport support, String contentType, URL url, String requestPath)
-
-
Method Detail
-
getResourceLoader
public ResourceLoader getResourceLoader()
-
getInputStream
public InputStream getInputStream() throws IOException
- Specified by:
getInputStream
in classResource
- Throws:
IOException
-
getRequestPath
public String getRequestPath()
- Specified by:
getRequestPath
in classResource
-
getResponseHeaders
public Map<String,String> getResponseHeaders()
- Specified by:
getResponseHeaders
in classResource
-
userAgentNeedsUpdate
public boolean userAgentNeedsUpdate(FacesContext context)
- Specified by:
userAgentNeedsUpdate
in classResource
-
getResourceHandlerSupport
protected ResourceHandlerSupport getResourceHandlerSupport()
-
getResourceMeta
protected ResourceMeta getResourceMeta()
-
isContractResource
public boolean isContractResource()
- Specified by:
isContractResource
in interfaceContractResource
-
getContractName
public String getContractName()
- Specified by:
getContractName
in interfaceContractResource
-
getLastModified
protected long getLastModified(FacesContext facesContext)
-
-