Class DITContentRuleDefinition

java.lang.Object
com.unboundid.ldap.sdk.schema.SchemaElement
com.unboundid.ldap.sdk.schema.DITContentRuleDefinition
All Implemented Interfaces:
Serializable

This class provides a data structure that describes an LDAP DIT content rule schema element.
See Also:
  • Constructor Details

    • DITContentRuleDefinition

      Creates a new DIT content rule from the provided string representation.
      Parameters:
      s - The string representation of the DIT content rule to create, using the syntax described in RFC 4512 section 4.1.6. It must not be null.
      Throws:
      LDAPException - If the provided string cannot be decoded as a DIT content rule definition.
    • DITContentRuleDefinition

      public DITContentRuleDefinition(@NotNull String oid, @Nullable String name, @Nullable String description, @Nullable String[] auxiliaryClasses, @Nullable String[] requiredAttributes, @Nullable String[] optionalAttributes, @Nullable String[] prohibitedAttributes, @Nullable Map<String,String[]> extensions)
      Creates a new DIT content rule with the provided information.
      Parameters:
      oid - The OID for the structural object class with which this DIT content rule is associated. It must not be null.
      name - The name for this DIT content rule. It may be null if the DIT content rule should only be referenced by OID.
      description - The description for this DIT content rule. It may be null if there is no description.
      auxiliaryClasses - The names/OIDs of the auxiliary object classes that may be present in entries containing this DIT content rule.
      requiredAttributes - The names/OIDs of the attributes which must be present in entries containing this DIT content rule.
      optionalAttributes - The names/OIDs of the attributes which may be present in entries containing this DIT content rule.
      prohibitedAttributes - The names/OIDs of the attributes which may not be present in entries containing this DIT content rule.
      extensions - The set of extensions for this DIT content rule. It may be null or empty if there should not be any extensions.
    • DITContentRuleDefinition

      public DITContentRuleDefinition(@NotNull String oid, @Nullable String name, @Nullable String description, @Nullable Collection<String> auxiliaryClasses, @Nullable Collection<String> requiredAttributes, @Nullable Collection<String> optionalAttributes, @Nullable Collection<String> prohibitedAttributes, @Nullable Map<String,String[]> extensions)
      Creates a new DIT content rule with the provided information.
      Parameters:
      oid - The OID for the structural object class with which this DIT content rule is associated. It must not be null.
      name - The name for this DIT content rule. It may be null if the DIT content rule should only be referenced by OID.
      description - The description for this DIT content rule. It may be null if there is no description.
      auxiliaryClasses - The names/OIDs of the auxiliary object classes that may be present in entries containing this DIT content rule.
      requiredAttributes - The names/OIDs of the attributes which must be present in entries containing this DIT content rule.
      optionalAttributes - The names/OIDs of the attributes which may be present in entries containing this DIT content rule.
      prohibitedAttributes - The names/OIDs of the attributes which may not be present in entries containing this DIT content rule.
      extensions - The set of extensions for this DIT content rule. It may be null or empty if there should not be any extensions.
    • DITContentRuleDefinition

      public DITContentRuleDefinition(@NotNull String oid, @Nullable String[] names, @Nullable String description, boolean isObsolete, @Nullable String[] auxiliaryClasses, @Nullable String[] requiredAttributes, @Nullable String[] optionalAttributes, @Nullable String[] prohibitedAttributes, @Nullable Map<String,String[]> extensions)
      Creates a new DIT content rule with the provided information.
      Parameters:
      oid - The OID for the structural object class with which this DIT content rule is associated. It must not be null.
      names - The set of names for this DIT content rule. It may be null or empty if the DIT content rule should only be referenced by OID.
      description - The description for this DIT content rule. It may be null if there is no description.
      isObsolete - Indicates whether this DIT content rule is declared obsolete.
      auxiliaryClasses - The names/OIDs of the auxiliary object classes that may be present in entries containing this DIT content rule.
      requiredAttributes - The names/OIDs of the attributes which must be present in entries containing this DIT content rule.
      optionalAttributes - The names/OIDs of the attributes which may be present in entries containing this DIT content rule.
      prohibitedAttributes - The names/OIDs of the attributes which may not be present in entries containing this DIT content rule.
      extensions - The set of extensions for this DIT content rule. It may be null or empty if there should not be any extensions.
  • Method Details

    • getOID

      Retrieves the OID for the structural object class associated with this DIT content rule.
      Returns:
      The OID for the structural object class associated with this DIT content rule.
    • getNames

      @NotNull public String[] getNames()
      Retrieves the set of names for this DIT content rule.
      Returns:
      The set of names for this DIT content rule, or an empty array if it does not have any names.
    • getNameOrOID

      Retrieves the primary name that can be used to reference this DIT content rule. If one or more names are defined, then the first name will be used. Otherwise, the structural object class OID will be returned.
      Returns:
      The primary name that can be used to reference this DIT content rule.
    • hasNameOrOID

      public boolean hasNameOrOID(@NotNull String s)
      Indicates whether the provided string matches the OID or any of the names for this DIT content rule.
      Parameters:
      s - The string for which to make the determination. It must not be null.
      Returns:
      true if the provided string matches the OID or any of the names for this DIT content rule, or false if not.
    • getDescription

      Retrieves the description for this DIT content rule, if available.
      Returns:
      The description for this DIT content rule, or null if there is no description defined.
    • isObsolete

      public boolean isObsolete()
      Indicates whether this DIT content rule is declared obsolete.
      Returns:
      true if this DIT content rule is declared obsolete, or false if it is not.
    • getAuxiliaryClasses

      Retrieves the names or OIDs of the auxiliary object classes that may be present in entries containing the structural class for this DIT content rule.
      Returns:
      The names or OIDs of the auxiliary object classes that may be present in entries containing the structural class for this DIT content rule.
    • getRequiredAttributes

      Retrieves the names or OIDs of the attributes that are required to be present in entries containing the structural object class for this DIT content rule.
      Returns:
      The names or OIDs of the attributes that are required to be present in entries containing the structural object class for this DIT content rule, or an empty array if there are no required attributes.
    • getOptionalAttributes

      Retrieves the names or OIDs of the attributes that are optionally allowed to be present in entries containing the structural object class for this DIT content rule.
      Returns:
      The names or OIDs of the attributes that are optionally allowed to be present in entries containing the structural object class for this DIT content rule, or an empty array if there are no required attributes.
    • getProhibitedAttributes

      Retrieves the names or OIDs of the attributes that are not allowed to be present in entries containing the structural object class for this DIT content rule.
      Returns:
      The names or OIDs of the attributes that are not allowed to be present in entries containing the structural object class for this DIT content rule, or an empty array if there are no required attributes.
    • getExtensions

      Retrieves the set of extensions for this DIT content rule. They will be mapped from the extension name (which should start with "X-") to the set of values for that extension.
      Returns:
      The set of extensions for this DIT content rule.
    • getSchemaElementType

      Retrieves the type of schema element that this object represents.
      Specified by:
      getSchemaElementType in class SchemaElement
      Returns:
      The type of schema element that this object represents.
    • hashCode

      public int hashCode()
      Retrieves a hash code for this schema element.
      Specified by:
      hashCode in class SchemaElement
      Returns:
      A hash code for this schema element.
    • equals

      public boolean equals(@Nullable Object o)
      Indicates whether the provided object is equal to this schema element.
      Specified by:
      equals in class SchemaElement
      Parameters:
      o - The object for which to make the determination.
      Returns:
      true if the provided object may be considered equal to this schema element, or false if not.
    • toString

      Retrieves a string representation of this DIT content rule definition, in the format described in RFC 4512 section 4.1.6.
      Specified by:
      toString in class SchemaElement
      Returns:
      A string representation of this DIT content rule definition.