info.magnolia.context
Class AbstractSystemContext

java.lang.Object
  extended by info.magnolia.context.AbstractContext
      extended by info.magnolia.context.AbstractSystemContext
All Implemented Interfaces:
SystemContext, Serializable, Map, org.apache.commons.chain.Context
Direct Known Subclasses:
JCRSessionPerThreadSystemContext, SingleJCRSessionSystemContext

public abstract class AbstractSystemContext
extends AbstractContext
implements SystemContext

This is the system context using the not secured HierarchyManagers. The context uses only one scope.

Version:
$Revision: 41137 $ ($Author: gjoseph $)
Author:
Philipp Bracher
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
protected static ThreadLocal<RepositoryAcquiringStrategy> repositoryStrategyThreadLocal
           
 
Fields inherited from class info.magnolia.context.AbstractContext
locale
 
Fields inherited from interface info.magnolia.context.Context
APPLICATION_SCOPE, ATTRIBUTE_COMMENT, ATTRIBUTE_EXCEPTION, ATTRIBUTE_MESSAGE, ATTRIBUTE_PATH, ATTRIBUTE_RECURSIVE, ATTRIBUTE_REPOSITORY, ATTRIBUTE_UUID, ATTRIBUTE_VERSION, ATTRIBUTE_VERSION_MAP, LOCAL_SCOPE, SESSION_SCOPE
 
Constructor Summary
AbstractSystemContext()
          DON'T CREATE AN OBJECT.
 
Method Summary
 Locale getLocale()
          If not yet set try to get the locale of the user.
 void removeAttribute(String name, Object value, int scope)
           
 void setAttribute(String name, Object value, int scope)
          Set attribute value, scope of the attribute is defined.
 void setLocale(Locale locale)
          Deprecated. since 4.0 - this shouldn't be exposed in the SystemContext interface. Prevent calls by throwing an UnsupportedOperationException.
 
Methods inherited from class info.magnolia.context.AbstractContext
clear, containsKey, containsValue, entrySet, get, getAccessManager, getAccessManager, getAttribute, getAttribute, getAttributes, getAttributes, getAttributeStrategy, getHierarchyManager, getHierarchyManager, getMessages, getMessages, getQueryManager, getQueryManager, getRepositoryStrategy, getUser, isEmpty, keySet, put, putAll, release, remove, removeAttribute, setAttributeStrategy, setRepositoryStrategy, size, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface info.magnolia.context.Context
getAccessManager, getAccessManager, getAttribute, getAttribute, getAttributes, getAttributes, getHierarchyManager, getHierarchyManager, getMessages, getMessages, getQueryManager, getQueryManager, getUser, release, removeAttribute
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Field Detail

repositoryStrategyThreadLocal

protected static ThreadLocal<RepositoryAcquiringStrategy> repositoryStrategyThreadLocal
Constructor Detail

AbstractSystemContext

public AbstractSystemContext()
DON'T CREATE AN OBJECT. The SystemContext is set by magnolia system itself. Init the scopes

Method Detail

setAttribute

public void setAttribute(String name,
                         Object value,
                         int scope)
Description copied from interface: Context
Set attribute value, scope of the attribute is defined.

Overrides:
setAttribute in class AbstractContext
Parameters:
name - is used as a key
scope - , highest level of scope from which this attribute is visible

removeAttribute

public void removeAttribute(String name,
                            Object value,
                            int scope)

setLocale

public void setLocale(Locale locale)
Deprecated. since 4.0 - this shouldn't be exposed in the SystemContext interface. Prevent calls by throwing an UnsupportedOperationException.

Specified by:
setLocale in interface SystemContext
Overrides:
setLocale in class AbstractContext

getLocale

public Locale getLocale()
Description copied from class: AbstractContext
If not yet set try to get the locale of the user. Else use the locale of the system context.

Overrides:
getLocale in class AbstractContext
See Also:
Context.getLocale()


Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.