|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Context
This interface defines all the methods which should be implemented by any configured magnolia context. Implementing class should never be accessible directly but only via MgnlContext static methods which work on a local (Thread) copy of the implementation.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Field Summary | |
---|---|
static int |
APPLICATION_SCOPE
Attribute visibility scope, its visible to all sessions of this application. |
static String |
ATTRIBUTE_COMMENT
|
static String |
ATTRIBUTE_EXCEPTION
|
static String |
ATTRIBUTE_MESSAGE
|
static String |
ATTRIBUTE_PATH
|
static String |
ATTRIBUTE_RECURSIVE
|
static String |
ATTRIBUTE_REPOSITORY
|
static String |
ATTRIBUTE_UUID
|
static String |
ATTRIBUTE_VERSION
|
static String |
ATTRIBUTE_VERSION_MAP
|
static int |
LOCAL_SCOPE
Attribute visibility scope. |
static int |
SESSION_SCOPE
Attribute visibility scope Shared by all requests from this session. |
Method Summary | |
---|---|
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 attribute value without passing a scope. |
Object |
getAttribute(String name,
int scope)
Get attribute value. |
Map<String,Object> |
getAttributes()
Get an over all map. |
Map<String,Object> |
getAttributes(int scope)
Get a map of a attributes set in the scope. |
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()
Get the current locale. |
Messages |
getMessages()
Get the default messages. |
Messages |
getMessages(String basename)
Get the messages of the named bundle. |
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. |
User |
getUser()
If this is not a UserContext this method will very likely return the system user. |
void |
release()
Release any resource used by this Context (e.g. |
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 |
setLocale(Locale locale)
|
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Field Detail |
---|
static final int LOCAL_SCOPE
static final int SESSION_SCOPE
static final int APPLICATION_SCOPE
static final String ATTRIBUTE_REPOSITORY
static final String ATTRIBUTE_PATH
static final String ATTRIBUTE_VERSION
static final String ATTRIBUTE_VERSION_MAP
static final String ATTRIBUTE_UUID
static final String ATTRIBUTE_RECURSIVE
static final String ATTRIBUTE_COMMENT
static final String ATTRIBUTE_MESSAGE
static final String ATTRIBUTE_EXCEPTION
Method Detail |
---|
User getUser()
void setLocale(Locale locale)
locale
- Locale getLocale()
HierarchyManager getHierarchyManager(String repositoryId)
repositoryId
-
HierarchyManager getHierarchyManager(String repositoryId, String workspaceId)
repositoryId
- workspaceId
-
AccessManager getAccessManager(String repositoryId)
repositoryId
-
AccessManager getAccessManager(String repositoryId, String workspaceId)
repositoryId
- workspaceId
-
QueryManager getQueryManager(String repositoryId)
repositoryId
-
QueryManager getQueryManager(String repositoryId, String workspaceId)
repositoryId
- workspaceId
-
void setAttribute(String name, Object value, int scope)
name
- is used as a keyvalue
- scope
- , highest level of scope from which this attribute is visibleObject getAttribute(String name, int scope)
name
- to which value is associated toscope
- the scope (request, session, application)
Object getAttribute(String name)
name
- to which value is associated to
Map<String,Object> getAttributes(int scope)
scope
-
void removeAttribute(String name, int scope)
name
- scope
- Map<String,Object> getAttributes()
Messages getMessages()
Messages getMessages(String basename)
basename
- name of the bundle
TODO: This duplicates methods from MessagesManager : remove eithervoid release()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |