Class AggregationPropertyDefinition<C extends ConfigurationClient, S extends Configuration>
java.lang.Object
org.forgerock.opendj.config.PropertyDefinition<String>
org.forgerock.opendj.config.AggregationPropertyDefinition<C,S>
- Type Parameters:
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.
- All Implemented Interfaces:
Comparable<PropertyDefinition<?>>, Comparator<ValueOrExpression<String>>
public final class AggregationPropertyDefinition<C extends ConfigurationClient, S extends Configuration>
extends PropertyDefinition<String>
Aggregation property definition.
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:
- an
enabledproperty in the aggregated managed object - the property must be aBooleanPropertyDefinitionand 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 - an
enabledproperty in this property's managed object - the property must be aBooleanPropertyDefinitionand indicate whether this property's managed object is enabled or not. If specified, and as long as there is an equivalentenabledproperty defined for the aggregated managed object, theenabledproperty in the aggregated managed object will only be checked when this property is true.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAggregationPropertyDefinition.Builder<C extends ConfigurationClient, S extends Configuration>An interface for incrementally constructing aggregation property definitions.Nested classes/interfaces inherited from class PropertyDefinition
PropertyDefinition.AbstractBuilder<T,D> -
Method Summary
Modifier and TypeMethodDescription<R,P> R accept(PropertyDefinitionVisitor<R, P> v, P p, boolean isServer) Apply a visitor to this property definition.<R,P> R accept(PropertyValueVisitor<R, P> v, ValueOrExpression<String> value, P p, boolean isServer) Apply a visitor to a property value associated with this property definition.static <C extends ConfigurationClient, S extends Configuration>
AggregationPropertyDefinition.Builder<C, S> createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) Creates an aggregation property definition builder.decodeValueImpl(String value, boolean isServer) getChildDn(String name) Returns the DN for a referenced managed object having the provided name.getChildPath(String name) Returns a managed object path for a referenced managed object having the provided name.ManagedObjectPath<?, ?> Returns the name of the managed object which is the parent of the aggregated managed objects.Returns the relation in the parent managed object which contains the aggregated managed objects.Returns the constraint which should be enforced on the aggregating managed object.Returns the optional constraint synopsis of this aggregation property definition in the default locale, ornullif there is no constraint synopsis.Returns the condition which is used to determine if a referenced managed object is enabled.Returns the condition which is used to determine whether referenced managed objects need to be enabled.voidPerforms any run-time initialization required by this property definition.voidtoString(StringBuilder builder) Append a string representation of the property definition to the provided string builder.voidvalidateValueImpl(String value, boolean isServer) Methods inherited from class PropertyDefinition
compare, compareTo, decodeValue, decodeValueOrExpression, encodeValue, equals, getAdministratorAction, getDefaultBehaviorProvider, getDeprecated, getDescription, getDescription, getManagedObjectDefinition, getName, getSynopsis, getSynopsis, getValueComparator, hashCode, hasOption, normalizeValue, toString, validateMandatoryValuesArePresent, validateNoValuesIfVirtual, validateSingleValuedConstraint, validateValueMethods inherited from interface Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Method Details
-
createBuilder
public static <C extends ConfigurationClient, S extends Configuration> AggregationPropertyDefinition.Builder<C,S> createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName) Creates an aggregation property definition builder.- Type Parameters:
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.- Parameters:
d- The managed object definition associated with this property definition.propertyName- The property name.- Returns:
- Returns the new aggregation property definition builder.
-
accept
Description copied from class:PropertyDefinitionApply a visitor to this property definition.- Specified by:
acceptin classPropertyDefinition<String>- Type Parameters:
R- The return type of the visitor's methods.P- The type of the additional parameters to the visitor's methods.- Parameters:
v- The property definition visitor.p- Optional additional visitor parameter.isServer- If schema should be strictly checked in a server environment- Returns:
- Returns a result as specified by the visitor.
-
accept
public <R,P> R accept(PropertyValueVisitor<R, P> v, ValueOrExpression<String> value, P p, boolean isServer) Description copied from class:PropertyDefinitionApply a visitor to a property value associated with this property definition.- Specified by:
acceptin classPropertyDefinition<String>- Type Parameters:
R- The return type of the visitor's methods.P- The type of the additional parameters to the visitor's methods.- Parameters:
v- The property value visitor.value- The property value.p- Optional additional visitor parameter.isServer- If schema should be strictly checked in a server environment- Returns:
- Returns a result as specified by the visitor.
-
decodeValueImpl
-
getChildDn
Returns the DN for a referenced managed object having the provided name. This method is implemented by first callinggetChildPath(String)and then invokingManagedObjectPath.toDN()on the returned path.- Parameters:
name- The name of the child managed object.- Returns:
- the DN for a referenced managed object having the provided name
-
getChildPath
Returns a managed object path for a referenced managed object having the provided name.- Parameters:
name- The name of the child managed object.- Returns:
- a managed object path for a referenced managed object having the provided name
-
getParentPath
Returns the name of the managed object which is the parent of the aggregated managed objects.- Returns:
- the name of the managed object which is the parent of the aggregated managed objects
-
getRelationDefinition
Returns the relation in the parent managed object which contains the aggregated managed objects.- Returns:
- the relation in the parent managed object which contains the aggregated managed objects
-
getSourceConstraint
Returns the constraint which should be enforced on the aggregating managed object.- Returns:
- the constraint which should be enforced on the aggregating managed object
-
getSourceConstraintSynopsis
Returns the optional constraint synopsis of this aggregation property definition in the default locale, ornullif there is no constraint synopsis. The constraint synopsis describes when and how referenced managed objects must be enabled. When there are no constraints between the source managed object and the objects it references through this aggregation,nullis returned.- Returns:
- the optional constraint synopsis of this aggregation property definition in the default locale, or
nullif there is no constraint synopsis
-
getTargetIsEnabledCondition
Returns the condition which is used to determine if a referenced managed object is enabled.- Returns:
- the condition which is used to determine if a referenced managed object is enabled
-
getTargetNeedsEnablingCondition
Returns the condition which is used to determine whether referenced managed objects need to be enabled.- Returns:
- the condition which is used to determine whether referenced managed objects need to be enabled
-
toString
Description copied from class:PropertyDefinitionAppend a string representation of the property definition to the provided string builder.This simple implementation just outputs the propertyName of the property definition. Sub-classes should override this method to provide more complete string representations.
- Overrides:
toStringin classPropertyDefinition<String>- Parameters:
builder- The string builder where the string representation should be appended.
-
validateValueImpl
-
initialize
Description copied from class:PropertyDefinitionPerforms any run-time initialization required by this property definition. This may include resolving managed object paths and property names.- Overrides:
initializein classPropertyDefinition<String>- Throws:
Exception- If this property definition could not be initialized.
-