com.arsdigita.kernel
Class KernelContext
java.lang.Object
com.arsdigita.kernel.KernelContext
- public final class KernelContext
- extends Object
The entry point into all the global state that CCM code expects to
have available to it when running, e.g. the current user, the
current resource, etc.
This is a session object that provides an environment in which
code can execute. The KernelContext contains all session-specific
variables. One session object is maintained per thread.
Accessors of this class may return null. Developers should take
care to trap null return values in their code.
- Author:
- Rafael Schloming, Richard Li, Justin Ross
- See Also:
Kernel
,
KernelExcursion
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
versionId
public static final String versionId
- See Also:
- Constant Field Values
getDebugInfo
public final String getDebugInfo()
getResource
public final Resource getResource()
- Returns:
- the currently selected resource.
getParty
public final Party getParty()
- Returns:
- the party that is actually executing the session.
getEffectiveParty
public final Party getEffectiveParty()
- The effective party is the party under which you want a
particular set of operations to take place. This is useful when
you are running code under a context but need part of that code
to run under the guise of a different user (for example,
PUBLIC, ADMIN).
- Returns:
- the party assuming the role of the current party.
getLocale
public final Locale getLocale()
- Returns:
- the locale for the current session
getSessionID
public final String getSessionID()
- Returns:
- the ID of the current session.
getTransaction
public final DatabaseTransaction getTransaction()
- Returns:
- the current database transaction.
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC