| | |
| | | */ |
| | | public final class ANDCondition implements Condition { |
| | | |
| | | // The list of sub-conditions. |
| | | /** The list of sub-conditions. */ |
| | | private final List<Condition> conditions; |
| | | |
| | | /** |
| | |
| | | this.conditions = Arrays.asList(conditions); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws LdapException { |
| | | for (Condition condition : conditions) { |
| | | if (!condition.evaluate(context, managedObject)) { |
| | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException { |
| | | for (Condition condition : conditions) { |
| | | if (!condition.evaluate(managedObject)) { |
| | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initialize(AbstractManagedObjectDefinition<?, ?> d) throws Exception { |
| | | for (Condition condition : conditions) { |
| | | condition.initialize(d); |