public class ContextDecorator extends AbstractContext
Modifier and Type | Field and Description |
---|---|
protected Context |
ctx |
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 |
---|
ContextDecorator(Context ctx) |
Modifier and Type | Method and Description |
---|---|
AccessManager |
getAccessManager(String name)
Delegates call to the original context.
|
Object |
getAttribute(String name,
int scope)
Delegates call to the original context.
|
Map<String,Object> |
getAttributes(int scope)
Delegates call to the original context.
|
javax.jcr.Session |
getJCRSession(String workspaceName) |
User |
getUser()
Delegates call to the original context.
|
Context |
getWrappedContext()
Returns the context wrapped by this decorator.
|
void |
release()
Release any resource used by this Context (e.g. jcr sessions).
|
void |
removeAttribute(String name,
int scope)
Delegates call to the original context.
|
void |
setAttribute(String name,
Object value,
int scope)
Delegates call to the original context.
|
clear, containsKey, containsValue, entrySet, get, getAttribute, getAttributes, getAttributeStrategy, getLocale, getMessages, getMessages, getRepositoryStrategy, getSubject, isEmpty, keySet, put, putAll, remove, setAttributeStrategy, setLocale, setRepositoryStrategy, size, values
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
protected Context ctx
public ContextDecorator(Context ctx)
ctx
- the context to decoratepublic AccessManager getAccessManager(String name)
getAccessManager
in class AbstractContext
public Object getAttribute(String name, int scope)
getAttribute
in class AbstractContext
name
- to which value is associated toscope
- the scope (request, session, application)public Map<String,Object> getAttributes(int scope)
getAttributes
in class AbstractContext
public javax.jcr.Session getJCRSession(String workspaceName) throws javax.jcr.LoginException, javax.jcr.RepositoryException
getJCRSession
in class AbstractContext
javax.jcr.LoginException
javax.jcr.RepositoryException
public User getUser()
getUser
in class AbstractContext
public void setAttribute(String name, Object value, int scope)
setAttribute
in class AbstractContext
name
- is used as a keyscope
- , highest level of scope from which this attribute is visiblepublic void removeAttribute(String name, int scope)
removeAttribute
in class AbstractContext
public Context getWrappedContext()
public void release()
AbstractContext
release
in class AbstractContext
Copyright © 2003–2018 Magnolia International Ltd.. All rights reserved.