org.apache.lenya.cms.cocoon.components.context
Class ContextUtility

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.lenya.cms.cocoon.components.context.ContextUtility
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled

public class ContextUtility
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements org.apache.avalon.framework.component.Component, org.apache.avalon.framework.context.Contextualizable

Utility class for getting the context, request, response and object model of the current request.


Field Summary
protected  org.apache.avalon.framework.context.Context context
           
static java.lang.String ROLE
          The component's role.
 
Constructor Summary
ContextUtility()
           
 
Method Summary
 void contextualize(org.apache.avalon.framework.context.Context context)
           
 org.apache.avalon.framework.context.Context getContext()
          Get the context object of the current request.
 java.util.Map getObjectModel()
          Get the object model of the current request.
 org.apache.cocoon.environment.Request getRequest()
          Get the request object of the current request.
 org.apache.cocoon.environment.Response getResponse()
          Get the response object of the current request.
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROLE

public static final java.lang.String ROLE
The component's role.


context

protected org.apache.avalon.framework.context.Context context
Constructor Detail

ContextUtility

public ContextUtility()
Method Detail

contextualize

public void contextualize(org.apache.avalon.framework.context.Context context)
                   throws org.apache.avalon.framework.context.ContextException
Specified by:
contextualize in interface org.apache.avalon.framework.context.Contextualizable
Throws:
org.apache.avalon.framework.context.ContextException
See Also:
Contextualizable.contextualize(org.apache.avalon.framework.context.Context)

getContext

public org.apache.avalon.framework.context.Context getContext()
Get the context object of the current request.

Returns:
The context object of the current request.

getRequest

public org.apache.cocoon.environment.Request getRequest()
Get the request object of the current request.

Returns:
The request object of the current request.

getResponse

public org.apache.cocoon.environment.Response getResponse()
Get the response object of the current request.

Returns:
The response object of the current request.

getObjectModel

public java.util.Map getObjectModel()
Get the object model of the current request.

Returns:
The object model of the current request.


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