Package org.forgerock.opendj.config
Class Constraint
java.lang.Object
org.forgerock.opendj.config.Constraint
- Direct Known Subclasses:
GenericConstraint
An interface for enforcing constraints and dependencies between managed
objects and their properties. Constraints express relationships between
managed objects and their properties, for example:
- referential integrity: where one managed object references another a constraint can enforce referential integrity. The constraint can prevent creation of references to non-existent managed objects, and also prevent deletion of referenced managed objects
- property dependencies: for example, when a boolean property is
true
, one or more additional properties must be specified. This is useful for features like SSL, which when enabled, requires that various SSL related configuration options are specified - property constraints: for example, when an upper limit property must not have a value which is less than the lower limit property.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the client-side constraint handlers which will be used to enforce this constraint in client applications.Gets the server-side constraint handlers which will be used to enforce this constraint within the server.protected void
Initializes this constraint.
-
Constructor Details
-
Constraint
protected Constraint()Creates a new constraint.
-
-
Method Details
-
getClientConstraintHandlers
Gets the client-side constraint handlers which will be used to enforce this constraint in client applications. The default implementation is to return an empty set of client constraint handlers.- Returns:
- Returns the client-side constraint handlers which will be used to
enforce this constraint in client applications. The returned
collection must not be
null
but maybe empty (indicating that the constraint can only be enforced on the server-side).
-
getServerConstraintHandlers
Gets the server-side constraint handlers which will be used to enforce this constraint within the server. The default implementation is to return an empty set of server constraint handlers.- Returns:
- Returns the server-side constraint handlers which will be used to
enforce this constraint within the server. The returned
collection must not be
null
and must not be empty, since constraints must always be enforced on the server.
-
initialize
Initializes this constraint. The default implementation is to do nothing.- Throws:
Exception
- If this constraint could not be initialized.
-