|
||||||||||
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 |
---|
java.util.Map.Entry<K,V> |
Field Summary | |
---|---|
protected java.util.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(java.lang.Object arg0)
|
boolean |
containsValue(java.lang.Object value)
This implementation is very slow! |
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> |
entrySet()
|
java.lang.Object |
get(java.lang.Object key)
|
AccessManager |
getAccessManager(java.lang.String repositoryId)
Get access manager for the specified repository on default workspace. |
AccessManager |
getAccessManager(java.lang.String repositoryId,
java.lang.String workspaceId)
Get access manager for the specified repository on the specified workspace. |
java.lang.Object |
getAttribute(java.lang.String name)
Get the attribute value. |
java.lang.Object |
getAttribute(java.lang.String name,
int scope)
Get attribute value. |
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes()
Merge the scopes maps. |
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes(int scope)
Get a map of a attributes set in the scope. |
AttributeStrategy |
getAttributeStrategy()
|
HierarchyManager |
getHierarchyManager(java.lang.String repositoryId)
Get hierarchy manager initialized for this user. |
HierarchyManager |
getHierarchyManager(java.lang.String repositoryId,
java.lang.String workspaceId)
Get hierarchy manager initialized for this user. |
java.util.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(java.lang.String basename)
TODO: This duplicates methods from MessagesManager : remove either. |
QueryManager |
getQueryManager(java.lang.String repositoryId)
Get QueryManager created for this user on the specified repository. |
QueryManager |
getQueryManager(java.lang.String repositoryId,
java.lang.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()
|
java.util.Set<java.lang.String> |
keySet()
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
void |
putAll(java.util.Map map)
|
void |
release()
Release any resource used by this Context (e.g. |
java.lang.Object |
remove(java.lang.Object key)
|
void |
removeAttribute(java.lang.String name,
int scope)
Remove an attribute. |
void |
setAttribute(java.lang.String name,
java.lang.Object value,
int scope)
Set attribute value, scope of the attribute is defined. |
void |
setAttributeStrategy(AttributeStrategy strategy)
|
void |
setLocale(java.util.Locale locale)
|
void |
setRepositoryStrategy(RepositoryAcquiringStrategy strategy)
|
int |
size()
|
java.util.Collection<java.lang.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 java.util.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 java.lang.Object getAttribute(java.lang.String name, int scope)
Context
name
- to which value is associated toscope
- the scope (request, session, application)
public java.util.Map<java.lang.String,java.lang.Object> getAttributes(int scope)
Context
public void removeAttribute(java.lang.String name, int scope)
Context
public void setAttribute(java.lang.String name, java.lang.Object value, int scope)
Context
name
- is used as a keyscope
- , highest level of scope from which this attribute is visiblepublic AccessManager getAccessManager(java.lang.String repositoryId, java.lang.String workspaceId)
Context
public HierarchyManager getHierarchyManager(java.lang.String repositoryId, java.lang.String workspaceId)
Context
public QueryManager getQueryManager(java.lang.String repositoryId, java.lang.String workspaceId)
Context
public java.lang.Object getAttribute(java.lang.String name)
name
- to which value is associated to
public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
public java.util.Locale getLocale()
Context.getLocale()
public void setLocale(java.util.Locale locale)
public Messages getMessages()
public Messages getMessages(java.lang.String basename)
basename
- name of the bundle
TODO: This duplicates methods from MessagesManager : remove eitherpublic HierarchyManager getHierarchyManager(java.lang.String repositoryId)
Context
public AccessManager getAccessManager(java.lang.String repositoryId)
Context
public QueryManager getQueryManager(java.lang.String repositoryId)
Context
public java.lang.Object get(java.lang.Object key)
get
in interface java.util.Map
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in interface java.util.Map
public void clear()
clear
in interface java.util.Map
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
entrySet
in interface java.util.Map
public boolean isEmpty()
isEmpty
in interface java.util.Map
public java.util.Set<java.lang.String> keySet()
keySet
in interface java.util.Map
public void putAll(java.util.Map map)
putAll
in interface java.util.Map
public java.lang.Object remove(java.lang.Object key)
remove
in interface java.util.Map
public java.util.Collection<java.lang.Object> values()
values
in interface java.util.Map
public boolean containsKey(java.lang.Object arg0)
containsKey
in interface java.util.Map
public int size()
size
in interface java.util.Map
public void release()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |