Package org.apache.myfaces.resource
Class ResourceImpl
- java.lang.Object
-
- javax.faces.application.ViewResource
-
- javax.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 StringJAVAX_FACES_LIBRARY_NAMEprotected static StringJSF_JS_RESOURCE_NAME-
Fields inherited from class javax.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 StringgetContractName()InputStreamgetInputStream()protected longgetLastModified(FacesContext facesContext)StringgetRequestPath()protected ResourceHandlerSupportgetResourceHandlerSupport()ResourceLoadergetResourceLoader()protected ResourceMetagetResourceMeta()Map<String,String>getResponseHeaders()URLgetURL()booleanisContractResource()booleanuserAgentNeedsUpdate(FacesContext context)-
Methods inherited from class javax.faces.application.Resource
getContentType, getLibraryName, getResourceName, setContentType, setLibraryName, setResourceName, toString
-
-
-
-
Field Detail
-
JAVAX_FACES_LIBRARY_NAME
protected static final String JAVAX_FACES_LIBRARY_NAME
- See Also:
- Constant Field Values
-
JSF_JS_RESOURCE_NAME
protected static final String JSF_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:
getInputStreamin classResource- Throws:
IOException
-
getRequestPath
public String getRequestPath()
- Specified by:
getRequestPathin classResource
-
getResponseHeaders
public Map<String,String> getResponseHeaders()
- Specified by:
getResponseHeadersin classResource
-
userAgentNeedsUpdate
public boolean userAgentNeedsUpdate(FacesContext context)
- Specified by:
userAgentNeedsUpdatein classResource
-
getResourceHandlerSupport
protected ResourceHandlerSupport getResourceHandlerSupport()
-
getResourceMeta
protected ResourceMeta getResourceMeta()
-
isContractResource
public boolean isContractResource()
- Specified by:
isContractResourcein interfaceContractResource
-
getContractName
public String getContractName()
- Specified by:
getContractNamein interfaceContractResource
-
getLastModified
protected long getLastModified(FacesContext facesContext)
-
-