Interface PropagationConstraint
- All Superinterfaces:
Element,ModelElement,Property,PropertyElement,SchemaMixedElement,Serializable
- All Known Implementing Classes:
PropagationConstraintImpl
@TypeMetadata(name="PropagationConstraint",
description="This type provides propagation constraint for Relation",
version="1.1.0")
@Change(version="1.1.0",description="Added \'delete\' propagation constraint") @Change(version="1.0.0",description="First Version")
public interface PropagationConstraint
extends Property
Defines the propagation behavior for a relation when context-related events
(add, remove, delete) occur on the source entity or the relation itself.
The default propagation constraints are:
- IsRelatedTo: delete=keep, remove=keep, add=unpropagate
- ConsistsOf: delete=cascade, remove=cascade, add=propagate
- Author:
- Luca Frosini (ISTI - CNR)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumDefines the behavior for an 'add' operation.static enumDefines the behavior for a 'delete' operation.static enumDefines the behavior for a 'remove' from context operation. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe property name for the 'add' constraint.static final StringThe property name for the 'delete' constraint.static final StringThe name of the PropagationConstraint property type.static final StringThe property name for the 'remove' constraint.Fields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, TYPE_PROPERTYFields inherited from interface org.gcube.informationsystem.model.reference.ModelElement
EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY -
Method Summary
Modifier and TypeMethodDescriptionReturns the propagation constraint for the 'add' operation.Returns the propagation constraint for the 'delete' operation.Returns the propagation constraint for the 'remove' operation.voidsetAddConstraint(PropagationConstraint.AddConstraint addConstraint) Sets the propagation constraint for the 'add' operation.voidsetDeleteConstraint(PropagationConstraint.DeleteConstraint deleteConstraint) Sets the propagation constraint for the 'delete' operation.voidsetRemoveConstraint(PropagationConstraint.RemoveConstraint removeConstraint) Sets the propagation constraint for the 'remove' operation.Methods inherited from interface org.gcube.informationsystem.base.reference.Element
getTypeNameMethods inherited from interface org.gcube.informationsystem.model.reference.ModelElement
getExpectedtype, getSupertypesMethods inherited from interface org.gcube.informationsystem.model.reference.properties.Property
getAdditionalProperties, getAdditionalProperty, setAdditionalProperties, setAdditionalProperty
-
Field Details
-
NAME
The name of the PropagationConstraint property type.- See Also:
-
ADD_PROPERTY
The property name for the 'add' constraint.- See Also:
-
DELETE_PROPERTY
The property name for the 'delete' constraint.- See Also:
-
REMOVE_PROPERTY
The property name for the 'remove' constraint.- See Also:
-
-
Method Details
-
getAddConstraint
@ISProperty(name="add", description="It indicates the behaviour to implement for the target Entity when an \'add\' action is performed on the source Resource. Add action is the operation of adding an instance to a context.", mandatory=true, nullable=false) PropagationConstraint.AddConstraint getAddConstraint()Returns the propagation constraint for the 'add' operation.- Returns:
- The
PropagationConstraint.AddConstraint.
-
setAddConstraint
Sets the propagation constraint for the 'add' operation.- Parameters:
addConstraint- ThePropagationConstraint.AddConstraintto set.
-
getDeleteConstraint
@ISProperty(name="delete", description="It indicates the behaviour to implement for the target Entity when a \'delete\' action is performed on the source Resource. Delet action is the operation of deleting an instance (it has an impact on all contexts).", mandatory=true, nullable=false) PropagationConstraint.DeleteConstraint getDeleteConstraint()Returns the propagation constraint for the 'delete' operation.- Returns:
- The
PropagationConstraint.DeleteConstraint.
-
setDeleteConstraint
Sets the propagation constraint for the 'delete' operation.- Parameters:
deleteConstraint- ThePropagationConstraint.DeleteConstraintto set.
-
getRemoveConstraint
@ISProperty(name="remove", description="It indicates the behaviour to implement for the target Entity when a \'remove\' action is performed on the source Resource. Remove actions is the operation of removing an instance from a context.", mandatory=true, nullable=false) PropagationConstraint.RemoveConstraint getRemoveConstraint()Returns the propagation constraint for the 'remove' operation.- Returns:
- The
PropagationConstraint.RemoveConstraint.
-
setRemoveConstraint
Sets the propagation constraint for the 'remove' operation.- Parameters:
removeConstraint- ThePropagationConstraint.RemoveConstraintto set.
-