Class ACLAmetysObjectRightAssignmentContext
java.lang.Object
org.ametys.plugins.repository.rights.ACLAmetysObjectRightAssignmentContext
- All Implemented Interfaces:
RightAssignmentContext
,ClientSideElement
,PluginAware
,Serviceable
public class ACLAmetysObjectRightAssignmentContext
extends Object
implements RightAssignmentContext, Serviceable, PluginAware
Private
This implementation can be used to get a
It is not supposed to be available to get or set assignments.
RightAssignmentContext
for ACLAmetysObject
.This implementation can be used to get a
ACLAmetysObject
from a JS context.It is not supposed to be available to get or set assignments.
-
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
Modifier and TypeFieldDescriptionprotected AmetysObjectResolver
The Ametys object resolverstatic final String
The id if this right contextFields inherited from interface org.ametys.core.right.RightAssignmentContext
CONTEXT_LABEL_PATH_SEPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvertJSContext
(Object jsContext) 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.This method returns the list of dependencies, sorted by extension point.getId()
Get the id of the element.getParentContexts
(Object context) Get the parent contexts of the object contextGet the plugin name where the control was declaredThis method return the right that will be needed on client side.getRootContexts
(Map<String, Object> contextParameters) Get the list of root contexts if the current workspace matches the allowed workspacegetScripts
(boolean ignoreRights, Map<String, Object> contextParameters) This method return the scripts that will be used on client side.getScripts
(Map<String, Object> contextParameters) This method return the scripts that will be used on client side.boolean
Determines if this rights assignment context is a private contextboolean
isSupportedContext
(Object context, Map<String, Object> contextualParameters) Indicate for a given context, if this RightAssignmentContext is able to handle it.void
service
(ServiceManager smanager) void
setPluginInfo
(String pluginName, String featureName, String id) Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.boolean
Determines if this right assignment context should be visible in the user profiles toolMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.core.right.RightAssignmentContext
matchWorkspace
-
Field Details
-
ID
The id if this right context- See Also:
-
_resolver
The Ametys object resolver
-
-
Constructor Details
-
ACLAmetysObjectRightAssignmentContext
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
setPluginInfo
Description copied from interface:PluginAware
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfo
in interfacePluginAware
- Parameters:
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this component
-
getId
Description copied from interface:ClientSideElement
Get the id of the element.- Specified by:
getId
in interfaceClientSideElement
- Returns:
- the id. Can not be null.
-
isPrivate
Description copied from interface:RightAssignmentContext
Determines if this rights assignment context is a private context- Specified by:
isPrivate
in interfaceRightAssignmentContext
- Returns:
- true if is private
-
showInUserProfilesTool
Description copied from interface:RightAssignmentContext
Determines if this right assignment context should be visible in the user profiles tool- Specified by:
showInUserProfilesTool
in interfaceRightAssignmentContext
- Returns:
- true if the right assignment should be visible
-
convertJSContext
Description copied from interface:RightAssignmentContext
From a JavaScript context object, converts it into a Java object- Specified by:
convertJSContext
in interfaceRightAssignmentContext
- Parameters:
jsContext
- the JS context object- Returns:
- the Java object
-
getContextIdentifier
Description copied from interface:RightAssignmentContext
Gets the identifier of the object context- Specified by:
getContextIdentifier
in interfaceRightAssignmentContext
- 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- Specified by:
getParentContexts
in interfaceRightAssignmentContext
- 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- Specified by:
getRootContexts
in interfaceRightAssignmentContext
- 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.- Specified by:
isSupportedContext
in interfaceRightAssignmentContext
- 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- Specified by:
getContextInfo
in interfaceRightAssignmentContext
- 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
-
getScripts
Description copied from interface:ClientSideElement
This method return the scripts that will be used on client side. This class will be parametrized by initial and current parameters.- Specified by:
getScripts
in interfaceClientSideElement
- Parameters:
contextParameters
- Contextuals parameters transmitted by the environment.- Returns:
- The list of scripts or an empty list.
-
getScripts
public List<ClientSideElement.Script> getScripts(boolean ignoreRights, Map<String, Object> contextParameters) Description copied from interface:ClientSideElement
This method return the scripts that will be used on client side. This class will be parametrized by initial and current parameters.- Specified by:
getScripts
in interfaceClientSideElement
- Parameters:
ignoreRights
- True to ignore the rights verification.contextParameters
- Contextuals parameters transmitted by the environment.- Returns:
- The list of scripts or an empty list.
-
getRights
Description copied from interface:ClientSideElement
This method return the right that will be needed on client side. This class will be parametrized by initial and current parameters.- Specified by:
getRights
in interfaceClientSideElement
- Parameters:
contextParameters
- Contextuals parameters transmitted by the environment.- Returns:
- The rights in a Map of (rightId, context). Can be empty.
-
getPluginName
Description copied from interface:ClientSideElement
Get the plugin name where the control was declared- Specified by:
getPluginName
in interfaceClientSideElement
- Returns:
- The plugin name. Can not be null.
-
getDependencies
Description copied from interface:ClientSideElement
This method returns the list of dependencies, sorted by extension point.- Specified by:
getDependencies
in interfaceClientSideElement
- Returns:
- a map of dependencies ids by extension point.
-