C
- The type of client managed object configuration that this
aggregation property definition refers to.S
- The type of server managed object configuration that this
aggregation property definition refers to.public final class AggregationPropertyDefinition<C extends ConfigurationClient,S extends Configuration> extends PropertyDefinition<String>
An aggregation property names one or more managed objects which are required by the managed object associated with this property. An aggregation property definition takes care to perform referential integrity checks: referenced managed objects cannot be deleted. Nor can an aggregation reference non-existent managed objects. Referential integrity checks are not performed during value validation. Instead they are performed when changes to the managed object are committed.
An aggregation property definition can optionally identify two properties:
enabled
property in the aggregated managed object - the
property must be a BooleanPropertyDefinition
and indicate whether the
aggregated managed object is enabled or not. If specified, the administration
framework will prevent the aggregated managed object from being disabled
while it is referenced
enabled
property in this property's managed object - the
property must be a BooleanPropertyDefinition
and indicate whether
this property's managed object is enabled or not. If specified, and as long
as there is an equivalent enabled
property defined for the
aggregated managed object, the enabled
property in the
aggregated managed object will only be checked when this property is true.
Modifier and Type | Class and Description |
---|---|
static class |
AggregationPropertyDefinition.Builder<C extends ConfigurationClient,S extends Configuration>
An interface for incrementally constructing aggregation property
definitions.
|
PropertyDefinition.AbstractBuilder<T,D extends PropertyDefinition<T>>
Modifier and Type | Method and Description |
---|---|
<R,P> R |
accept(PropertyDefinitionVisitor<R,P> v,
P p)
Apply a visitor to this property definition.
|
<R,P> R |
accept(PropertyValueVisitor<R,P> v,
String value,
P p)
Apply a visitor to a property value associated with this property
definition.
|
static <C extends ConfigurationClient,S extends Configuration> |
createBuilder(AbstractManagedObjectDefinition<?,?> d,
String propertyName)
Creates an aggregation property definition builder.
|
String |
decodeValue(String value)
Parse and validate a string representation of a property value.
|
DN |
getChildDN(String name)
Constructs a DN for a referenced managed object having the provided name.
|
ManagedObjectPath<C,S> |
getChildPath(String name)
Constructs a managed object path for a referenced managed object having
the provided name.
|
ManagedObjectPath<?,?> |
getParentPath()
Gets the name of the managed object which is the parent of the aggregated
managed objects.
|
InstantiableRelationDefinition<C,S> |
getRelationDefinition()
Gets the relation in the parent managed object which contains the
aggregated managed objects.
|
Constraint |
getSourceConstraint()
Gets the constraint which should be enforced on the aggregating managed
object.
|
LocalizableMessage |
getSourceConstraintSynopsis()
Gets the optional constraint synopsis of this aggregation property
definition in the default locale.
|
LocalizableMessage |
getSourceConstraintSynopsis(Locale locale)
Gets the optional constraint synopsis of this aggregation property
definition in the specified locale.The constraint synopsis describes when
and how referenced managed objects must be enabled.
|
Condition |
getTargetIsEnabledCondition()
Gets the condition which is used to determine if a referenced managed
object is enabled.
|
Condition |
getTargetNeedsEnablingCondition()
Gets the condition which is used to determine whether referenced
managed objects need to be enabled.
|
void |
initialize()
Performs any run-time initialization required by this property
definition.
|
String |
normalizeValue(String value)
Get a normalized string representation of a property value.
|
void |
toString(StringBuilder builder)
Append a string representation of the property definition to the provided
string builder.
|
void |
validateValue(String value)
Determine if the provided property value is valid according to this
property definition.
|
castValue, compare, compareTo, encodeValue, equals, getAdministratorAction, getDefaultBehaviorProvider, getDescription, getDescription, getManagedObjectDefinition, getName, getSynopsis, getSynopsis, hashCode, hasOption, toString
public static <C extends ConfigurationClient,S extends Configuration> AggregationPropertyDefinition.Builder<C,S> createBuilder(AbstractManagedObjectDefinition<?,?> d, String propertyName)
C
- The type of client managed object configuration that this
aggregation property definition refers to.S
- The type of server managed object configuration that this
aggregation property definition refers to.d
- The managed object definition associated with this property
definition.propertyName
- The property name.public <R,P> R accept(PropertyDefinitionVisitor<R,P> v, P p)
PropertyDefinition
accept
in class PropertyDefinition<String>
R
- The return type of the visitor's methods.P
- The type of the additional parameters to the visitor's
methods.v
- The property definition visitor.p
- Optional additional visitor parameter.public <R,P> R accept(PropertyValueVisitor<R,P> v, String value, P p)
PropertyDefinition
accept
in class PropertyDefinition<String>
R
- The return type of the visitor's methods.P
- The type of the additional parameters to the visitor's
methods.v
- The property value visitor.value
- The property value.p
- Optional additional visitor parameter.public String decodeValue(String value)
PropertyDefinition
decodeValue
in class PropertyDefinition<String>
value
- The property string value (must not be null
).public final DN getChildDN(String name)
getChildPath(String)
and then invoking ManagedObjectPath.toDN()
on the returned path.name
- The name of the child managed object.public final ManagedObjectPath<C,S> getChildPath(String name)
name
- The name of the child managed object.public final ManagedObjectPath<?,?> getParentPath()
public final InstantiableRelationDefinition<C,S> getRelationDefinition()
public final Constraint getSourceConstraint()
public final LocalizableMessage getSourceConstraintSynopsis()
null
is returned.null
if there is no constraint synopsis.public final LocalizableMessage getSourceConstraintSynopsis(Locale locale)
null
is returned.locale
- The locale.null
if there is no constraint synopsis.public final Condition getTargetIsEnabledCondition()
public final Condition getTargetNeedsEnablingCondition()
public String normalizeValue(String value)
PropertyDefinition
This method may throw an exception if the provided value is invalid.
However, applications should not assume that implementations of this
method will always validate a value. This task is the responsibility of
PropertyDefinition.validateValue(Object)
.
This default implementation simply returns the string representation of the provided value. Sub-classes might want to override this method if this behavior is insufficient (for example, a string property definition might strip white-space and convert characters to lower-case).
normalizeValue
in class PropertyDefinition<String>
value
- The property value to be normalized.public void toString(StringBuilder builder)
PropertyDefinition
This simple implementation just outputs the propertyName of the property definition. Sub-classes should override this method to provide more complete string representations.
toString
in class PropertyDefinition<String>
builder
- The string builder where the string representation should be
appended.public void validateValue(String value)
PropertyDefinition
validateValue
in class PropertyDefinition<String>
value
- The property value (must not be null
).public void initialize() throws Exception
initialize
in class PropertyDefinition<String>
Exception
- If this property definition could not be initialized.Copyright 2010-2017 ForgeRock AS.