info.magnolia.context
Class AbstractSystemContext
java.lang.Object
info.magnolia.context.AbstractContext
info.magnolia.context.AbstractSystemContext
- All Implemented Interfaces:
- SystemContext, java.io.Serializable, java.util.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: 32667 $ ($Author: gjoseph $)
- Author:
- Philipp Bracher
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
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 |
Method Summary |
java.util.Locale |
getLocale()
If not yet set try to get the locale of the user. |
void |
removeAttribute(java.lang.String name,
java.lang.Object value,
int scope)
|
void |
setAttribute(java.lang.String name,
java.lang.Object value,
int scope)
Set attribute value, scope of the attribute is defined |
void |
setLocale(java.util.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 |
repositoryStrategyThreadLocal
protected static java.lang.ThreadLocal<RepositoryAcquiringStrategy> repositoryStrategyThreadLocal
AbstractSystemContext
public AbstractSystemContext()
- DON'T CREATE AN OBJECT. The SystemContext is set by magnolia system itself. Init the scopes
setAttribute
public void setAttribute(java.lang.String name,
java.lang.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 keyscope
- , highest level of scope from which this attribute is visible
removeAttribute
public void removeAttribute(java.lang.String name,
java.lang.Object value,
int scope)
setLocale
public void setLocale(java.util.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 java.util.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-2010 Magnolia International Ltd.. All Rights Reserved.