|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Environment
Base interface for an environment abstraction
Field Summary |
---|
Fields inherited from interface org.apache.excalibur.source.SourceResolver |
---|
METHOD, ROLE, URI_ENCODING, URI_PARAMETERS |
Method Summary | |
---|---|
void |
changeContext(String uriprefix,
String context)
Change the context from uriprefix to context |
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 |
String |
getContext()
Get current context |
Map |
getObjectModel()
Get the underlying object model |
OutputStream |
getOutputStream()
Deprecated. Use getOutputStream(int) instead. |
OutputStream |
getOutputStream(int bufferSize)
Get the output stream where to write the generated resource. |
String |
getRootContext()
Get the Root Context |
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(boolean sessionmode,
String url)
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 |
setContext(String prefix,
String uri,
String context)
Set the context. |
void |
setResponseIsNotModified()
Mark the response as not modified. |
void |
setStatus(int statusCode)
Set the response status code |
void |
startingProcessing()
Notify that the processing starts. |
boolean |
tryResetResponse()
Reset the response if possible. |
Methods inherited from interface org.apache.cocoon.environment.SourceResolver |
---|
resolve |
Methods inherited from interface org.apache.excalibur.source.SourceResolver |
---|
release, resolveURI, resolveURI |
Method Detail |
---|
String getURI()
String getURIPrefix()
String getRootContext()
String getContext()
String getView()
String getAction()
void setContext(String prefix, String uri, String context)
void changeContext(String uriprefix, String context) throws Exception
Exception
void redirect(boolean sessionmode, String url) throws IOException
IOException
void setContentType(String mimeType)
String getContentType()
void setContentLength(int length)
void setStatus(int statusCode)
OutputStream getOutputStream() throws IOException
getOutputStream(int)
instead.
IOException
OutputStream getOutputStream(int bufferSize) throws IOException
getOutputStream()
.
IOException
Map getObjectModel()
boolean isResponseModified(long lastModified)
void setResponseIsNotModified()
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 boundObject getAttribute(String name)
null
if no object is bound under the name.
name
- a string specifying the name of the object
void removeAttribute(String name)
name
- the name of the object to removeEnumeration getAttributeNames()
Enumeration
of String
objects
containing the names of all the objects bound to this environment.
Enumeration
of String
s.boolean tryResetResponse() throws IOException
IOException
void commitResponse() throws IOException
IOException
void startingProcessing()
void finishingProcessing()
boolean isExternal()
boolean isInternalRedirect()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |