Package org.forgerock.opendj.ldap.schema
Class Syntax.Builder
- java.lang.Object
-
- org.forgerock.opendj.ldap.schema.Syntax.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SchemaBuilder
addToSchema()
Adds this syntax to the schema, throwing aConflictingSchemaElementException
if there is an existing syntax with the same numeric OID.SchemaBuilder
addToSchemaOverwrite()
Adds this syntax to the schema overwriting any existing syntax with the same numeric OID.Syntax.Builder
description(String description)
Sets the description.Syntax.Builder
extraProperties(String extensionName, String... extensionValues)
Adds the provided extended property.T
extraProperties(String extensionName, List<String> extensionValues)
Adds the provided extended property.Syntax.Builder
extraProperties(Map<String,List<String>> extraProperties)
Adds the provided collection of extended properties.Syntax.Builder
implementation(SyntaxImpl implementation)
Sets the syntax implementation.Syntax.Builder
oid(String oid)
Sets the numeric OID which uniquely identifies this syntax.Syntax.Builder
removeAllExtraProperties()
Removes all extra properties.Syntax.Builder
removeExtraProperty(String extensionName, String... extensionValues)
Removes the specified extended property.
-
-
-
Method Detail
-
addToSchema
public SchemaBuilder addToSchema()
Adds this syntax to the schema, throwing aConflictingSchemaElementException
if there is an existing syntax with the same numeric OID.- Returns:
- The parent schema builder.
- Throws:
ConflictingSchemaElementException
- If there is an existing syntax with the same numeric OID.
-
addToSchemaOverwrite
public SchemaBuilder addToSchemaOverwrite()
Adds this syntax to the schema overwriting any existing syntax with the same numeric OID.- Returns:
- The parent schema builder.
-
description
public Syntax.Builder description(String description)
Sets the description.- Parameters:
description
- The description, which may benull
in which case the empty string will be used.- Returns:
- This builder.
-
extraProperties
public Syntax.Builder extraProperties(Map<String,List<String>> extraProperties)
Adds the provided collection of extended properties.- Parameters:
extraProperties
- The collection of extended properties.- Returns:
- This builder.
-
extraProperties
public Syntax.Builder extraProperties(String extensionName, String... extensionValues)
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.
-
oid
public Syntax.Builder oid(String oid)
Sets the numeric OID which uniquely identifies this syntax.- Parameters:
oid
- The numeric OID.- Returns:
- This builder.
-
removeAllExtraProperties
public Syntax.Builder removeAllExtraProperties()
Removes all extra properties.- Returns:
- This builder.
-
removeExtraProperty
public Syntax.Builder removeExtraProperty(String extensionName, String... extensionValues)
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.
-
implementation
public Syntax.Builder implementation(SyntaxImpl implementation)
Sets the syntax implementation.- Parameters:
implementation
- The syntax implementation.- Returns:
- This builder.
-
-