Interface RestrictedModelItem<T>
- Type Parameters:
T
- Type of object on which the restrictions are applied
- All Superinterfaces:
Comparable<ModelItem>
,Labelable
,ModelItem
,ModifiableLabelable
- All Known Implementing Classes:
AttributeDefinition
,ContentAttributeDefinition
,ContentRestrictedCompositeDefinition
,ContentRestrictedRepeaterDefinition
,RichTextAttributeDefinition
Interface for model items with restrictions
-
Field Summary
Fields inherited from interface org.ametys.runtime.model.ModelItem
ITEM_PATH_SEPARATOR
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Determines if the object can be read by the definitionboolean
Determines if the object can be written by the definitionGet the restriction for the model itemvoid
setRestriction
(Restriction restriction) Set the restriction for the model itemMethods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.ametys.runtime.util.Labelable
getDescription, getLabel, getName
Methods inherited from interface org.ametys.runtime.model.ModelItem
addItemChecker, getDisableConditions, getItemCheckers, getModel, getParent, getPath, getPluginName, getType, getWidget, getWidgetParameters, setDisableConditions, setModel, setParent, setPluginName, setType, setWidget, setWidgetParameters, toJSON, toSAX
Methods inherited from interface org.ametys.runtime.util.ModifiableLabelable
setDescription, setLabel, setName
-
Method Details
-
setRestriction
Set the restriction for the model item- Parameters:
restriction
- the restriction to set
-
getRestriction
Get the restriction for the model item- Returns:
- The class for restriction or null if there is no restriction
-
canRead
Determines if the object can be read by the definition- Parameters:
object
- the object- Returns:
- true if the object can be read by the definition, false otherwise
-
canWrite
Determines if the object can be written by the definition- Parameters:
object
- the object- Returns:
- true if the object can be written by the definition, false otherwise
-