Class StringRightAssignmentContext
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.ui.StaticFileImportsClientSideElement
org.ametys.core.ui.StaticClientSideElement
org.ametys.core.right.AbstractStaticRightAssignmentContext
org.ametys.plugins.core.impl.right.StringRightAssignmentContext
- All Implemented Interfaces:
RightAssignmentContext
,ClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Contextualizable
,Serviceable
- Direct Known Subclasses:
ContentTypeRightAssignmentContext
,ExtractionRightAssignmentContext
,WebStringRightAssignmentContext
RightAssignmentContext
for assign rights to a configured context-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
Nested classes/interfaces inherited from interface org.ametys.core.right.RightAssignmentContext
RightAssignmentContext.ContextInfo
-
Field Summary
Fields inherited from class org.ametys.core.right.AbstractStaticRightAssignmentContext
_context, _isPrivate, _label, _reverseWorkspaceMather, _workspaceMatcher
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
Fields inherited from interface org.ametys.core.right.RightAssignmentContext
CONTEXT_LABEL_PATH_SEPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvertJSContext
(Object context) From a JavaScript context object, converts it into a Java objectgetContextIdentifier
(Object context) Gets the identifier of the object contextgetContextInfo
(Object context) Get info about the context and its right assignment context.getParentContexts
(Object context) Get the parent contexts of the object contextgetRootContexts
(Map<String, Object> contextParameters) Get the list of root contexts if the current workspace matches the allowed workspaceboolean
isSupportedContext
(Object context, Map<String, Object> contextualParameters) Indicate for a given context, if this RightAssignmentContext is able to handle it.Methods inherited from class org.ametys.core.right.AbstractStaticRightAssignmentContext
configure, contextualize, getScripts, isPrivate, matchWorkspace, showInUserProfilesTool
Methods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureClass, _configureParameters, _configureScript, configureInitialParameters
Methods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, getDependencies, getId, getPluginName, getRights, getScripts, hasRight, service, setPluginInfo, toString
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.ametys.core.ui.ClientSideElement
getDependencies, getId, getPluginName, getRights, getScripts
-
Constructor Details
-
StringRightAssignmentContext
public StringRightAssignmentContext()
-
-
Method Details
-
convertJSContext
Description copied from interface:RightAssignmentContext
From a JavaScript context object, converts it into a Java object- Parameters:
context
- the JS context object- Returns:
- the Java object
-
getContextIdentifier
Description copied from interface:RightAssignmentContext
Gets the identifier of the object context- Parameters:
context
- The object context- Returns:
- the identifier of the object context
-
getParentContexts
Description copied from interface:RightAssignmentContext
Get the parent contexts of the object context- Parameters:
context
- The object context- Returns:
- The parents if exist or
null
otherwise
-
getRootContexts
Description copied from interface:RightAssignmentContext
Get the list of root contexts if the current workspace matches the allowed workspace- Parameters:
contextParameters
- The contextual parameters- Returns:
- The root context object in a list
-
isSupportedContext
Description copied from interface:RightAssignmentContext
Indicate for a given context, if this RightAssignmentContext is able to handle it. This method should only be call if the result ofRightAssignmentContext.matchWorkspace(java.util.Map<java.lang.String, java.lang.Object>)
for the given contextual parameters is true. Otherwise the behavior of the method is not defined. Note that the result of this method should be in coherence with the list of item displayed by in the assignment tool.- Parameters:
context
- a contextcontextualParameters
- the application context- Returns:
- true if the context is supported
-
getContextInfo
Description copied from interface:RightAssignmentContext
Get info about the context and its right assignment context. Note : this method returns info about the context and the right assignment context to allow implementations to emulate different right assignment contexts based on the context- Parameters:
context
- a context object. The context object must be supported (seeRightAssignmentContext.isSupportedContext(java.lang.Object, java.util.Map<java.lang.String, java.lang.Object>)
).- Returns:
- Info about the context and the right assignment context
-