Package org.forgerock.opendj.config
Class GenericConstraint
java.lang.Object
org.forgerock.opendj.config.Constraint
org.forgerock.opendj.config.GenericConstraint
A generic constraint which comprises of an underlying condition and a
description. The condition must evaluate to
true in order for a
new managed object to be created or modified.-
Constructor Summary
ConstructorsConstructorDescriptionGenericConstraint(AbstractManagedObjectDefinition<?, ?> definition, int id, Condition condition) Creates a new generic constraint. -
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.Gets the synopsis of this constraint in the default locale.getSynopsis(Locale locale) Gets the synopsis of this constraint in the specified locale.protected voidInitializes this constraint.
-
Constructor Details
-
GenericConstraint
public GenericConstraint(AbstractManagedObjectDefinition<?, ?> definition, int id, Condition condition) Creates a new generic constraint.- Parameters:
definition- The managed object definition associated with this constraint.id- The constraint ID.condition- The condition associated with this constraint.
-
-
Method Details
-
getClientConstraintHandlers
Description copied from class:ConstraintGets 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.- Overrides:
getClientConstraintHandlersin classConstraint- Returns:
- Returns the client-side constraint handlers which will be used to
enforce this constraint in client applications. The returned
collection must not be
nullbut maybe empty (indicating that the constraint can only be enforced on the server-side).
-
getServerConstraintHandlers
Description copied from class:ConstraintGets 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.- Overrides:
getServerConstraintHandlersin classConstraint- Returns:
- Returns the server-side constraint handlers which will be used to
enforce this constraint within the server. The returned
collection must not be
nulland must not be empty, since constraints must always be enforced on the server.
-
getSynopsis
Gets the synopsis of this constraint in the default locale.- Returns:
- Returns the synopsis of this constraint in the default locale.
-
getSynopsis
Gets the synopsis of this constraint in the specified locale.- Parameters:
locale- The locale.- Returns:
- Returns the synopsis of this constraint in the specified locale.
-
initialize
Description copied from class:ConstraintInitializes this constraint. The default implementation is to do nothing.- Overrides:
initializein classConstraint- Throws:
Exception- If this constraint could not be initialized.
-