public final class ContainsCondition extends Object implements Condition
true
if and only if a property
contains a particular value.Constructor and Description |
---|
ContainsCondition(String propertyName,
String stringValue)
Creates a new contains value condition.
|
Modifier and Type | Method and Description |
---|---|
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.
|
PropertyDefinition<?> |
getPropertyDefinition()
Returns the property definition associated with this condition.
|
Object |
getValue()
Returns the value that must be set for this condition to be fulfilled.
|
void |
initialize(AbstractManagedObjectDefinition<?,?> d)
Initializes this condition.
|
void |
setPropertyValue(ManagedObject<?> managedObject)
Modifies the provided managed object so that it has the property value
associated with this condition.
|
public ContainsCondition(String propertyName, String stringValue)
propertyName
- The property name.stringValue
- The string representation of the required property value.public boolean evaluate(ManagementContext context, ManagedObject<?> managedObject) throws LdapException
Condition
evaluate
in interface Condition
context
- The client management context.managedObject
- The client managed object.true
if this condition is satisfied.LdapException
- If the condition could not be evaluated.public boolean evaluate(ServerManagedObject<?> managedObject) throws ConfigException
Condition
evaluate
in interface Condition
managedObject
- The server managed object.true
if this condition is satisfied.ConfigException
- If the condition could not be evaluated due to an unexpected
configuration exception.public void setPropertyValue(ManagedObject<?> managedObject)
managedObject
- The managed object.public void initialize(AbstractManagedObjectDefinition<?,?> d) throws Exception
Condition
initialize
in interface Condition
d
- The abstract managed object definition associated with this
condition.Exception
- If this condition could not be initialized.public PropertyDefinition<?> getPropertyDefinition()
Copyright 2010-2017 ForgeRock AS.