|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ajax4jsf.resource.ResourceContext
public abstract class ResourceContext
Abstraction context class for rendering resource ( image, script, style ) can be work in 2 variants - for simple ServletRequest and as JSF context encapsulation.
Constructor Summary | |
---|---|
ResourceContext()
|
Method Summary | |
---|---|
abstract java.lang.Object |
getContextAttribute(java.lang.String name)
Get ServletContext attribute by name. |
abstract java.lang.String |
getInitParameter(java.lang.String name)
|
abstract java.io.OutputStream |
getOutputStream()
|
abstract java.lang.String |
getPathInfo()
|
abstract java.lang.String |
getQueryString()
|
abstract java.lang.String |
getRequestParameter(java.lang.String data_parameter)
Get request parameter for given name. |
abstract java.net.URL |
getResource(java.lang.String path)
Return a URL for the application resource mapped to the
specified path, if it exists; otherwise, return null . |
abstract java.io.InputStream |
getResourceAsStream(java.lang.String path)
Return an InputStream for an application resource
mapped to the specified path, if it exists; otherwise, return
null . |
java.lang.Object |
getResourceData()
|
abstract java.util.Set<java.lang.String> |
getResourcePaths(java.lang.String path)
Return the Set of resource paths for all application
resources whose resource path starts with the specified argument. |
abstract java.lang.String |
getServletPath()
|
abstract java.lang.Object |
getSessionAttribute(java.lang.String name)
Get session attribute for given name. |
abstract java.io.PrintWriter |
getWriter()
get output writer for send response. |
boolean |
isCacheEnabled()
|
void |
release()
Release any data used by this context. |
void |
setCacheEnabled(boolean cacheEnabled)
|
abstract void |
setContentLength(int contentLength)
Setup response content length as ServletResponse.setContentLength(int) |
abstract void |
setContentType(java.lang.String contentType)
Setup response content type as ServletResponse.setContentType(java.lang.String) |
abstract void |
setDateHeader(java.lang.String name,
long value)
Delegate to ServletResponse setHeader |
abstract void |
setHeader(java.lang.String name,
java.lang.String value)
Delegate to ServletResponse setHeader |
abstract void |
setIntHeader(java.lang.String name,
int value)
Delegate to ServletResponse setHeader |
void |
setResourceData(java.lang.Object data)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceContext()
Method Detail |
---|
public abstract void setHeader(java.lang.String name, java.lang.String value)
ServletResponse
setHeader
name
- name of headervalue
- new valuepublic abstract void setIntHeader(java.lang.String name, int value)
ServletResponse
setHeader
name
- name of headervalue
- new valuepublic abstract void setDateHeader(java.lang.String name, long value)
ServletResponse
setHeader
name
- name of headervalue
- new valuepublic abstract java.io.OutputStream getOutputStream() throws java.io.IOException
java.io.IOException
public abstract java.lang.String getQueryString()
public abstract java.lang.String getPathInfo()
public abstract java.lang.String getServletPath()
public abstract java.lang.Object getSessionAttribute(java.lang.String name)
name
- attribute name
public abstract java.lang.Object getContextAttribute(java.lang.String name)
name
-
public abstract java.net.URL getResource(java.lang.String path) throws java.net.MalformedURLException
Return a URL
for the application resource mapped to the
specified path, if it exists; otherwise, return null
.
Servlet: This must be the value returned by the
javax.servlet.ServletContext
method
getResource(path)
.
Portlet: This must be the value returned by the
javax.portlet.PortletContext
method
getResource(path)
.
path
- The path to the requested resource, which must
start with a slash ("/" character
java.net.MalformedURLException
- if the specified path
is not in the correct form
java.lang.NullPointerException
- if path
is null
public abstract java.io.InputStream getResourceAsStream(java.lang.String path)
Return an InputStream
for an application resource
mapped to the specified path, if it exists; otherwise, return
null
.
Servlet: This must be the value returned by the
javax.servlet.ServletContext
method
getResourceAsStream(path)
.
Portlet: This must be the value returned by the
javax.portlet.PortletContext
method
getResourceAsStream(path)
.
path
- The path to the requested resource, which must
start with a slash ("/" character
java.lang.NullPointerException
- if path
is null
public abstract java.util.Set<java.lang.String> getResourcePaths(java.lang.String path)
Return the Set
of resource paths for all application
resources whose resource path starts with the specified argument.
Servlet: This must be the value returned by the
javax.servlet.ServletContext
method
getResourcePaths(path).
Portlet: This must be the value returned by the
javax.portlet.PortletContext
method
getResourcePaths(path).
path
- Partial path used to match resources, which must
start with a slash ("/") character
java.lang.NullPointerException
- if path
is null
public abstract java.lang.String getRequestParameter(java.lang.String data_parameter)
data_parameter
-
public boolean isCacheEnabled()
public void setCacheEnabled(boolean cacheEnabled)
cacheEnabled
- The cacheEnabled to set.public abstract java.io.PrintWriter getWriter() throws java.io.IOException
java.io.IOException
public abstract void setContentType(java.lang.String contentType)
ServletResponse.setContentType(java.lang.String)
contentType
- public abstract void setContentLength(int contentLength)
ServletResponse.setContentLength(int)
contentLength
- public abstract java.lang.String getInitParameter(java.lang.String name)
public java.lang.Object getResourceData()
public void setResourceData(java.lang.Object data)
public void release()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |