org.ajax4jsf.resource
Class UserResource
java.lang.Object
org.ajax4jsf.resource.InternetResourceBase
org.ajax4jsf.resource.UserResource
- All Implemented Interfaces:
- org.ajax4jsf.resource.InternetResource
public class UserResource
- extends InternetResourceBase
- Author:
- shura
Fields inherited from interface org.ajax4jsf.resource.InternetResource |
CODEC_ATTR, DATA_SEPARATOR, DEFAULT_EXPIRE, DEFAULT_EXPITE_PARAMETER, ENCODE_PASS_PARAMETER, ENCODE_URI_PARAMETER, RESOURCE_PROTOCOL, RESOURCE_URI_PREFIX, RESOURCE_URI_PREFIX_LENGTH |
Constructor Summary |
UserResource(boolean cacheable,
boolean session,
java.lang.String mime)
|
Method Summary |
java.lang.String |
getContentType(org.ajax4jsf.resource.ResourceContext resourceContext)
|
java.lang.Object |
getDataToStore(javax.faces.context.FacesContext context,
java.lang.Object data)
Template method to construct resource-specific data ( to store in
resource URI ). |
long |
getExpired(org.ajax4jsf.resource.ResourceContext resourceContext)
|
java.util.Date |
getLastModified(org.ajax4jsf.resource.ResourceContext resourceContext)
|
boolean |
requireFacesContext()
|
void |
send(org.ajax4jsf.resource.ResourceContext context)
|
void |
setContentType(java.lang.String contentType)
|
Methods inherited from class org.ajax4jsf.resource.InternetResourceBase |
deserializeData, encode, encode, encodeBegin, encodeEnd, getContentLength, getKey, getProperty, getRenderer, getResourceAsStream, getUri, isCacheable, isSessionAware, restoreData, sendHeaders, setCacheable, setContentLength, setExpired, setKey, setLastModified, setProperty, setRenderer, setSessionAware |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UserResource
public UserResource(boolean cacheable,
boolean session,
java.lang.String mime)
getContentType
public java.lang.String getContentType(org.ajax4jsf.resource.ResourceContext resourceContext)
- Specified by:
getContentType
in interface org.ajax4jsf.resource.InternetResource
- Overrides:
getContentType
in class InternetResourceBase
- Returns:
- Returns the contentType.
setContentType
public void setContentType(java.lang.String contentType)
- Parameters:
contentType
- The contentType to set.
getDataToStore
public java.lang.Object getDataToStore(javax.faces.context.FacesContext context,
java.lang.Object data)
- Description copied from class:
InternetResourceBase
- Template method to construct resource-specific data ( to store in
resource URI ). If resource must store any data in session or other
cache, it must be done here. Since lightweight realisation, information
for restore such data muct be returned by this method.
- Overrides:
getDataToStore
in class InternetResourceBase
- Parameters:
context
- -
current faces context.data
- -
data for build information, usually current
UIComponent
- Returns:
- - any
Serializable
object, or null.
send
public void send(org.ajax4jsf.resource.ResourceContext context)
throws java.io.IOException
- Specified by:
send
in interface org.ajax4jsf.resource.InternetResource
- Overrides:
send
in class InternetResourceBase
- Throws:
java.io.IOException
getLastModified
public java.util.Date getLastModified(org.ajax4jsf.resource.ResourceContext resourceContext)
- Specified by:
getLastModified
in interface org.ajax4jsf.resource.InternetResource
- Overrides:
getLastModified
in class InternetResourceBase
getExpired
public long getExpired(org.ajax4jsf.resource.ResourceContext resourceContext)
- Specified by:
getExpired
in interface org.ajax4jsf.resource.InternetResource
- Overrides:
getExpired
in class InternetResourceBase
requireFacesContext
public boolean requireFacesContext()
- Specified by:
requireFacesContext
in interface org.ajax4jsf.resource.InternetResource
- Overrides:
requireFacesContext
in class InternetResourceBase
Copyright © 2010. All Rights Reserved.