|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.context.AbstractContext
public abstract class AbstractContext
Default implementation of the Context interface.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Field Summary | |
---|---|
protected Locale |
locale
The locale for this context. |
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 | |
---|---|
AbstractContext()
|
Method Summary | |
---|---|
void |
clear()
|
boolean |
containsKey(Object arg0)
|
boolean |
containsValue(Object value)
This implementation is very slow! |
Set<Map.Entry<String,Object>> |
entrySet()
|
Object |
get(Object key)
|
AccessManager |
getAccessManager(String repositoryId)
Get access manager for the specified repository on default workspace. |
AccessManager |
getAccessManager(String repositoryId,
String workspaceId)
Get access manager for the specified repository on the specified workspace. |
Object |
getAttribute(String name)
Get the attribute value. |
Object |
getAttribute(String name,
int scope)
Get attribute value. |
Map<String,Object> |
getAttributes()
Merge the scopes maps. |
Map<String,Object> |
getAttributes(int scope)
Get a map of a attributes set in the scope. |
AttributeStrategy |
getAttributeStrategy()
|
HierarchyManager |
getHierarchyManager(String repositoryId)
Get hierarchy manager initialized for this user. |
HierarchyManager |
getHierarchyManager(String repositoryId,
String workspaceId)
Get hierarchy manager initialized for this user. |
Locale |
getLocale()
If not yet set try to get the locale of the user. |
Messages |
getMessages()
TODO: This duplicates methods from MessagesManager : remove either. |
Messages |
getMessages(String basename)
TODO: This duplicates methods from MessagesManager : remove either. |
QueryManager |
getQueryManager(String repositoryId)
Get QueryManager created for this user on the specified repository. |
QueryManager |
getQueryManager(String repositoryId,
String workspaceId)
Get QueryManager created for this user on the specified repository and workspace. |
RepositoryAcquiringStrategy |
getRepositoryStrategy()
|
User |
getUser()
If this is not a UserContext this method will very likely return the system user. |
boolean |
isEmpty()
|
Set<String> |
keySet()
|
Object |
put(Object key,
Object value)
|
void |
putAll(Map map)
|
void |
release()
Release any resource used by this Context (e.g. |
Object |
remove(Object key)
|
void |
removeAttribute(String name,
int scope)
Remove an attribute. |
void |
setAttribute(String name,
Object value,
int scope)
Set attribute value, scope of the attribute is defined. |
void |
setAttributeStrategy(AttributeStrategy strategy)
|
void |
setLocale(Locale locale)
|
void |
setRepositoryStrategy(RepositoryAcquiringStrategy strategy)
|
int |
size()
|
Collection<Object> |
values()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Field Detail |
---|
protected Locale locale
Constructor Detail |
---|
public AbstractContext()
Method Detail |
---|
public User getUser()
Context
public AttributeStrategy getAttributeStrategy()
public void setAttributeStrategy(AttributeStrategy strategy)
public RepositoryAcquiringStrategy getRepositoryStrategy()
public void setRepositoryStrategy(RepositoryAcquiringStrategy strategy)
public Object getAttribute(String name, int scope)
Context
name
- to which value is associated toscope
- the scope (request, session, application)
public Map<String,Object> getAttributes(int scope)
Context
public void removeAttribute(String name, int scope)
Context
public void setAttribute(String name, Object value, int scope)
Context
name
- is used as a keyscope
- , highest level of scope from which this attribute is visiblepublic AccessManager getAccessManager(String repositoryId, String workspaceId)
Context
public HierarchyManager getHierarchyManager(String repositoryId, String workspaceId)
Context
public QueryManager getQueryManager(String repositoryId, String workspaceId)
Context
public Object getAttribute(String name)
name
- to which value is associated to
public Map<String,Object> getAttributes()
public Locale getLocale()
Context.getLocale()
public void setLocale(Locale locale)
public Messages getMessages()
public Messages getMessages(String basename)
basename
- name of the bundle
TODO: This duplicates methods from MessagesManager : remove eitherpublic HierarchyManager getHierarchyManager(String repositoryId)
Context
public AccessManager getAccessManager(String repositoryId)
Context
public QueryManager getQueryManager(String repositoryId)
Context
public Object get(Object key)
get
in interface Map
public Object put(Object key, Object value)
put
in interface Map
public void clear()
clear
in interface Map
public boolean containsValue(Object value)
containsValue
in interface Map
public Set<Map.Entry<String,Object>> entrySet()
entrySet
in interface Map
public boolean isEmpty()
isEmpty
in interface Map
public Set<String> keySet()
keySet
in interface Map
public void putAll(Map map)
putAll
in interface Map
public Object remove(Object key)
remove
in interface Map
public Collection<Object> values()
values
in interface Map
public boolean containsKey(Object arg0)
containsKey
in interface Map
public int size()
size
in interface Map
public void release()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |