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.void
configure
(Configuration configuration) void
service
(ServiceManager smanager) Methods inherited from class org.ametys.cms.model.restrictions.DefaultRestriction
_hasRights, _isInWorkflowStep, canWrite
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
SharedOnlyRestriction
public SharedOnlyRestriction()
-
-
Method Details
-
configure
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classDefaultRestriction
- Throws:
ConfigurationException
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classDefaultRestriction
- Throws:
ServiceException
-
canRead
Description copied from interface:Restriction
Determine whether a model item can be read at this time.- Specified by:
canRead
in interfaceRestriction
- Overrides:
canRead
in 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
-