org.apache.cocoon.components
Class ContextHelper

java.lang.Object
  extended byorg.apache.cocoon.components.ContextHelper

public final class ContextHelper
extends Object

A set of constants and methods to access the content of the context object. Some of the constants are defined in Constants.

Version:
CVS $Id: ContextHelper.java 292486 2005-09-29 17:32:59Z bloritsch $
Author:
Carsten Ziegeler

Field Summary
static String CONTEXT_OBJECT_MODEL
          Application Context Key for the current object model
static String CONTEXT_REQUEST_OBJECT
          Application Context Key for the current request object
static String CONTEXT_RESPONSE_OBJECT
          Application Context Key for the current response object
static String CONTEXT_ROOT_URL
          Application root directory (as a URL object) @since 2.2
static String CONTEXT_SITEMAP_SERVICE_MANAGER
          Application Context Key for the current sitemap service manager
 
Method Summary
static Map getObjectModel(Context context)
          Return the current object model
static Request getRequest(Context context)
          Return the current request
static Response getResponse(Context context)
          Return the current response
static ServiceManager getSitemapServiceManager(Context context)
          Return the current sitemap service manager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTEXT_OBJECT_MODEL

public static final String CONTEXT_OBJECT_MODEL
Application Context Key for the current object model

See Also:
Constant Field Values

CONTEXT_REQUEST_OBJECT

public static final String CONTEXT_REQUEST_OBJECT
Application Context Key for the current request object

See Also:
Constant Field Values

CONTEXT_RESPONSE_OBJECT

public static final String CONTEXT_RESPONSE_OBJECT
Application Context Key for the current response object

See Also:
Constant Field Values

CONTEXT_SITEMAP_SERVICE_MANAGER

public static final String CONTEXT_SITEMAP_SERVICE_MANAGER
Application Context Key for the current sitemap service manager

See Also:
Constant Field Values

CONTEXT_ROOT_URL

public static final String CONTEXT_ROOT_URL
Application root directory (as a URL object) @since 2.2

See Also:
Constant Field Values
Method Detail

getRequest

public static final Request getRequest(Context context)
Return the current request

Parameters:
context - The component context
Returns:
The request object

getResponse

public static final Response getResponse(Context context)
Return the current response

Parameters:
context - The component context
Returns:
The response

getObjectModel

public static final Map getObjectModel(Context context)
Return the current object model

Parameters:
context - The component context
Returns:
The object model

getSitemapServiceManager

public static final ServiceManager getSitemapServiceManager(Context context)
Return the current sitemap service manager

Parameters:
context - The component context
Returns:
The sitemap manager if currently a request is processed
Since:
2.2


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.