Package org.forgerock.opendj.config
Class SetRelationDefinition<C extends ConfigurationClient,S extends Configuration>
- java.lang.Object
-
- org.forgerock.opendj.config.RelationDefinition<C,S>
-
- org.forgerock.opendj.config.SetRelationDefinition<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.
public final class SetRelationDefinition<C extends ConfigurationClient,S extends Configuration> extends RelationDefinition<C,S>
A managed object composite relationship definition which represents a composition of zero or more managed objects each of which must have a different type. The manage objects are named using their type name.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SetRelationDefinition.Builder<C extends ConfigurationClient,S extends Configuration>
An interface for incrementally constructing set relation definitions.-
Nested classes/interfaces inherited from class org.forgerock.opendj.config.RelationDefinition
RelationDefinition.AbstractBuilder<C extends ConfigurationClient,S extends Configuration,D extends RelationDefinition<C,S>>, RelationDefinition.Common<C extends ConfigurationClient,S extends Configuration>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,P>
Raccept(RelationDefinitionVisitor<R,P> v, P p)
Apply a visitor to this relation definition.DefaultManagedObject<? extends C,? extends S>
getDefaultManagedObject(String name)
Gets the named default managed object associated with this set relation definition.Set<String>
getDefaultManagedObjectNames()
Gets the names of the default managed objects associated with this set relation definition.String
getPluralName()
Gets the plural name of the relation.LocalizableMessage
getUserFriendlyPluralName()
Gets the user friendly plural name of this relation definition in the default locale.LocalizableMessage
getUserFriendlyPluralName(Locale locale)
Gets the user friendly plural name of this relation definition in the specified locale.protected void
initialize()
Performs any run-time initialization required by this relation definition.void
toString(StringBuilder builder)
Append a string representation of the managed object relation to the provided string builder.-
Methods inherited from class org.forgerock.opendj.config.RelationDefinition
getChildDefinition, getDescription, getDescription, getName, getParentDefinition, getSynopsis, getSynopsis, getUserFriendlyName, getUserFriendlyName, hasOption, toString
-
-
-
-
Method Detail
-
accept
public <R,P> R accept(RelationDefinitionVisitor<R,P> v, P p)
Description copied from class:RelationDefinition
Apply a visitor to this relation definition.- Specified by:
accept
in classRelationDefinition<C extends ConfigurationClient,S extends Configuration>
- 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 relation definition visitor.p
- Optional additional visitor parameter.- Returns:
- Returns a result as specified by the visitor.
-
getDefaultManagedObject
public DefaultManagedObject<? extends C,? extends S> getDefaultManagedObject(String name)
Gets the named default managed object associated with this set relation definition.- Parameters:
name
- The name of the default managed object (for set relations this is the type of the default managed object).- Returns:
- The named default managed object.
- Throws:
IllegalArgumentException
- If there is no default managed object associated with the provided name.
-
getDefaultManagedObjectNames
public Set<String> getDefaultManagedObjectNames()
Gets the names of the default managed objects associated with this set relation definition.- Returns:
- An unmodifiable set containing the names of the default managed object.
-
getPluralName
public String getPluralName()
Gets the plural name of the relation.- Returns:
- The plural name of the relation.
-
getUserFriendlyPluralName
public LocalizableMessage getUserFriendlyPluralName()
Gets the user friendly plural name of this relation definition in the default locale.- Returns:
- Returns the user friendly plural name of this relation definition in the default locale.
-
getUserFriendlyPluralName
public LocalizableMessage getUserFriendlyPluralName(Locale locale)
Gets the user friendly plural name of this relation definition in the specified locale.- Parameters:
locale
- The locale.- Returns:
- Returns the user friendly plural name of this relation definition in the specified locale.
-
toString
public void toString(StringBuilder builder)
Description copied from class:RelationDefinition
Append a string representation of the managed object relation to the provided string builder.- Specified by:
toString
in classRelationDefinition<C extends ConfigurationClient,S extends Configuration>
- Parameters:
builder
- The string builder where the string representation should be appended.
-
initialize
protected void initialize()
Description copied from class:RelationDefinition
Performs any run-time initialization required by this relation definition. This may include resolving managed object paths and property names.- Overrides:
initialize
in classRelationDefinition<C extends ConfigurationClient,S extends Configuration>
-
-