Package com.unboundid.ldap.sdk.schema
Class MatchingRuleUseDefinition
java.lang.Object
com.unboundid.ldap.sdk.schema.SchemaElement
com.unboundid.ldap.sdk.schema.MatchingRuleUseDefinition
- All Implemented Interfaces:
Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class MatchingRuleUseDefinition
extends SchemaElement
This class provides a data structure that describes an LDAP matching rule use
schema element.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new matching rule use from the provided string representation.MatchingRuleUseDefinition(String oid, String[] names, String description, boolean isObsolete, String[] applicableTypes, Map<String, String[]> extensions) Creates a new matching rule use with the provided information.MatchingRuleUseDefinition(String oid, String name, String description, String[] applicableTypes, Map<String, String[]> extensions) Creates a new matching rule use with the provided information.MatchingRuleUseDefinition(String oid, String name, String description, Collection<String> applicableTypes, Map<String, String[]> extensions) Creates a new matching rule use with the provided information. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether the provided object is equal to this schema element.String[]Retrieves the names or OIDs of the attribute types to which this matching rule use applies.Retrieves the description for this matching rule use, if available.Retrieves the set of extensions for this matching rule use.Retrieves the primary name that can be used to reference this matching rule use.String[]getNames()Retrieves the set of names for this matching rule use.getOID()Retrieves the OID for this matching rule use.Retrieves the type of schema element that this object represents.inthashCode()Retrieves a hash code for this schema element.booleanIndicates whether the provided string matches the OID or any of the names for this matching rule use.booleanIndicates whether this matching rule use is declared obsolete.toString()Retrieves a string representation of this matching rule definition, in the format described in RFC 4512 section 4.1.4.Methods inherited from class com.unboundid.ldap.sdk.schema.SchemaElement
allowEmptyDescription, extensionsEqual, setAllowEmptyDescription
-
Constructor Details
-
MatchingRuleUseDefinition
Creates a new matching rule use from the provided string representation.- Parameters:
s- The string representation of the matching rule use to create, using the syntax described in RFC 4512 section 4.1.4. It must not benull.- Throws:
LDAPException- If the provided string cannot be decoded as a matching rule use definition.
-
MatchingRuleUseDefinition
public MatchingRuleUseDefinition(@NotNull String oid, @Nullable String name, @Nullable String description, @NotNull String[] applicableTypes, @Nullable Map<String, String[]> extensions) Creates a new matching rule use with the provided information.- Parameters:
oid- The OID for this matching rule use. It must not benull.name- The name for this matching rule use. It may benullor empty if the matching rule use should only be referenced by OID.description- The description for this matching rule use. It may benullif there is no description.applicableTypes- The set of attribute types to which this matching rule use applies. It must not be empty ornull.extensions- The set of extensions for this matching rule use. It may benullor empty if there should not be any extensions.
-
MatchingRuleUseDefinition
public MatchingRuleUseDefinition(@NotNull String oid, @Nullable String name, @Nullable String description, @NotNull Collection<String> applicableTypes, @Nullable Map<String, String[]> extensions) Creates a new matching rule use with the provided information.- Parameters:
oid- The OID for this matching rule use. It must not benull.name- The name for this matching rule use. It may benullor empty if the matching rule use should only be referenced by OID.description- The description for this matching rule use. It may benullif there is no description.applicableTypes- The set of attribute types to which this matching rule use applies. It must not be empty ornull.extensions- The set of extensions for this matching rule use. It may benullor empty if there should not be any extensions.
-
MatchingRuleUseDefinition
public MatchingRuleUseDefinition(@NotNull String oid, @Nullable String[] names, @Nullable String description, boolean isObsolete, @NotNull String[] applicableTypes, @Nullable Map<String, String[]> extensions) Creates a new matching rule use with the provided information.- Parameters:
oid- The OID for this matching rule use. It must not benull.names- The set of names for this matching rule use. It may benullor empty if the matching rule use should only be referenced by OID.description- The description for this matching rule use. It may benullif there is no description.isObsolete- Indicates whether this matching rule use is declared obsolete.applicableTypes- The set of attribute types to which this matching rule use applies. It must not be empty ornull.extensions- The set of extensions for this matching rule use. It may benullor empty if there should not be any extensions.
-
-
Method Details
-
getOID
Retrieves the OID for this matching rule use.- Returns:
- The OID for this matching rule use.
-
getNames
Retrieves the set of names for this matching rule use.- Returns:
- The set of names for this matching rule use, or an empty array if it does not have any names.
-
getNameOrOID
Retrieves the primary name that can be used to reference this matching rule use. 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 use.
-
hasNameOrOID
Indicates whether the provided string matches the OID or any of the names for this matching rule use.- Parameters:
s- The string for which to make the determination. It must not benull.- Returns:
trueif the provided string matches the OID or any of the names for this matching rule use, orfalseif not.
-
getDescription
Retrieves the description for this matching rule use, if available.- Returns:
- The description for this matching rule use, or
nullif there is no description defined.
-
isObsolete
Indicates whether this matching rule use is declared obsolete.- Returns:
trueif this matching rule use is declared obsolete, orfalseif it is not.
-
getApplicableAttributeTypes
Retrieves the names or OIDs of the attribute types to which this matching rule use applies.- Returns:
- The names or OIDs of the attribute types to which this matching rule use applies.
-
getExtensions
Retrieves the set of extensions for this matching rule use. 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 use.
-
getSchemaElementType
Retrieves the type of schema element that this object represents.- Specified by:
getSchemaElementTypein classSchemaElement- Returns:
- The type of schema element that this object represents.
-
hashCode
Retrieves a hash code for this schema element.- Specified by:
hashCodein classSchemaElement- Returns:
- A hash code for this schema element.
-
equals
Indicates whether the provided object is equal to this schema element.- Specified by:
equalsin classSchemaElement- Parameters:
o- The object for which to make the determination.- Returns:
trueif the provided object may be considered equal to this schema element, orfalseif not.
-
toString
Retrieves a string representation of this matching rule definition, in the format described in RFC 4512 section 4.1.4.- Specified by:
toStringin classSchemaElement- Returns:
- A string representation of this matching rule use definition.
-