com.arsdigita.cms
Class CMSContext

java.lang.Object
  extended bycom.arsdigita.cms.CMSContext

public final class CMSContext
extends Object

The entry point into all the global state that CCM CMS code expects to have available to it when running, e.g. the current content section, current item

This is a session object that provides an environment in which code can execute. The CMSContext contains all session-specific variables. One session object is maintained per thread.

Accessors of this class will assert that the item it returned is not null. If the caller wants to handle the case where an item is null explicitly, then use the hasContentItem and hasContentSection methods first.

Author:
Daniel Berrange
See Also:
KernelContext, CMS

Field Summary
static String versionId
           
 
Method Summary
 ContentItem getContentItem()
          Returns the current content item
 ContentSection getContentSection()
          Gets the current content section
 String getDebugInfo()
           
 SecurityManager getSecurityManager()
          Returns the current security manager.
 boolean hasContentItem()
          Checks if a content item is available
 boolean hasContentSection()
          Checks if a content section is available
 boolean hasSecurityManager()
          Checks if there is a CMS SecurityManager for this session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Method Detail

getDebugInfo

public final String getDebugInfo()

hasContentSection

public final boolean hasContentSection()
Checks if a content section is available

Returns:
true if a content section is available

getContentSection

public final ContentSection getContentSection()
Gets the current content section

Returns:
the currently selected content section

hasContentItem

public final boolean hasContentItem()
Checks if a content item is available

Returns:
true if a content item is available

getContentItem

public final ContentItem getContentItem()
Returns the current content item

Returns:
the current content item

hasSecurityManager

public final boolean hasSecurityManager()
Checks if there is a CMS SecurityManager for this session.

Returns:
true if a security manager is available
See Also:
SecurityManager

getSecurityManager

public final SecurityManager getSecurityManager()
Returns the current security manager.

Returns:
the current security manager


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2352 UTC