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
Modifier and TypeFieldDescriptionprotected Context
The avalon contextprotected boolean
The private propertyprotected boolean
Consider _workspaceMatcher negativelyprotected Pattern
The 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Configuration configuration) void
contextualize
(Context context) getScripts
(boolean ignoreRights, 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 contextprotected boolean
matchWorkspace
(Map<String, Object> contextParameters) Determines if the current workspace matches the configured workspace regexpMethods 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
Methods 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
-
-
Constructor Details
-
AbstractStaticRightAssignmentContext
public AbstractStaticRightAssignmentContext()
-
-
Method Details
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classStaticFileImportsClientSideElement
- Throws:
ConfigurationException
-
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
- Overrides:
getScripts
in 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:RightAssignmentContext
Determines if this rights assignment context is a private context- Specified by:
isPrivate
in interfaceRightAssignmentContext
- Returns:
- true if is private
-
matchWorkspace
Determines if the current workspace matches the configured workspace regexp- Parameters:
contextParameters
- The contextual parameters- Returns:
- true if the current workspace matches
-