|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.util.AbstractLogEnabled org.apache.cocoon.environment.AbstractEnvironment org.apache.cocoon.environment.wrapper.EnvironmentWrapper
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 String |
contentType
|
protected org.apache.cocoon.environment.Environment |
environment
The wrapped environment |
protected boolean |
internalRedirect
|
protected String |
redirectURL
The redirect url |
protected org.apache.cocoon.environment.Request |
request
The request object |
Fields inherited from class org.apache.cocoon.environment.AbstractEnvironment |
action, objectModel, outputStream, prefix, secureOutputStream, uri, view |
Constructor Summary | |
EnvironmentWrapper(org.apache.cocoon.environment.Environment env,
SitemapSourceInfo info)
Construct a new environment. |
|
EnvironmentWrapper(org.apache.cocoon.environment.Environment env,
SitemapSourceInfo info,
boolean wrapResponse)
Construct a new environment. |
Method Summary | |
void |
commitResponse()
|
Object |
getAttribute(String name)
Lookup an attribute in this instance, and if not found search it in the wrapped environment. |
String |
getContentType()
Get the ContentType |
OutputStream |
getOutputStream(int bufferSize)
|
String |
getRedirectURL()
if a redirect should happen this returns the url, otherwise null is returned |
boolean |
isExternal()
Always return false . |
boolean |
isInternalRedirect()
|
void |
redirect(String newURL,
boolean global,
boolean permanent)
|
void |
removeAttribute(String name)
Remove attribute from the current instance, as well as from the wrapped environment. |
void |
reset()
|
void |
setContentLength(int length)
|
void |
setContentType(String contentType)
Set the ContentType |
void |
setInternalRedirect(boolean flag)
|
void |
setOutputStream(OutputStream stream)
Set the output stream for this environment. |
void |
setStatus(int statusCode)
Set the StatusCode |
boolean |
tryResetResponse()
|
Methods inherited from class org.apache.cocoon.environment.AbstractEnvironment |
extractAction, extractView, finishingProcessing, getAction, getAttributeNames, getObjectModel, getURI, getURIPrefix, getView, isResponseModified, setAction, setAttribute, setResponseIsNotModified, setURI, setView, startingProcessing |
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled |
getLogger, setLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final org.apache.cocoon.environment.Environment environment
protected final org.apache.cocoon.environment.Request request
protected String contentType
protected String redirectURL
protected boolean internalRedirect
Constructor Detail |
public EnvironmentWrapper(org.apache.cocoon.environment.Environment env, SitemapSourceInfo info)
env
- The origial Environmentinfo
- A description of the uri for the new environmentpublic EnvironmentWrapper(org.apache.cocoon.environment.Environment env, SitemapSourceInfo info, boolean wrapResponse)
env
- The origial Environmentinfo
- A description of the uri for the new environmentwrapResponse
- Whether or not to wrap the Response objectMethod Detail |
public void redirect(String newURL, boolean global, boolean permanent) throws IOException
IOException
Environment.redirect(String, boolean, boolean)
public OutputStream getOutputStream(int bufferSize) throws IOException
IOException
Environment.getOutputStream(int)
public void setOutputStream(OutputStream stream)
public boolean tryResetResponse() throws IOException
IOException
Environment.tryResetResponse()
public void commitResponse() throws IOException
IOException
Environment.commitResponse()
public String getRedirectURL()
null
is returned
public void reset()
public void setStatus(int statusCode)
public void setContentLength(int length)
public void setContentType(String contentType)
public String getContentType()
public Object getAttribute(String name)
name
- a String
, the name of the attribute to
look for
Object
, the value of the attribute or
null if no such attribute was found.public void removeAttribute(String name)
name
- a String
valuepublic boolean isExternal()
false
.
public void setInternalRedirect(boolean flag)
public boolean isInternalRedirect()
Environment.isInternalRedirect()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |