|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Base interface for an environment abstraction
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 |
Map |
getObjectModel()
Get the underlying object model |
OutputStream |
getOutputStream(int bufferSize)
Get the output stream where to write the generated resource. |
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 ? An external environment is one that is created in response to an external request (http, commandline, etc.). |
boolean |
isInternalRedirect()
Is this an internal redirect? An environment is on internal redirect if it is an internal request (via the cocoon: protocol) and used for a 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 the client to the given URL |
void |
removeAttribute(String name)
Removes the object bound with the specified name from this environment. |
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 |
setResponseIsNotModified()
Mark the response as not modified. |
void |
setStatus(int statusCode)
Set the response status code |
void |
setURI(String prefix,
String value)
Set the URI and the prefix to process. |
void |
startingProcessing()
Notify that the processing starts. |
boolean |
tryResetResponse()
Reset the response if possible. |
Method Detail |
public String getURI()
public String getURIPrefix()
public void setURI(String prefix, String value)
public String getView()
public String getAction()
public void redirect(String url, boolean global, boolean permanent) throws IOException
IOException
public void setContentType(String mimeType)
public String getContentType()
public void setContentLength(int length)
public void setStatus(int statusCode)
public OutputStream getOutputStream(int bufferSize) throws IOException
IOException
public Map getObjectModel()
public boolean isResponseModified(long lastModified)
public void setResponseIsNotModified()
public void setAttribute(String name, Object value)
If an object of the same name is already bound, the object is replaced.
name
- the name to which the object is boundvalue
- the object to be boundpublic Object getAttribute(String name)
null
if no object is bound under the name.
name
- a string specifying the name of the object
public void removeAttribute(String name)
name
- the name of the object to removepublic Enumeration getAttributeNames()
Enumeration
of String
objects
containing the names of all the objects bound to this environment.
Enumeration
of String
s.public boolean tryResetResponse() throws IOException
IOException
public void commitResponse() throws IOException
IOException
public void startingProcessing()
public void finishingProcessing()
public boolean isExternal()
public boolean isInternalRedirect()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |