Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » environment » wrapper » [javadoc | source]
org.apache.cocoon.environment.wrapper
public class: EnvironmentWrapper [javadoc | source]
java.lang.Object
   org.apache.avalon.framework.logger.AbstractLogEnabled
      org.apache.cocoon.environment.AbstractEnvironment
         org.apache.cocoon.environment.wrapper.EnvironmentWrapper

All Implemented Interfaces:
    Environment

Direct Known Subclasses:
    ForwardEnvironmentWrapper

This is a wrapper class for the Environment object. It has the same properties except that the object model contains a RequestWrapper object.
Field Summary
protected  Environment environment    The wrapped environment 
protected  Map objectModel    The object model 
protected  String redirectURL    The redirect url 
protected  Request request    The request object 
protected  OutputStream outputStream    The stream to output to 
protected  String contentType     
protected  boolean internalRedirect     
Fields inherited from org.apache.cocoon.environment.AbstractEnvironment:
uris,  prefix,  view,  action,  context,  rootContext,  objectModel,  sourceResolver,  manager,  secureOutputStream,  outputStream,  avalonToCocoonSourceWrapper,  initializedComponents
Constructor:
 public EnvironmentWrapper(Environment env,
    String requestURI,
    String queryString,
    Logger logger) throws MalformedURLException 
    Constructs an EnvironmentWrapper object from a Request and Response objects
 public EnvironmentWrapper(Environment env,
    String requestURI,
    String queryString,
    Logger logger,
    boolean rawMode) throws MalformedURLException 
    Constructs an EnvironmentWrapper object from a Request and Response objects
 public EnvironmentWrapper(Environment env,
    ComponentManager manager,
    String uri,
    Logger logger,
    boolean wrapResponse) throws MalformedURLException 
 public EnvironmentWrapper(Environment env,
    String requestURI,
    String queryString,
    Logger logger,
    ComponentManager manager,
    boolean rawMode) throws MalformedURLException 
    Constructs an EnvironmentWrapper object from a Request and Response objects
 public EnvironmentWrapper(Environment env,
    String requestURI,
    String queryString,
    Logger logger,
    ComponentManager manager,
    boolean rawMode,
    String view) throws MalformedURLException 
    Constructs an EnvironmentWrapper object from a Request and Response objects
 public EnvironmentWrapper(Environment env,
    String requestURI,
    String queryString,
    Logger logger,
    ComponentManager manager,
    boolean rawMode,
    String view,
    boolean wrapResponse) throws MalformedURLException 
    Constructs an EnvironmentWrapper object from a Request and Response objects
Method from org.apache.cocoon.environment.wrapper.EnvironmentWrapper Summary:
commitResponse,   getAttribute,   getContentType,   getObjectModel,   getOutputStream,   getOutputStream,   getRedirectURL,   globalRedirect,   isExternal,   isInternalRedirect,   redirect,   reset,   setContentLength,   setContentType,   setInternalRedirect,   setOutputStream,   setStatus,   setURI,   tryResetResponse
Methods from org.apache.cocoon.environment.AbstractEnvironment:
changeContext,   commitResponse,   extractAction,   extractView,   finishingProcessing,   getAction,   getAttribute,   getAttributeNames,   getContext,   getObjectModel,   getOutputStream,   getOutputStream,   getRootContext,   getURI,   getURIPrefix,   getView,   globalRedirect,   hasAttribute,   initComponents,   isInternalRedirect,   isResponseModified,   release,   removeAttribute,   resolve,   resolveURI,   resolveURI,   setAction,   setAttribute,   setContext,   setContext,   setResponseIsNotModified,   setStatus,   setURIPrefix,   setView,   startingProcessing,   tryResetResponse
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.environment.wrapper.EnvironmentWrapper Detail:
 public  void commitResponse() throws IOException 
    Commit the response
 public Object getAttribute(String name) 
    Lookup an attribute in this instance, and if not found search it in the wrapped environment.
 public String getContentType() 
    Get the ContentType
 public Map getObjectModel() 
    Get the underlying object model
 public OutputStream getOutputStream() throws IOException 
Deprecated! use - #getOutputStream(int) instead.

    Get the output stream
 public OutputStream getOutputStream(int bufferSize) throws IOException 
    Get the output stream
 public String getRedirectURL() 
    if a redirect should happen this returns the url, otherwise null is returned
 public  void globalRedirect(boolean sessionmode,
    String newURL) throws IOException 
    Redirect in the first non-wrapped environment
 public boolean isExternal() 
    Always return false.
 public boolean isInternalRedirect() 
 public  void redirect(boolean sessionmode,
    String newURL) throws IOException 
    Redirect the client to a new URL is not allowed
 public  void reset() 
 public  void setContentLength(int length) 
 public  void setContentType(String contentType) 
    Set the ContentType
 public  void setInternalRedirect(boolean flag) 
 public  void setOutputStream(OutputStream stream) 
    Set the output stream for this environment. It hides the one of the wrapped environment.
 public  void setStatus(int statusCode) 
    Set the StatusCode
 public  void setURI(String prefix,
    String uris) 
    Set a new URI for processing. If the prefix is null the new URI is inside the current context. If the prefix is not null the context is changed to the root context and the prefix is set.
 public boolean tryResetResponse() throws IOException 
    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.