Package org.ametys.odf.restriction
Class RepeaterWithEducationalPathRestriction
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.cms.model.restrictions.DefaultRestriction
org.ametys.odf.restriction.SharedOnlyRestriction
org.ametys.odf.restriction.RepeaterWithEducationalPathRestriction
- All Implemented Interfaces:
Restriction,LogEnabled,Initializable,Component,Configurable,Contextualizable,Serviceable
- Direct Known Subclasses:
RepeaterWithEducationalPathRestriction
public class RepeaterWithEducationalPathRestriction
extends SharedOnlyRestriction
implements Contextualizable, Initializable
Restrictions for a repeater with educational path or for data in a repeater with educational
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.cms.model.restrictions.Restriction
Restriction.RestrictionResult -
Field Summary
FieldsModifier and TypeFieldDescriptionThe fields handled by this restrictionFields inherited from class org.ametys.cms.model.restrictions.DefaultRestriction
_currentUserProvider, _rightManager, _workflowProvider, _writeRightIds -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidEnsure the configuration of write rights is correctprotected boolean_hasRights(Content content, RestrictedModelItem modelItem, Set<String> rightLimitations) Check if current user has the given rights.canWrite(Content content, RestrictedModelItem modelItem) Determine whether a model item can be written at this time.voidconfigure(Configuration configuration) voidcontextualize(Context context) voidMethods inherited from class org.ametys.odf.restriction.SharedOnlyRestriction
canRead, serviceMethods inherited from class org.ametys.cms.model.restrictions.DefaultRestriction
_isInWorkflowStepMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_fields
The fields handled by this restriction
-
-
Constructor Details
-
RepeaterWithEducationalPathRestriction
-
-
Method Details
-
configure
- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classSharedOnlyRestriction- Throws:
ConfigurationException
-
_checkWriteRights
Ensure the configuration of write rights is correct- Throws:
ConfigurationException- If the configuration is incorrect
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
initialize
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
canWrite
Description copied from interface:RestrictionDetermine whether a model item can be written at this time.- Specified by:
canWritein interfaceRestriction- Overrides:
canWritein classDefaultRestriction- Parameters:
content- The content where item is to be written on. Can be null, on content creation.modelItem- the model item on which check the restrictions- Returns:
- The restriction result
-
_hasRights
protected boolean _hasRights(Content content, RestrictedModelItem modelItem, Set<String> rightLimitations) Description copied from class:DefaultRestrictionCheck if current user has the given rights.- Overrides:
_hasRightsin classDefaultRestriction- Parameters:
content- the content.modelItem- the model item on which check the restrictionsrightLimitations- the right limitations.- Returns:
trueif user has at least one right,falseotherwise.
-