public abstract class AbstractMapBasedContext extends AbstractContext
locale
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 and Description |
---|
AbstractMapBasedContext() |
AbstractMapBasedContext(Map<String,Object> map) |
Modifier and Type | Method and Description |
---|---|
Object |
getAttribute(String name,
int scope)
Use the
Map.get() . |
Map<String,Object> |
getAttributes()
Returns the inner map.
|
Map<String,Object> |
getAttributes(int scope)
Ignore scope and return the inner map.
|
Map<String,Object> |
getMap() |
void |
removeAttribute(String name,
int scope)
use the
Map.remove() . |
void |
setAttribute(String name,
Object value,
int scope)
Use the
Map.put() . |
void |
setMap(Map<String,Object> map) |
clear, containsKey, containsValue, entrySet, get, getAccessManager, getAttribute, getAttributeStrategy, getHierarchyManager, getJCRSession, getLocale, getMessages, getMessages, getQueryManager, getRepositoryStrategy, getSubject, getUser, isEmpty, keySet, put, putAll, release, remove, setAttributeStrategy, setLocale, setRepositoryStrategy, size, values
public void setAttribute(String name, Object value, int scope)
Map.put()
.setAttribute
in class AbstractContext
name
- is used as a keyscope
- , highest level of scope from which this attribute is visiblepublic Object getAttribute(String name, int scope)
Map.get()
.getAttribute
in class AbstractContext
name
- to which value is associated toscope
- the scope (request, session, application)public void removeAttribute(String name, int scope)
Map.remove()
.removeAttribute
in class AbstractContext
public Map<String,Object> getAttributes(int scope)
getAttributes
in class AbstractContext
public Map<String,Object> getAttributes()
getAttributes
in class AbstractContext
Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.