Class Reference<C extends ConfigurationClient,S extends Configuration>

java.lang.Object
org.forgerock.opendj.config.Reference<C,S>
Type Parameters:
C - The type of client managed object configuration that this reference refers to.
S - The type of server managed object configuration that this reference refers to.

public final class Reference<C extends ConfigurationClient,S extends Configuration> extends Object
A reference to another managed object.
  • Method Details

    • parseDn

      public static <C extends ConfigurationClient, S extends Configuration> Reference<C,S> parseDn(ManagedObjectPath<?,?> path, InstantiableRelationDefinition<C,S> relationDef, String dnAsString)
      Parses a DN string value as a reference using the provided managed object path and relation definition.
      Type Parameters:
      C - The type of client managed object configuration that this reference refers to.
      S - The type of server managed object configuration that this reference refers to.
      Parameters:
      path - The path of the referenced managed object's parent.
      relationDef - The instantiable relation in the parent which contains the referenced managed object.
      dnAsString - The DN string value.
      Returns:
      Returns the new reference based on the provided DN string value.
      Throws:
      IllegalArgumentException - If the DN string value could not be decoded as a DN or if the provided DN did not correspond to the provided path and relation.
    • parseName

      public static <C extends ConfigurationClient, S extends Configuration> Reference<C,S> parseName(ManagedObjectPath<?,?> p, InstantiableRelationDefinition<C,S> rd, String s)
      Parses a name as a reference using the provided managed object path and relation definition.
      Type Parameters:
      C - The type of client managed object configuration that this reference refers to.
      S - The type of server managed object configuration that this reference refers to.
      Parameters:
      p - The path of the referenced managed object's parent.
      rd - The instantiable relation in the parent which contains the referenced managed object.
      s - The name of the referenced managed object.
      Returns:
      Returns the new reference based on the provided name.
      Throws:
      IllegalArgumentException - If the relation is not associated with the provided parent's definition, or if the provided name is empty.
    • getName

      public String getName()
      Gets the name of the referenced managed object.
      Returns:
      Returns the name of the referenced managed object.
    • getNormalizedName

      public String getNormalizedName()
      Gets the normalized name of the referenced managed object.
      Returns:
      Returns the normalized name of the referenced managed object.
    • toDn

      public Dn toDn()
      Gets the DN of the referenced managed object.
      Returns:
      Returns the DN of the referenced managed object.
    • toString

      public String toString()
      Overrides:
      toString in class Object