public static final class ObjectClass.Builder extends Object
Modifier and Type | Method and Description |
---|---|
SchemaBuilder |
addToSchema()
Adds this object class to the schema, throwing a
ConflictingSchemaElementException if there is an existing
object class with the same numeric OID. |
SchemaBuilder |
addToSchemaOverwrite()
Adds this object class to the schema overwriting any existing object class
with the same numeric OID.
|
ObjectClass.Builder |
description(String description)
Sets the description.
|
ObjectClass.Builder |
extraProperties(Map<String,List<String>> extraProperties)
Adds the provided collection of extended properties.
|
T |
extraProperties(String extensionName,
List<String> extensionValues)
Adds the provided extended property.
|
ObjectClass.Builder |
extraProperties(String extensionName,
String... extensionValues)
Adds the provided extended property.
|
ObjectClass.Builder |
names(Collection<String> names)
Adds the provided user friendly names.
|
ObjectClass.Builder |
names(String... names)
Adds the provided user friendly names.
|
ObjectClass.Builder |
obsolete(boolean isObsolete)
Specifies whether this schema element is obsolete.
|
ObjectClass.Builder |
oid(String oid)
Sets the numeric OID which uniquely identifies this object class.
|
ObjectClass.Builder |
optionalAttributes(Collection<String> attributeNamesOrOids)
Adds the provided optional attributes.
|
ObjectClass.Builder |
optionalAttributes(String... attributeNamesOrOids)
Adds the provided optional attributes.
|
ObjectClass.Builder |
removeAllExtraProperties()
Removes all extra properties.
|
ObjectClass.Builder |
removeAllNames()
Removes all user defined names.
|
ObjectClass.Builder |
removeAllOptionalAttributes()
Removes all optional attributes.
|
ObjectClass.Builder |
removeAllRequiredAttributes()
Removes all required attributes.
|
ObjectClass.Builder |
removeAllSuperiorObjectClass()
Removes all superior object class.
|
ObjectClass.Builder |
removeExtraProperty(String extensionName,
String... extensionValues)
Removes the specified extended property.
|
ObjectClass.Builder |
removeName(String name)
Removes the provided user defined name.
|
ObjectClass.Builder |
removeOptionalAttribute(String attributeNameOrOid)
Removes the provided optional attribute.
|
ObjectClass.Builder |
removeRequiredAttribute(String attributeNameOrOid)
Removes the provided required attribute.
|
ObjectClass.Builder |
removeSuperiorObjectClass(String objectClassNameOrOid)
Removes the provided superior object class.
|
ObjectClass.Builder |
requiredAttributes(Collection<String> attributeNamesOrOids)
Adds the provided required attributes.
|
ObjectClass.Builder |
requiredAttributes(String... attributeNamesOrOids)
Adds the provided required attributes.
|
ObjectClass.Builder |
superiorObjectClasses(Collection<String> objectClassNamesOrOids)
Adds the provided superior object classes.
|
ObjectClass.Builder |
superiorObjectClasses(String... objectClassNamesOrOids)
Adds the provided superior object classes.
|
ObjectClass.Builder |
type(ObjectClassType type)
Sets the type of this object class.
|
public SchemaBuilder addToSchema()
ConflictingSchemaElementException
if there is an existing
object class with the same numeric OID.ConflictingSchemaElementException
- If there is an existing object class with the same numeric
OID.public SchemaBuilder addToSchemaOverwrite()
public ObjectClass.Builder description(String description)
description
- The description, which may be null
in which case
the empty string will be used.public ObjectClass.Builder extraProperties(Map<String,List<String>> extraProperties)
extraProperties
- The collection of extended properties.public ObjectClass.Builder extraProperties(String extensionName, String... extensionValues)
extensionName
- The name of the extended property.extensionValues
- The optional list of values for the extended property.public ObjectClass.Builder names(Collection<String> names)
names
- The user friendly names.public ObjectClass.Builder names(String... names)
names
- The user friendly names.public ObjectClass.Builder obsolete(boolean isObsolete)
isObsolete
- true
if this schema element is obsolete
(default is false
).public ObjectClass.Builder oid(String oid)
oid
- The numeric OID.public ObjectClass.Builder optionalAttributes(Collection<String> attributeNamesOrOids)
attributeNamesOrOids
- The list of optional attribute names or OIDs.public ObjectClass.Builder optionalAttributes(String... attributeNamesOrOids)
attributeNamesOrOids
- The list of optional attribute names or OIDs.public ObjectClass.Builder removeAllExtraProperties()
public ObjectClass.Builder removeExtraProperty(String extensionName, String... extensionValues)
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.public ObjectClass.Builder removeAllNames()
public ObjectClass.Builder removeAllOptionalAttributes()
public ObjectClass.Builder removeAllRequiredAttributes()
public ObjectClass.Builder removeAllSuperiorObjectClass()
public ObjectClass.Builder removeName(String name)
name
- The user defined name to be removed.public ObjectClass.Builder removeOptionalAttribute(String attributeNameOrOid)
attributeNameOrOid
- The optional attribute name or OID to be removed.public ObjectClass.Builder removeRequiredAttribute(String attributeNameOrOid)
attributeNameOrOid
- The provided required attribute name or OID to be removed.public ObjectClass.Builder removeSuperiorObjectClass(String objectClassNameOrOid)
objectClassNameOrOid
- The superior object class name or OID to be removed.public ObjectClass.Builder requiredAttributes(Collection<String> attributeNamesOrOids)
attributeNamesOrOids
- The list of required attribute names or OIDs.public ObjectClass.Builder requiredAttributes(String... attributeNamesOrOids)
attributeNamesOrOids
- The list of required attribute names or OIDs.public ObjectClass.Builder superiorObjectClasses(Collection<String> objectClassNamesOrOids)
objectClassNamesOrOids
- The list of superior object classes names or OIDs.public ObjectClass.Builder superiorObjectClasses(String... objectClassNamesOrOids)
objectClassNamesOrOids
- The list of superior object classes names or OIDs.public ObjectClass.Builder type(ObjectClassType type)
type
- The object class type.Copyright © 2010-2018, ForgeRock All Rights Reserved.