org.apache.cocoon.environment
Interface Environment

All Superinterfaces:
SourceResolver
All Known Implementing Classes:
AbstractEnvironment, EnvironmentWrapper

public interface Environment
extends SourceResolver

Base interface for an environment abstraction

Version:
CVS $Revision: 1.2.2.11 $ $Date: 2001/10/11 08:56:10 $
Author:
Giacomo Pati, Carsten Ziegeler

Method Summary
 void changeContext(java.lang.String uriprefix, java.lang.String context)
          Change the context from uriprefix to context
 java.lang.String getAction()
          Get the action to process
 java.lang.String getContentType()
          Get the content type of the resource
 java.net.URL getContext()
          Get current context
 java.util.Map getObjectModel()
          Get the underlying object model
 java.io.OutputStream getOutputStream()
          Get the output stream where to write the generated resource.
 java.net.URL getRootContext()
          Get the Root Context
 SourceHandler getSourceHandler()
          Get the SourceHandler for the current request
 java.lang.String getURI()
          Get the URI to process.
 java.lang.String getURIPrefix()
          Get the prefix of the URI in progress.
 java.lang.String getView()
          Get the view to process
 boolean isResponseModified(long lastModified)
          Check if the response has been modified since the same "resource" was requested.
 void redirect(boolean sessionmode, java.lang.String url)
          Redirect to the given URL
 void setContentLength(int length)
          Set the length of the generated content
 void setContentType(java.lang.String mimeType)
          Set the content type of the generated resource
 void setContext(java.lang.String prefix, java.lang.String uri)
          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 the response status code
 
Methods inherited from interface org.apache.cocoon.environment.SourceResolver
resolve
 

Method Detail

getSourceHandler

public SourceHandler getSourceHandler()
Get the SourceHandler for the current request

setSourceHandler

public void setSourceHandler(SourceHandler sourceHandler)
Set the SourceHandler for the current request

getURI

public java.lang.String getURI()
Get the URI to process. The prefix is stripped off.

getURIPrefix

public java.lang.String getURIPrefix()
Get the prefix of the URI in progress.

getRootContext

public java.net.URL getRootContext()
Get the Root Context

getContext

public java.net.URL getContext()
Get current context

getView

public java.lang.String getView()
Get the view to process

getAction

public java.lang.String getAction()
Get the action to process

setContext

public void setContext(java.lang.String prefix,
                       java.lang.String uri)
Set the context. This is similar to changeContext() except that it is absolute.

changeContext

public void changeContext(java.lang.String uriprefix,
                          java.lang.String context)
                   throws java.lang.Exception
Change the context from uriprefix to context

redirect

public void redirect(boolean sessionmode,
                     java.lang.String url)
              throws java.io.IOException
Redirect to the given URL

setContentType

public void setContentType(java.lang.String mimeType)
Set the content type of the generated resource

getContentType

public java.lang.String getContentType()
Get the content type of the resource

setContentLength

public void setContentLength(int length)
Set the length of the generated content

setStatus

public void setStatus(int statusCode)
Set the response status code

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Get the output stream where to write the generated resource.

getObjectModel

public java.util.Map getObjectModel()
Get the underlying object model

isResponseModified

public boolean isResponseModified(long lastModified)
Check if the response has been modified since the same "resource" was requested. The caller has to test if it is really the same "resource" which is requested.

setResponseIsNotModified

public void setResponseIsNotModified()
Mark the response as not modified.


Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.