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:
Property
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classPropagationConstraint.AddConstraintDefines the behavior for an 'add' operation.static classPropagationConstraint.DeleteConstraintDefines the behavior for a 'delete' operation.static classPropagationConstraint.RemoveConstraintDefines the behavior for a 'remove' from context operation.
-
Field Summary
Fields Modifier and Type Field Description static StringADD_PROPERTYThe property name for the 'add' constraint.static StringDELETE_PROPERTYThe property name for the 'delete' constraint.static StringNAMEThe name of the PropagationConstraint property type.static StringREMOVE_PROPERTYThe property name for the 'remove' constraint.-
Fields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, TYPE_PROPERTY
-
Fields inherited from interface org.gcube.informationsystem.model.reference.ModelElement
EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PropagationConstraint.AddConstraintgetAddConstraint()Returns the propagation constraint for the 'add' operation.PropagationConstraint.DeleteConstraintgetDeleteConstraint()Returns the propagation constraint for the 'delete' operation.PropagationConstraint.RemoveConstraintgetRemoveConstraint()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
getTypeName
-
Methods inherited from interface org.gcube.informationsystem.model.reference.ModelElement
getExpectedtype, getSupertypes
-
Methods inherited from interface org.gcube.informationsystem.model.reference.properties.Property
getAdditionalProperties, getAdditionalProperty, setAdditionalProperties, setAdditionalProperty
-
-
-
-
Field Detail
-
NAME
static final String NAME
The name of the PropagationConstraint property type.- See Also:
- Constant Field Values
-
ADD_PROPERTY
static final String ADD_PROPERTY
The property name for the 'add' constraint.- See Also:
- Constant Field Values
-
DELETE_PROPERTY
static final String DELETE_PROPERTY
The property name for the 'delete' constraint.- See Also:
- Constant Field Values
-
REMOVE_PROPERTY
static final String REMOVE_PROPERTY
The property name for the 'remove' constraint.- See Also:
- Constant Field Values
-
-
Method Detail
-
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
void setAddConstraint(PropagationConstraint.AddConstraint addConstraint)
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
void setDeleteConstraint(PropagationConstraint.DeleteConstraint deleteConstraint)
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
void setRemoveConstraint(PropagationConstraint.RemoveConstraint removeConstraint)
Sets the propagation constraint for the 'remove' operation.- Parameters:
removeConstraint- ThePropagationConstraint.RemoveConstraintto set.
-
-