Class MatchingRuleDefinition

    • Constructor Summary

      Constructors 
      Constructor Description
      MatchingRuleDefinition​(java.lang.String s)
      Creates a new matching rule from the provided string representation.
      MatchingRuleDefinition​(java.lang.String oid, java.lang.String[] names, java.lang.String description, boolean isObsolete, java.lang.String syntaxOID, java.util.Map<java.lang.String,​java.lang.String[]> extensions)
      Creates a new matching rule with the provided information.
      MatchingRuleDefinition​(java.lang.String oid, java.lang.String name, java.lang.String description, java.lang.String syntaxOID, java.util.Map<java.lang.String,​java.lang.String[]> extensions)
      Creates a new matching rule with the provided information.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Indicates whether the provided object is equal to this schema element.
      java.lang.String getDescription()
      Retrieves the description for this matching rule, if available.
      java.util.Map<java.lang.String,​java.lang.String[]> getExtensions()
      Retrieves the set of extensions for this matching rule.
      java.lang.String getNameOrOID()
      Retrieves the primary name that can be used to reference this matching rule.
      java.lang.String[] getNames()
      Retrieves the set of names for this matching rule.
      java.lang.String getOID()
      Retrieves the OID for this matching rule.
      SchemaElementType getSchemaElementType()
      Retrieves the type of schema element that this object represents.
      java.lang.String getSyntaxOID()
      Retrieves the OID of the syntax for this matching rule.
      int hashCode()
      Retrieves a hash code for this schema element.
      boolean hasNameOrOID​(java.lang.String s)
      Indicates whether the provided string matches the OID or any of the names for this matching rule.
      boolean isObsolete()
      Indicates whether this matching rule is declared obsolete.
      java.lang.String toString()
      Retrieves a string representation of this matching rule definition, in the format described in RFC 4512 section 4.1.3.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MatchingRuleDefinition

        public MatchingRuleDefinition​(@NotNull
                                      java.lang.String s)
                               throws LDAPException
        Creates a new matching rule from the provided string representation.
        Parameters:
        s - The string representation of the matching rule to create, using the syntax described in RFC 4512 section 4.1.3. It must not be null.
        Throws:
        LDAPException - If the provided string cannot be decoded as a matching rule definition.
      • MatchingRuleDefinition

        public MatchingRuleDefinition​(@NotNull
                                      java.lang.String oid,
                                      @Nullable
                                      java.lang.String name,
                                      @Nullable
                                      java.lang.String description,
                                      @NotNull
                                      java.lang.String syntaxOID,
                                      @Nullable
                                      java.util.Map<java.lang.String,​java.lang.String[]> extensions)
        Creates a new matching rule with the provided information.
        Parameters:
        oid - The OID for this matching rule. It must not be null.
        name - The names for this matching rule. It may be null if the matching rule should only be referenced by OID.
        description - The description for this matching rule. It may be null if there is no description.
        syntaxOID - The syntax OID for this matching rule. It must not be null.
        extensions - The set of extensions for this matching rule. It may be null or empty if there should not be any extensions.
      • MatchingRuleDefinition

        public MatchingRuleDefinition​(@NotNull
                                      java.lang.String oid,
                                      @Nullable
                                      java.lang.String[] names,
                                      @Nullable
                                      java.lang.String description,
                                      boolean isObsolete,
                                      @NotNull
                                      java.lang.String syntaxOID,
                                      @Nullable
                                      java.util.Map<java.lang.String,​java.lang.String[]> extensions)
        Creates a new matching rule with the provided information.
        Parameters:
        oid - The OID for this matching rule. It must not be null.
        names - The set of names for this matching rule. It may be null or empty if the matching rule should only be referenced by OID.
        description - The description for this matching rule. It may be null if there is no description.
        isObsolete - Indicates whether this matching rule is declared obsolete.
        syntaxOID - The syntax OID for this matching rule. It must not be null.
        extensions - The set of extensions for this matching rule. It may be null or empty if there should not be any extensions.
    • Method Detail

      • getOID

        @NotNull
        public java.lang.String getOID()
        Retrieves the OID for this matching rule.
        Returns:
        The OID for this matching rule.
      • getNames

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

        @NotNull
        public java.lang.String getNameOrOID()
        Retrieves the primary name that can be used to reference this matching rule. If one or more names are defined, then the first name will be used. Otherwise, the OID will be returned.
        Returns:
        The primary name that can be used to reference this matching rule.
      • hasNameOrOID

        public boolean hasNameOrOID​(@NotNull
                                    java.lang.String s)
        Indicates whether the provided string matches the OID or any of the names for this matching 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 matching rule, or false if not.
      • getDescription

        @Nullable
        public java.lang.String getDescription()
        Retrieves the description for this matching rule, if available.
        Returns:
        The description for this matching rule, or null if there is no description defined.
      • isObsolete

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

        @NotNull
        public java.lang.String getSyntaxOID()
        Retrieves the OID of the syntax for this matching rule.
        Returns:
        The OID of the syntax for this matching rule.
      • getExtensions

        @NotNull
        public java.util.Map<java.lang.String,​java.lang.String[]> getExtensions()
        Retrieves the set of extensions for this matching 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 matching rule.
      • 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
                              java.lang.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

        @NotNull
        public java.lang.String toString()
        Retrieves a string representation of this matching rule definition, in the format described in RFC 4512 section 4.1.3.
        Specified by:
        toString in class SchemaElement
        Returns:
        A string representation of this matching rule definition.