Package org.ametys.core.right
Class AbstractStaticRightAssignmentContext
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.ui.StaticFileImportsClientSideElement
org.ametys.core.ui.StaticClientSideElement
org.ametys.core.right.AbstractStaticRightAssignmentContext
- All Implemented Interfaces:
RightAssignmentContext,ClientSideElement,LogEnabled,PluginAware,Configurable,Contextualizable,Serviceable
- Direct Known Subclasses:
CartRightAssignmentContext,ContentRightAssignmentContext,FormsDirectoryRightAssignmentContext,LinkDirectoryRightAssignmentContext,PageRightAssignmentContext,QueriesDirectoryRightAssignmentContext,ReferenceTableRightAssignmentContext,ResourceRightAssignmentContext,StringRightAssignmentContext,SurveyRightAssignmentContext,SynchronizeContentRightAssignmentContext
public abstract class AbstractStaticRightAssignmentContext
extends StaticClientSideElement
implements RightAssignmentContext, Contextualizable
This static impl is a static client side element that take care that the current workspace matches a configured regexp
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContextThe avalon contextprotected booleanThe private propertyprotected I18nizableTextThe right assignment context labelprotected booleanConsider _workspaceMatcher negativelyprotected PatternThe regexp that should match current workspaceFields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(Configuration configuration) voidcontextualize(Context context) getScripts(boolean ignoreRights, Map<String, Object> contextParameters) This method return the scripts that will be used on client side.booleanDetermines if this rights assignment context is a private contextbooleanmatchWorkspace(Map<String, Object> contextParameters) Determines if the right assignment context is available in the current application contextMethods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureClass, _configureParameters, _configureScript, configureInitialParametersMethods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, getDependencies, getId, getPluginName, getRights, getScripts, hasRight, service, setPluginInfo, toStringMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ametys.core.ui.ClientSideElement
getDependencies, getId, getPluginName, getRights, getScriptsMethods inherited from interface org.ametys.core.right.RightAssignmentContext
convertJSContext, getContextIdentifier, getParentContexts, getRootContexts
-
Field Details
-
_isPrivate
The private property -
_context
The avalon context -
_workspaceMatcher
The regexp that should match current workspace -
_reverseWorkspaceMather
Consider _workspaceMatcher negatively -
_label
The right assignment context label
-
-
Constructor Details
-
AbstractStaticRightAssignmentContext
public AbstractStaticRightAssignmentContext()
-
-
Method Details
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
configure
- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classStaticFileImportsClientSideElement- Throws:
ConfigurationException
-
getScripts
public List<ClientSideElement.Script> getScripts(boolean ignoreRights, Map<String, Object> contextParameters) Description copied from interface:ClientSideElementThis method return the scripts that will be used on client side. This class will be parametrized by initial and current parameters.- Specified by:
getScriptsin interfaceClientSideElement- Overrides:
getScriptsin classStaticFileImportsClientSideElement- Parameters:
ignoreRights- True to ignore the rights verification.contextParameters- Contextuals parameters transmitted by the environment.- Returns:
- The list of scripts or an empty list.
-
isPrivate
Description copied from interface:RightAssignmentContextDetermines if this rights assignment context is a private context- Specified by:
isPrivatein interfaceRightAssignmentContext- Returns:
- true if is private
-
matchWorkspace
Description copied from interface:RightAssignmentContextDetermines if the right assignment context is available in the current application context- Specified by:
matchWorkspacein interfaceRightAssignmentContext- Parameters:
contextParameters- The contextual parameters- Returns:
- true if the current workspace matches
-