Package org.forgerock.opendj.ldap.schema
Class AttributeType.Builder
java.lang.Object
org.forgerock.opendj.ldap.schema.AttributeType.Builder
- Enclosing class:
- AttributeType
A fluent API for incrementally constructing attribute type.
-
Method Summary
Modifier and TypeMethodDescriptionAdds this attribute type to the schema, throwing aConflictingSchemaElementExceptionif there is an existing attribute type with the same numeric OID.Adds this attribute type to the schema overwriting any existing attribute type with the same numeric OID.approximateMatchingRule(String approximateMatchingRuleOid) Sets the matching rule that should be used for approximate matching with this attribute type.collective(boolean isCollective) Specifies whether this attribute type is "collective".description(String description) Sets the description.equalityMatchingRule(String equalityMatchingRuleOid) Sets the matching rule that should be used for equality matching with this attribute type.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.noUserModification(boolean isNoUserModification) Specifies whether this attribute type is "no-user-modification".obsolete(boolean isObsolete) Specifies whether this schema element is obsolete.Sets the numeric OID which uniquely identifies this attribute type.orderingMatchingRule(String orderingMatchingRuleOid) Sets the matching rule that should be used for ordering with this attribute type.Removes all extra properties.Removes all user defined names.removeExtraProperty(String extensionName, String... extensionValues) Removes the specified extended property.removeName(String name) Removes the provided user defined name.singleValue(boolean isSingleValue) Specifies whether this attribute type is declared "single-value".substringMatchingRule(String substringMatchingRuleOid) Sets the matching rule that should be used for substring matching with this attribute type.superiorType(String superiorTypeOid) Sets the superior type for this attribute type.Sets the syntax for this attribute type.usage(AttributeUsage attributeUsage) Sets the usage indicator for this attribute type.
-
Method Details
-
addToSchema
Adds this attribute type to the schema, throwing aConflictingSchemaElementExceptionif there is an existing attribute type with the same numeric OID.- Returns:
- The parent schema builder.
- Throws:
ConflictingSchemaElementException- If there is an existing attribute type with the same numeric OID.
-
addToSchemaOverwrite
Adds this attribute type to the schema overwriting any existing attribute type with the same numeric OID.- Returns:
- The parent schema builder.
-
approximateMatchingRule
Sets the matching rule that should be used for approximate matching with this attribute type.- Parameters:
approximateMatchingRuleOid- The matching rule OID.- Returns:
- This builder.
-
collective
Specifies whether this attribute type is "collective".- Parameters:
isCollective-trueif this attribute type is "collective".- Returns:
- This builder.
-
description
Sets the description.- Parameters:
description- The description, which may benullin which case the empty string will be used.- Returns:
- This builder.
-
equalityMatchingRule
Sets the matching rule that should be used for equality matching with this attribute type.- Parameters:
equalityMatchingRuleOid- The matching rule OID.- 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.
-
noUserModification
Specifies whether this attribute type is "no-user-modification".- Parameters:
isNoUserModification-trueif this attribute type is "no-user-modification"- Returns:
- This builder.
-
obsolete
Specifies whether this schema element is obsolete.- Parameters:
isObsolete-trueif this schema element is obsolete (default isfalse).- Returns:
- This builder.
-
oid
Sets the numeric OID which uniquely identifies this attribute type.- Parameters:
oid- The numeric OID.- Returns:
- This builder.
-
orderingMatchingRule
Sets the matching rule that should be used for ordering with this attribute type.- Parameters:
orderingMatchingRuleOid- The matching rule OID.- Returns:
- This Builder.
-
removeAllExtraProperties
Removes all extra properties.- Returns:
- This builder.
-
removeAllNames
Removes all user defined names.- 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.
-
singleValue
Specifies whether this attribute type is declared "single-value".- Parameters:
isSingleValue-trueif this attribute type is declared "single-value".- Returns:
- This builder.
-
substringMatchingRule
Sets the matching rule that should be used for substring matching with this attribute type.- Parameters:
substringMatchingRuleOid- The matching rule OID.- Returns:
- This builder.
-
superiorType
Sets the superior type for this attribute type.- Parameters:
superiorTypeOid- The superior type OID.- Returns:
- This builder.
-
syntax
Sets the syntax for this attribute type.- Parameters:
syntaxOid- The syntax OID.- Returns:
- This builder.
-
usage
Sets the usage indicator for this attribute type.- Parameters:
attributeUsage- The attribute usage.- 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.
-