Package org.ametys.odf.restriction
Class SharedOnlyRestriction
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.cms.model.restrictions.DefaultRestriction
org.ametys.odf.restriction.SharedOnlyRestriction
- All Implemented Interfaces:
Restriction,LogEnabled,Component,Configurable,Serviceable
- Direct Known Subclasses:
RepeaterWithEducationalPathRestriction
Restrictions for data that should be available only when the element is shared.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.cms.model.restrictions.Restriction
Restriction.RestrictionResult -
Field Summary
Fields inherited from class org.ametys.cms.model.restrictions.DefaultRestriction
_currentUserProvider, _rightManager, _workflowProvider, _writeRightIds -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncanRead(Content content, RestrictedModelItem modelItem) Determine whether a model item can be read at this time.voidconfigure(Configuration configuration) voidservice(ServiceManager smanager) Methods inherited from class org.ametys.cms.model.restrictions.DefaultRestriction
_hasRights, _isInWorkflowStep, canWriteMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
SharedOnlyRestriction
public SharedOnlyRestriction()
-
-
Method Details
-
configure
- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classDefaultRestriction- Throws:
ConfigurationException
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classDefaultRestriction- Throws:
ServiceException
-
canRead
Description copied from interface:RestrictionDetermine whether a model item can be read at this time.- Specified by:
canReadin interfaceRestriction- Overrides:
canReadin 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
-