|
||||||||||
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_POSSIBLE_CSRF, 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 workspace)
Get a an AccessManager for logical entities. |
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 workspaceName)
Get hierarchy manager initialized for this user. |
javax.jcr.Session |
getJCRSession(String workspaceName)
|
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 workspaceName)
Get QueryManager created for this user on the specified repository. |
JCRSessionStrategy |
getRepositoryStrategy()
|
Subject |
getSubject()
|
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. jcr sessions). |
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(JCRSessionStrategy 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 Subject getSubject()
public AttributeStrategy getAttributeStrategy()
public void setAttributeStrategy(AttributeStrategy strategy)
public JCRSessionStrategy getRepositoryStrategy()
public void setRepositoryStrategy(JCRSessionStrategy 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 workspace)
Context
AccessManager
for logical entities. The accesses to the repository are handled by the repository itself.
public javax.jcr.Session getJCRSession(String workspaceName) throws javax.jcr.LoginException, javax.jcr.RepositoryException
javax.jcr.LoginException
javax.jcr.RepositoryException
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 workspaceName)
Context
public QueryManager getQueryManager(String workspaceName)
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 |