|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLoggable
|
+--org.apache.cocoon.environment.AbstractEnvironment
Base class for any environment
| Field Summary | |
protected java.lang.String |
action
The Action requested |
protected java.net.URL |
context
The Context path |
protected org.apache.avalon.framework.component.ComponentManager |
manager
The current manager |
protected java.util.HashMap |
objectModel
The servlet object model |
protected java.lang.StringBuffer |
prefix
The current prefix to strip off from the request uri |
protected java.net.URL |
rootContext
The root context path |
protected SourceHandler |
sourceHandler
The source handler for the current environment |
protected java.lang.String |
uris
The current uri in progress |
protected java.lang.String |
view
The View requested |
| Constructor Summary | |
AbstractEnvironment(java.lang.String uri,
java.lang.String view,
java.io.File file)
Constructs the abstract environment |
|
AbstractEnvironment(java.lang.String uri,
java.lang.String view,
java.io.File file,
java.lang.String action)
Constructs the abstract environment |
|
AbstractEnvironment(java.lang.String uri,
java.lang.String view,
java.lang.String file)
Constructs the abstract environment |
|
AbstractEnvironment(java.lang.String uri,
java.lang.String view,
java.lang.String file,
java.lang.String action)
Constructs the abstract environment |
|
AbstractEnvironment(java.lang.String uri,
java.lang.String view,
java.net.URL context,
java.lang.String action)
Constructs the abstract environment |
|
| Method Summary | |
void |
changeContext(java.lang.String prefix,
java.lang.String newContext)
Adds an prefix to the overall stripped off prefix from the request uri |
java.lang.String |
getAction()
Returns the request action |
java.lang.Object |
getAttribute(java.lang.String name)
Returns the object bound with the specified name, or null
if no object is bound under the name. |
java.util.Enumeration |
getAttributeNames()
Returns an Enumeration of String objects
containing the names of all the objects bound to this environment. |
org.apache.avalon.framework.component.ComponentManager |
getComponentManager()
The sitemap processor sets up new managers per sitemap. |
java.net.URL |
getContext()
Get the current Context |
java.util.Map |
getObjectModel()
Returns a Map containing environment specific objects |
java.net.URL |
getRootContext()
Get the Root Context |
SourceHandler |
getSourceHandler()
Get the SourceHandler for the current request |
java.lang.String |
getURI()
Returns the uri in progress. |
java.lang.String |
getURIPrefix()
Get the prefix of the URI in progress |
java.lang.String |
getView()
Returns the request view |
void |
globalRedirect(boolean sessionmode,
java.lang.String newURL)
|
boolean |
isResponseModified(long lastModified)
Check if the response has been modified since the same "resource" was requested. |
abstract void |
redirect(boolean sessionmode,
java.lang.String newURL)
Redirect the client to a new URL |
void |
removeAttribute(java.lang.String name)
Removes the object bound with the specified name from this environment. |
Source |
resolve(java.lang.String systemId)
Resolve an entity. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Binds an object to this environment, using the name specified. |
void |
setComponentManager(org.apache.avalon.framework.component.ComponentManager manager)
The sitemap sets up new managers per sitemap. |
void |
setContext(java.lang.String prefix,
java.lang.String uri)
Set the context. |
protected void |
setContext(java.net.URL context)
Set the context. |
void |
setResponseIsNotModified()
Mark the response as not modified. |
void |
setSourceHandler(SourceHandler sourceHandler)
Set the SourceHandler for the current request |
void |
setStatus(int statusCode)
Set a status code |
protected void |
setURIPrefix(java.lang.String prefix)
Set the prefix of the URI in progress |
boolean |
tryResetResponse()
Reset the response if possible. |
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable |
getLogger, setLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.cocoon.environment.Environment |
getContentType, getOutputStream, setContentLength, setContentType |
| Field Detail |
protected java.lang.String uris
protected java.lang.StringBuffer prefix
protected java.lang.String view
protected java.lang.String action
protected java.net.URL context
protected java.net.URL rootContext
protected java.util.HashMap objectModel
protected SourceHandler sourceHandler
protected org.apache.avalon.framework.component.ComponentManager manager
| Constructor Detail |
public AbstractEnvironment(java.lang.String uri,
java.lang.String view,
java.lang.String file)
throws java.net.MalformedURLException
public AbstractEnvironment(java.lang.String uri,
java.lang.String view,
java.lang.String file,
java.lang.String action)
throws java.net.MalformedURLException
public AbstractEnvironment(java.lang.String uri,
java.lang.String view,
java.io.File file)
throws java.net.MalformedURLException
public AbstractEnvironment(java.lang.String uri,
java.lang.String view,
java.io.File file,
java.lang.String action)
throws java.net.MalformedURLException
public AbstractEnvironment(java.lang.String uri,
java.lang.String view,
java.net.URL context,
java.lang.String action)
throws java.net.MalformedURLException
| Method Detail |
public org.apache.avalon.framework.component.ComponentManager getComponentManager()
public void setComponentManager(org.apache.avalon.framework.component.ComponentManager manager)
setComponentManager in interface Environmentpublic SourceHandler getSourceHandler()
SourceHandler for the current requestgetSourceHandler in interface Environmentpublic void setSourceHandler(SourceHandler sourceHandler)
SourceHandler for the current requestsetSourceHandler in interface Environmentpublic java.lang.String getURI()
getURI in interface Environmentpublic java.net.URL getRootContext()
getRootContext in interface Environmentpublic java.net.URL getContext()
getContext in interface Environmentpublic java.lang.String getURIPrefix()
getURIPrefix in interface Environmentprotected void setURIPrefix(java.lang.String prefix)
protected void setContext(java.net.URL context)
public void setContext(java.lang.String prefix,
java.lang.String uri)
setContext in interface Environment
public void changeContext(java.lang.String prefix,
java.lang.String newContext)
throws java.net.MalformedURLException
changeContext in interface Environment
public abstract void redirect(boolean sessionmode,
java.lang.String newURL)
throws java.io.IOException
redirect in interface Environment
public void globalRedirect(boolean sessionmode,
java.lang.String newURL)
throws java.io.IOException
public java.lang.String getView()
getView in interface Environmentpublic java.lang.String getAction()
getAction in interface Environmentpublic void setStatus(int statusCode)
setStatus in interface Environmentpublic java.util.Map getObjectModel()
getObjectModel in interface Environment
public Source resolve(java.lang.String systemId)
throws ProcessingException,
org.xml.sax.SAXException,
java.io.IOException
resolve in interface SourceResolverorg.apache.cocoon.environment.SourceResolversystemID - This is either a system identifier
(java.net.URL or a local file.public boolean isResponseModified(long lastModified)
isResponseModified in interface Environmentpublic void setResponseIsNotModified()
setResponseIsNotModified in interface Environmentpublic java.lang.Object getAttribute(java.lang.String name)
Environmentnull
if no object is bound under the name.getAttribute in interface Environmentorg.apache.cocoon.environment.Environmentname - a string specifying the name of the object
public void setAttribute(java.lang.String name,
java.lang.Object value)
EnvironmentIf an object of the same name is already bound, the object is replaced.
setAttribute in interface Environmentorg.apache.cocoon.environment.Environmentname - the name to which the object is boundvalue - the object to be boundpublic void removeAttribute(java.lang.String name)
EnvironmentremoveAttribute in interface Environmentorg.apache.cocoon.environment.Environmentname - the name of the object to removepublic java.util.Enumeration getAttributeNames()
EnvironmentEnumeration of String objects
containing the names of all the objects bound to this environment.getAttributeNames in interface Environmentorg.apache.cocoon.environment.EnvironmentEnumeration of Strings.public boolean tryResetResponse()
tryResetResponse in interface Environment
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||