org.opends.server.admin.condition
Interface Condition

All Known Implementing Classes:
ANDCondition, ContainsCondition, IsPresentCondition, NOTCondition, ORCondition

public interface Condition

An interface for evaluating conditions.


Method Summary
 boolean evaluate(ManagementContext context, ManagedObject<?> managedObject)
          Evaluates this condition against the provided client managed object.
 boolean evaluate(ServerManagedObject<?> managedObject)
          Evaluates this condition against the provided server managed object.
 void initialize(AbstractManagedObjectDefinition<?,?> d)
          Initializes this condition.
 

Method Detail

initialize

void initialize(AbstractManagedObjectDefinition<?,?> d)
                throws java.lang.Exception
Initializes this condition.

Parameters:
d - The abstract managed object definition associated with this condition.
Throws:
java.lang.Exception - If this condition could not be initialized.

evaluate

boolean evaluate(ManagementContext context,
                 ManagedObject<?> managedObject)
                 throws AuthorizationException,
                        CommunicationException
Evaluates this condition against the provided client managed object.

Parameters:
context - The client management context.
managedObject - The client managed object.
Returns:
Returns true if this condition is satisfied.
Throws:
AuthorizationException - If the condition could not be evaluated due to an authorization problem.
CommunicationException - If the condition could not be evaluated due to an communication problem.

evaluate

boolean evaluate(ServerManagedObject<?> managedObject)
                 throws ConfigException
Evaluates this condition against the provided server managed object.

Parameters:
managedObject - The server managed object.
Returns:
Returns true if this condition is satisfied.
Throws:
ConfigException - If the condition could not be evaluated due to an unexpected configuration exception.