Class DITStructureRule.Builder

java.lang.Object
org.forgerock.opendj.ldap.schema.DITStructureRule.Builder
Enclosing class:
DITStructureRule

public static final class DITStructureRule.Builder extends Object
A fluent API for incrementally constructing DIT structure rules.
  • Method Details

    • addToSchema

      Adds this DIT structure rule to the schema, throwing a ConflictingSchemaElementException if there is an existing DIT structure rule with the same numeric ID.
      Returns:
      The parent schema builder.
      Throws:
      ConflictingSchemaElementException - If there is an existing structure rule with the same numeric ID.
    • addToSchemaOverwrite

      Adds this DIT structure rule to the schema overwriting any existing DIT structure rule with the same numeric ID.
      Returns:
      The parent schema builder.
    • description

      Sets the description.
      Parameters:
      description - The description, which may be null in which case the empty string will be used.
      Returns:
      This builder.
    • extraProperties

      Adds the provided collection of extended properties.
      Parameters:
      extraProperties - The collection of extended properties.
      Returns:
      This builder.
    • extraProperties

      public DITStructureRule.Builder extraProperties(String extensionName, String... extensionValues)
      Adds the provided extended property.
      Parameters:
      extensionName - The name of the extended property.
      extensionValues - The optional list of values for the extended property.
      Returns:
      This builder.
    • nameForm

      Sets the name form associated with the DIT structure rule.
      Parameters:
      nameFormOID - The name form numeric OID.
      Returns:
      This builder.
    • names

      Adds the provided user friendly names.
      Parameters:
      names - The user friendly names.
      Returns:
      This builder.
    • names

      Adds the provided user friendly names.
      Parameters:
      names - The user friendly names.
      Returns:
      This builder.
    • obsolete

      public DITStructureRule.Builder obsolete(boolean isObsolete)
      Specifies whether this schema element is obsolete.
      Parameters:
      isObsolete - true if this schema element is obsolete (default is false).
      Returns:
      This builder.
    • removeAllExtraProperties

      Removes all extra properties.
      Returns:
      This builder.
    • removeAllNames

      Removes all user defined names.
      Returns:
      This builder.
    • removeAllSuperiorRules

      Removes all superior rules.
      Returns:
      This builder.
    • removeExtraProperty

      public DITStructureRule.Builder removeExtraProperty(String extensionName, String... extensionValues)
      Removes the specified extended property.
      Parameters:
      extensionName - The name of the extended property.
      extensionValues - The optional list of values for the extended property, which may be empty indicating that the entire property should be removed.
      Returns:
      This builder.
    • removeName

      Removes the provided user defined name.
      Parameters:
      name - The user defined name to be removed.
      Returns:
      This builder.
    • removeSuperiorRule

      public DITStructureRule.Builder removeSuperiorRule(int superiorRuleID)
      Removes the provided superior rule.
      Parameters:
      superiorRuleID - The superior rule ID to be removed.
      Returns:
      This builder.
    • ruleID

      public DITStructureRule.Builder ruleID(int ruleID)
      Sets the the numeric ID which uniquely identifies this structure rule.
      Parameters:
      ruleID - The numeric ID.
      Returns:
      This builder.
    • superiorRules

      public DITStructureRule.Builder superiorRules(int... superiorRuleIDs)
      Adds the provided superior rule identifiers.
      Parameters:
      superiorRuleIDs - Structure rule identifiers.
      Returns:
      This builder.
    • extraProperties

      public DITStructureRule.Builder extraProperties(String extensionName, List<String> extensionValues)
      Adds the provided extended property.
      Parameters:
      extensionName - The name of the extended property.
      extensionValues - The optional list of values for the extended property.
      Returns:
      This builder.