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 TypeMethodDescriptionvoid
Defers to the registered constraintDefers to the registered constraintGets the constraint name.getTitle()
Defers to the registered constraintgetType()
Defers to the registered constraintvoid
Initializes the constraint with appropriate values, which will depend on the implementation itself.void
setRegisteredName
(String registeredName) Set the name of the constraint that will be used to look up the constraint that will be delegated to.void
setShortName
(String shortName) toString()
-
Constructor Details
-
RegisteredConstraint
public RegisteredConstraint()
-
-
Method Details
-
toString
-
getShortName
Description copied from interface:Constraint
Gets the constraint name.- Specified by:
getShortName
in 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:Constraint
Initializes 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:
initialize
in interfaceConstraint
-
getRegisteredConstraint
- Returns:
- the constraint that matches the registered name
-
getType
Defers to the registered constraint- Specified by:
getType
in interfaceConstraint
- Returns:
- The type
-
getTitle
Defers to the registered constraint- Specified by:
getTitle
in interfaceConstraint
- Returns:
- the human-readable constraint title (optional)
-
getParameters
Defers to the registered constraint- Specified by:
getParameters
in interfaceConstraint
- Returns:
- Map of parameters or an empty Map if none exist
-
evaluate
Defers to the registered constraint- Specified by:
evaluate
in interfaceConstraint
- Parameters:
value
- the property value to check
-