| org.apache.cocoon.environment.AbstractEnvironment org.apache.cocoon.environment.portlet.PortletEnvironment
Constructor Summary | |
public | PortletEnvironment(String servletPath, String pathInfo, String uri, String root, javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, PortletContext portletContext, Context context, String containerEncoding, String defaultFormEncoding, int defaultSessionScope) | public | PortletEnvironment(String servletPath, String pathInfo, String uri, String root, javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, PortletContext portletContext, Context context, String containerEncoding, String defaultFormEncoding, int defaultSessionScope) |
Method Summary | |
public String | getContentType() | int | getDefaultSessionScope() Default scope for the session attributes, either
javax.portlet.PortletSession.PORTLET_SCOPE or
javax.portlet.PortletSession.APPLICATION_SCOPE . | public OutputStream | getOutputStream(int bufferSize) Get the output stream where to write the generated resource.
The returned stream is buffered by the environment. | public boolean | hasRedirected() | public boolean | isExternal() Always return true . | public boolean | isResponseModified(long lastModified) This method always returns true because portlet environment
does not support response codes. | public void | permanentRedirect(boolean sessionmode, String newURL) | public void | redirect(boolean sessionmode, String newURL) | public void | sendStatus(int sc) Portlet environment does not support response status code. | public void | setContentLength(int length) Portlet environment does not support response content length. | public void | setContentType(String contentType) | public void | setResponseIsNotModified() Portlet environment does not support response status code. | public void | setStatus(int statusCode) Portlet environment does not support response status code. | public boolean | tryResetResponse() Reset the response if possible. |
HEADER_PORTLET_MODE | final public static String HEADER_PORTLET_MODE(Code) | | This header can be read from any portlet request,
and can be set on action response.
|
HEADER_PORTLET_TITLE | final public static String HEADER_PORTLET_TITLE(Code) | | This header can be set only, and only on render response.
|
HEADER_WINDOW_STATE | final public static String HEADER_WINDOW_STATE(Code) | | This header can be read from any portlet request,
and can be set on action response.
|
PARAMETER_PATH_INFO | final public static String PARAMETER_PATH_INFO(Code) | | As portlets do not have a pathInfo in the request, we can simulate this by passing
a parameter. If parameter is null, this will translate to the absent pathInfo,
and portlets will be matched in the sitemap using only servletPath.
|
SESSION_APPLICATION_SCOPE | final public static String SESSION_APPLICATION_SCOPE(Code) | | This is the prefix for application scope session attributes.
|
SESSION_PORTLET_SCOPE | final public static String SESSION_PORTLET_SCOPE(Code) | | This is the prefix for portlet scope session attributes.
|
PortletEnvironment | public PortletEnvironment(String servletPath, String pathInfo, String uri, String root, javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, PortletContext portletContext, Context context, String containerEncoding, String defaultFormEncoding, int defaultSessionScope) throws IOException(Code) | | Constructs a PortletEnvironment object from a PortletRequest
and PortletResponse objects
|
PortletEnvironment | public PortletEnvironment(String servletPath, String pathInfo, String uri, String root, javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, PortletContext portletContext, Context context, String containerEncoding, String defaultFormEncoding, int defaultSessionScope) throws IOException(Code) | | Constructs a PortletEnvironment object from a PortletRequest
and PortletResponse objects
|
getContentType | public String getContentType()(Code) | | Get the ContentType
|
getDefaultSessionScope | int getDefaultSessionScope()(Code) | | Default scope for the session attributes, either
javax.portlet.PortletSession.PORTLET_SCOPE or
javax.portlet.PortletSession.APPLICATION_SCOPE .
|
getOutputStream | public OutputStream getOutputStream(int bufferSize) throws IOException(Code) | | Get the output stream where to write the generated resource.
The returned stream is buffered by the environment. If the
buffer size is -1 then the complete output is buffered.
If the buffer size is 0, no buffering takes place.
This method replaces
PortletEnvironment.getOutputStream() .
|
hasRedirected | public boolean hasRedirected()(Code) | | |
isExternal | public boolean isExternal()(Code) | | Always return true .
|
isResponseModified | public boolean isResponseModified(long lastModified)(Code) | | This method always returns true because portlet environment
does not support response codes.
|
sendStatus | public void sendStatus(int sc)(Code) | | Portlet environment does not support response status code.
|
setContentLength | public void setContentLength(int length)(Code) | | Portlet environment does not support response content length.
This method does nothing.
|
setContentType | public void setContentType(String contentType)(Code) | | Set the ContentType
|
setResponseIsNotModified | public void setResponseIsNotModified()(Code) | | Portlet environment does not support response status code.
This method does nothing.
|
setStatus | public void setStatus(int statusCode)(Code) | | Portlet environment does not support response status code.
|
tryResetResponse | public boolean tryResetResponse() throws IOException(Code) | | Reset the response if possible. This allows error handlers to have
a higher chance to produce clean output if the pipeline that raised
the error has already output some data.
true if the response was successfully reset |
Methods inherited from org.apache.cocoon.environment.AbstractEnvironment | public void changeContext(String newPrefix, String newContext) throws IOException(Code)(Java Doc) public void commitResponse() throws IOException(Code)(Java Doc) protected static String extractAction(Request req)(Code)(Java Doc) protected static String extractView(Request request)(Code)(Java Doc) public void finishingProcessing()(Code)(Java Doc) public String getAction()(Code)(Java Doc) public Object getAttribute(String name)(Code)(Java Doc) public Enumeration getAttributeNames()(Code)(Java Doc) public String getContext()(Code)(Java Doc) public Map getObjectModel()(Code)(Java Doc) public OutputStream getOutputStream() throws IOException(Code)(Java Doc) public OutputStream getOutputStream(int bufferSize) throws IOException(Code)(Java Doc) public String getRootContext()(Code)(Java Doc) public String getURI()(Code)(Java Doc) public String getURIPrefix()(Code)(Java Doc) public String getView()(Code)(Java Doc) public void globalRedirect(boolean sessionmode, String newURL) throws IOException(Code)(Java Doc) protected boolean hasAttribute(String name)(Code)(Java Doc) protected void initComponents()(Code)(Java Doc) public boolean isInternalRedirect()(Code)(Java Doc) public boolean isResponseModified(long lastModified)(Code)(Java Doc) public void release(org.apache.excalibur.source.Source source)(Code)(Java Doc) public void removeAttribute(String name)(Code)(Java Doc) public Source resolve(String systemId) throws ProcessingException, SAXException, IOException(Code)(Java Doc) public org.apache.excalibur.source.Source resolveURI(String location) throws MalformedURLException, IOException, SourceException(Code)(Java Doc) public org.apache.excalibur.source.Source resolveURI(String location, String baseURI, Map parameters) throws MalformedURLException, IOException, SourceException(Code)(Java Doc) protected void setAction(String action)(Code)(Java Doc) public void setAttribute(String name, Object value)(Code)(Java Doc) protected void setContext(String context)(Code)(Java Doc) public void setContext(String prefix, String uri, String context)(Code)(Java Doc) public void setResponseIsNotModified()(Code)(Java Doc) public void setStatus(int statusCode)(Code)(Java Doc) protected void setURIPrefix(String prefix)(Code)(Java Doc) protected void setView(String view)(Code)(Java Doc) public void startingProcessing()(Code)(Java Doc) public boolean tryResetResponse() throws IOException(Code)(Java Doc)
|
|
|