Class RegisteredConstraint
java.lang.Object
org.alfresco.repo.dictionary.constraint.RegisteredConstraint
- All Implemented Interfaces:
Constraint
Constraint implementation that defers to constraints registered with the
static instance of the
ConstraintRegistry.- Author:
- Derek Hulley
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDefers to the registered constraintDefers to the registered constraintGets the constraint name.getTitle()Defers to the registered constraintgetType()Defers to the registered constraintvoidInitializes the constraint with appropriate values, which will depend on the implementation itself.voidsetRegisteredName(String registeredName) Set the name of the constraint that will be used to look up the constraint that will be delegated to.voidsetShortName(String shortName) toString()
-
Constructor Details
-
RegisteredConstraint
public RegisteredConstraint()
-
-
Method Details
-
toString
-
getShortName
Description copied from interface:ConstraintGets the constraint name.- Specified by:
getShortNamein interfaceConstraint- Returns:
- the constraint name.
-
setShortName
-
setRegisteredName
Set the name of the constraint that will be used to look up the constraint that will be delegated to. -
initialize
public void initialize()Description copied from interface:ConstraintInitializes the constraint with appropriate values, which will depend on the implementation itself. This method can be implemented as a once-off, i.e. reinitialization does not have to be supported.- Specified by:
initializein interfaceConstraint
-
getRegisteredConstraint
- Returns:
- the constraint that matches the registered name
-
getType
Defers to the registered constraint- Specified by:
getTypein interfaceConstraint- Returns:
- The type
-
getTitle
Defers to the registered constraint- Specified by:
getTitlein interfaceConstraint- Returns:
- the human-readable constraint title (optional)
-
getParameters
Defers to the registered constraint- Specified by:
getParametersin interfaceConstraint- Returns:
- Map of parameters or an empty Map if none exist
-
evaluate
Defers to the registered constraint- Specified by:
evaluatein interfaceConstraint- Parameters:
value- the property value to check
-