org.opends.server.admin.condition
Class ANDCondition

java.lang.Object
  extended by org.opends.server.admin.condition.ANDCondition
All Implemented Interfaces:
Condition

public final class ANDCondition
extends java.lang.Object
implements Condition

A condition which evaluates to true if and only if all of its sub-conditions are true.


Constructor Summary
ANDCondition(Condition... conditions)
          Creates a new logical AND condition with the provided sub-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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ANDCondition

public ANDCondition(Condition... conditions)
Creates a new logical AND condition with the provided sub-conditions.

Parameters:
conditions - The sub-conditions which will be combined using a logical AND.
Method Detail

evaluate

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

Specified by:
evaluate in interface Condition
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

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

Specified by:
evaluate in interface Condition
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.

initialize

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

Specified by:
initialize in interface Condition
Parameters:
d - The abstract managed object definition associated with this condition.
Throws:
java.lang.Exception - If this condition could not be initialized.