Package org.forgerock.opendj.config
Class Constraint
- java.lang.Object
-
- org.forgerock.opendj.config.Constraint
-
- Direct Known Subclasses:
GenericConstraint
public abstract class Constraint extends Object
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
Constructors Modifier Constructor Description protected
Constraint()
Creates a new constraint.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<ClientConstraintHandler>
getClientConstraintHandlers()
Gets the client-side constraint handlers which will be used to enforce this constraint in client applications.Collection<ServerConstraintHandler>
getServerConstraintHandlers()
Gets the server-side constraint handlers which will be used to enforce this constraint within the server.protected void
initialize()
Initializes this constraint.
-
-
-
Method Detail
-
getClientConstraintHandlers
public Collection<ClientConstraintHandler> 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
public Collection<ServerConstraintHandler> 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.
-
-