org.opends.server.admin
Class OptionalRelationDefinition.Builder<C extends ConfigurationClient,S extends Configuration>

java.lang.Object
  extended by org.opends.server.admin.RelationDefinition.AbstractBuilder<C,S,OptionalRelationDefinition<C,S>>
      extended by org.opends.server.admin.OptionalRelationDefinition.Builder<C,S>
Type Parameters:
C - The type of client managed object configuration that this relation definition refers to.
S - The type of server managed object configuration that this relation definition refers to.
Enclosing class:
OptionalRelationDefinition<C extends ConfigurationClient,S extends Configuration>

public static final class OptionalRelationDefinition.Builder<C extends ConfigurationClient,S extends Configuration>
extends RelationDefinition.AbstractBuilder<C,S,OptionalRelationDefinition<C,S>>

An interface for incrementally constructing optional relation definitions.


Constructor Summary
OptionalRelationDefinition.Builder(AbstractManagedObjectDefinition<?,?> pd, java.lang.String name, AbstractManagedObjectDefinition<C,S> cd)
          Creates a new builder which can be used to incrementally build an optional relation definition.
 
Method Summary
protected  OptionalRelationDefinition<C,S> buildInstance(RelationDefinition.Common<C,S> common)
          Build a relation definition based on the properties of this builder.
 void setDefaultManagedObject(DefaultManagedObject<? extends C,? extends S> defaultManagedObject)
          Sets the optional default managed object associated with this optional relation definition.
 
Methods inherited from class org.opends.server.admin.RelationDefinition.AbstractBuilder
getInstance, setOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptionalRelationDefinition.Builder

public OptionalRelationDefinition.Builder(AbstractManagedObjectDefinition<?,?> pd,
                                          java.lang.String name,
                                          AbstractManagedObjectDefinition<C,S> cd)
Creates a new builder which can be used to incrementally build an optional relation definition.

Parameters:
pd - The parent managed object definition.
name - The name of the relation.
cd - The child managed object definition.
Method Detail

setDefaultManagedObject

public void setDefaultManagedObject(DefaultManagedObject<? extends C,? extends S> defaultManagedObject)
Sets the optional default managed object associated with this optional relation definition.

Parameters:
defaultManagedObject - The default managed object or null if there is no default managed object defined for this relation definition.

buildInstance

protected OptionalRelationDefinition<C,S> buildInstance(RelationDefinition.Common<C,S> common)
Build a relation definition based on the properties of this builder.

Specified by:
buildInstance in class RelationDefinition.AbstractBuilder<C extends ConfigurationClient,S extends Configuration,OptionalRelationDefinition<C extends ConfigurationClient,S extends Configuration>>
Parameters:
common - The common fields of the new relation definition.
Returns:
The new relation definition.