|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.cocoon.environment.wrapper.MutableEnvironmentFacade
Enviroment facade, whose delegate object can be changed. This class is
required to handle internal redirects in sitemap sources ("cocoon:").
This is because SitemapSource
keeps the environment in which the internal request should be processed.
But internal redirects create a new processing environment and there's
no way to change the one held by the SitemapSource. So the
processing of internal redirects actually changes the delegate of this
class, transparently for the SitemapSource.
SitemapSource| Constructor Summary | |
MutableEnvironmentFacade(EnvironmentWrapper env)
|
|
| Method Summary | |
void |
commitResponse()
Commit the response |
void |
finishingProcessing()
Notify that the processing is finished This can be used to cleanup the environment object |
String |
getAction()
Get the action to process |
Object |
getAttribute(String name)
Returns the object bound with the specified name, or null
if no object is bound under the name. |
Enumeration |
getAttributeNames()
Returns an Enumeration of String objects
containing the names of all the objects bound to this environment. |
String |
getContentType()
Get the content type of the resource |
EnvironmentWrapper |
getDelegate()
|
Map |
getObjectModel()
Get the underlying object model |
OutputStream |
getOutputStream(int bufferSize)
Get the output stream where to write the generated resource. |
String |
getRedirectURL()
|
String |
getURI()
Get the URI to process. |
String |
getURIPrefix()
Get the prefix of the URI in progress. |
String |
getView()
Get the view to process |
boolean |
isExternal()
Is this environment external ? |
boolean |
isInternalRedirect()
Is this an internal redirect? |
boolean |
isResponseModified(long lastModified)
Check if the response has been modified since the same "resource" was requested. |
void |
redirect(String url,
boolean global,
boolean permanent)
Redirect to the given URL |
void |
removeAttribute(String name)
Removes the object bound with the specified name from this environment. |
void |
reset()
|
void |
setAttribute(String name,
Object value)
Binds an object to this environment, using the name specified. |
void |
setContentLength(int length)
Set the length of the generated content |
void |
setContentType(String mimeType)
Set the content type of the generated resource |
void |
setDelegate(EnvironmentWrapper env)
|
void |
setOutputStream(OutputStream os)
|
void |
setResponseIsNotModified()
Mark the response as not modified. |
void |
setStatus(int statusCode)
Set the response status code |
void |
setURI(String prefix,
String uri)
Set the URI and the prefix to process. |
void |
startingProcessing()
Notify that the processing starts. |
boolean |
tryResetResponse()
Reset the response if possible. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MutableEnvironmentFacade(EnvironmentWrapper env)
| Method Detail |
public EnvironmentWrapper getDelegate()
public void setDelegate(EnvironmentWrapper env)
public void setURI(String prefix,
String uri)
Environment
setURI in interface Environmentpublic void setOutputStream(OutputStream os)
public String getRedirectURL()
public String getURI()
Environment
getURI in interface Environmentpublic String getURIPrefix()
Environment
getURIPrefix in interface Environmentpublic String getView()
Environment
getView in interface Environmentpublic String getAction()
Environment
getAction in interface Environment
public void redirect(String url,
boolean global,
boolean permanent)
throws IOException
Environment
redirect in interface EnvironmentIOExceptionpublic void setContentType(String mimeType)
Environment
setContentType in interface Environmentpublic String getContentType()
Environment
getContentType in interface Environmentpublic void setContentLength(int length)
Environment
setContentLength in interface Environmentpublic void setStatus(int statusCode)
Environment
setStatus in interface Environment
public OutputStream getOutputStream(int bufferSize)
throws IOException
Environment
getOutputStream in interface EnvironmentIOExceptionpublic Map getObjectModel()
Environment
getObjectModel in interface Environmentpublic boolean isResponseModified(long lastModified)
Environment
isResponseModified in interface Environmentpublic void setResponseIsNotModified()
Environment
setResponseIsNotModified in interface Environment
public void setAttribute(String name,
Object value)
EnvironmentIf an object of the same name is already bound, the object is replaced.
setAttribute in interface Environmentname - the name to which the object is boundvalue - the object to be boundpublic Object getAttribute(String name)
Environmentnull
if no object is bound under the name.
getAttribute in interface Environmentname - a string specifying the name of the object
public void removeAttribute(String name)
Environment
removeAttribute in interface Environmentname - the name of the object to removepublic Enumeration getAttributeNames()
EnvironmentEnumeration of String objects
containing the names of all the objects bound to this environment.
getAttributeNames in interface EnvironmentEnumeration of Strings.
public boolean tryResetResponse()
throws IOException
Environment
tryResetResponse in interface EnvironmentIOException
public void commitResponse()
throws IOException
Environment
commitResponse in interface EnvironmentIOExceptionpublic void startingProcessing()
Environment
startingProcessing in interface Environmentpublic void finishingProcessing()
Environment
finishingProcessing in interface Environmentpublic boolean isExternal()
Environment
isExternal in interface Environmentpublic void reset()
public boolean isInternalRedirect()
Environment
isInternalRedirect in interface Environment
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||