public abstract class AbstractSystemContext extends AbstractContext implements SystemContext
Modifier and Type | Field and Description |
---|---|
protected static ThreadLocal<WeakReference<Context>> |
originalContextThreadLocal |
protected static ThreadLocal<JCRSessionStrategy> |
repositoryStrategyThreadLocal |
locale
APPLICATION_SCOPE, ATTRIBUTE_COMMENT, ATTRIBUTE_EXCEPTION, ATTRIBUTE_MESSAGE, ATTRIBUTE_PATH, ATTRIBUTE_RECURSIVE, ATTRIBUTE_REPOSITORY, ATTRIBUTE_REQUESTOR, ATTRIBUTE_USERNAME, ATTRIBUTE_UUID, ATTRIBUTE_VERSION, ATTRIBUTE_VERSION_MAP, LOCAL_SCOPE, SESSION_SCOPE
Constructor and Description |
---|
AbstractSystemContext()
DON'T CREATE AN OBJECT.
|
Modifier and Type | Method and Description |
---|---|
Locale |
getLocale()
If not yet set try to get the locale of the user.
|
Context |
getOriginalContext()
Return context set at the moment of invocation of system context operation.
|
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 |
setOriginalContext(Context ctx) |
clear, containsKey, containsValue, entrySet, get, getAccessManager, getAttribute, getAttribute, getAttributes, getAttributes, getAttributeStrategy, getJCRSession, getMessages, getMessages, getRepositoryStrategy, getSubject, getUser, isEmpty, keySet, put, putAll, release, remove, removeAttribute, setAttributeStrategy, setLocale, setRepositoryStrategy, size, values
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAccessManager, getAttribute, getAttribute, getAttributes, getAttributes, getJCRSession, getMessages, getMessages, getSubject, getUser, release, removeAttribute, setLocale
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
protected static ThreadLocal<JCRSessionStrategy> repositoryStrategyThreadLocal
protected static ThreadLocal<WeakReference<Context>> originalContextThreadLocal
public AbstractSystemContext()
public void setAttribute(String name, Object value, int scope)
Context
setAttribute
in class AbstractContext
name
- is used as a keyscope
- , highest level of scope from which this attribute is visiblepublic Locale getLocale()
AbstractContext
getLocale
in class AbstractContext
Context.getLocale()
public Context getOriginalContext()
SystemContext
MgnlContext.doInSystemContext(info.magnolia.context.MgnlContext.Op)
or MgnlContext#doInSystemContext(info.magnolia.context.MgnlContext.Op, boolean))
.getOriginalContext
in interface SystemContext
public void setOriginalContext(Context ctx)
Copyright © 2003–2020 Magnolia International Ltd.. All rights reserved.