Package org.forgerock.opendj.ldap.schema
Class MatchingRuleUse.Builder
java.lang.Object
org.forgerock.opendj.ldap.schema.MatchingRuleUse.Builder
- Enclosing class:
- MatchingRuleUse
A fluent API for incrementally constructing matching rule uses.
-
Method Summary
Modifier and TypeMethodDescriptionAdds this matching rule use definition to the schema, throwing aConflictingSchemaElementException
if there is an existing matching rule definition with the same numeric OID.Adds this matching rule use definition to the schema overwriting any existing matching rule use definition with the same numeric OID.attributes
(String... attributeOids) Adds the provided list of attribute types to the list of attribute type the matching rule applies to.attributes
(Collection<String> attributeOids) Adds the provided list of attribute types to the list of attribute type the matching rule applies to.description
(String description) Sets the description.extraProperties
(String extensionName, String... extensionValues) Adds the provided extended property.extraProperties
(String extensionName, List<String> extensionValues) Adds the provided extended property.extraProperties
(Map<String, List<String>> extraProperties) Adds the provided collection of extended properties.Adds the provided user friendly names.names
(Collection<String> names) Adds the provided user friendly names.obsolete
(boolean isObsolete) Specifies whether this schema element is obsolete.Sets the numeric OID which uniquely identifies this matching rule use definition.Removes all attribute types the matching rule applies to.Removes all extra properties.Removes all user defined names.removeAttribute
(String attributeOid) Removes the provided attribute type.removeExtraProperty
(String extensionName, String... extensionValues) Removes the specified extended property.removeName
(String name) Removes the provided user defined name.
-
Method Details
-
addToSchema
Adds this matching rule use definition to the schema, throwing aConflictingSchemaElementException
if there is an existing matching rule definition with the same numeric OID.- Returns:
- The parent schema builder.
- Throws:
ConflictingSchemaElementException
- If there is an existing matching rule use definition with the same numeric OID.
-
addToSchemaOverwrite
Adds this matching rule use definition to the schema overwriting any existing matching rule use definition with the same numeric OID.- Returns:
- The parent schema builder.
-
attributes
Adds the provided list of attribute types to the list of attribute type the matching rule applies to.- Parameters:
attributeOids
- The list of attribute type numeric OIDs.- Returns:
- This builder.
-
attributes
Adds the provided list of attribute types to the list of attribute type the matching rule applies to.- Parameters:
attributeOids
- The list of attribute type numeric OIDs.- Returns:
- This builder.
-
description
Sets the description.- Parameters:
description
- The description, which may benull
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
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.
-
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
Specifies whether this schema element is obsolete.- Parameters:
isObsolete
-true
if this schema element is obsolete (default isfalse
).- Returns:
- This builder.
-
oid
Sets the numeric OID which uniquely identifies this matching rule use definition.- Parameters:
oid
- The numeric OID.- Returns:
- This builder.
-
removeAllAttributes
Removes all attribute types the matching rule applies to.- Returns:
- This builder.
-
removeAllExtraProperties
Removes all extra properties.- Returns:
- This builder.
-
removeAllNames
Removes all user defined names.- Returns:
- This builder.
-
removeAttribute
Removes the provided attribute type.- Parameters:
attributeOid
- The attribute type OID to be removed.- Returns:
- This builder.
-
removeExtraProperty
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.
-
extraProperties
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.
-