@PublicAPI(stability=UNCOMMITTED, mayInstantiate=false, mayExtend=false, mayInvoke=true) public final class ObjectClass extends CommonSchemaElements
Any methods which accesses the set of names associated with this
object class, will retrieve the primary name as the first name,
regardless of whether or not it was contained in the original set
of names
passed to the constructor.
Where ordered sets of names, attribute types, or extra properties
are provided, the ordering will be preserved when the associated
fields are accessed via their getters or via the
toString()
methods.
Constructor and Description |
---|
ObjectClass(String definition,
String primaryName,
Collection<String> names,
String oid,
String description,
Set<ObjectClass> superiorClasses,
Set<AttributeType> requiredAttributes,
Set<AttributeType> optionalAttributes,
org.forgerock.opendj.ldap.schema.ObjectClassType objectClassType,
boolean isObsolete,
Map<String,List<String>> extraProperties)
Creates a new objectclass definition with the provided
information.
|
Modifier and Type | Method and Description |
---|---|
org.forgerock.opendj.ldap.schema.ObjectClassType |
getObjectClassType()
Retrieves the objectclass type for this objectclass.
|
Set<AttributeType> |
getOptionalAttributeChain()
Retrieves an unmodifiable view of the set of optional attributes
for this objectclass and any superior objectclasses that it might
have.
|
Set<AttributeType> |
getOptionalAttributes()
Retrieves an unmodifiable view of the set of optional attributes
for this objectclass.
|
Set<AttributeType> |
getRequiredAttributeChain()
Retrieves an unmodifiable view of the set of all required
attributes for this objectclass and any superior objectclasses
that it might have.
|
Set<AttributeType> |
getRequiredAttributes()
Retrieves an unmodifiable view of the set of required attributes
for this objectclass.
|
Set<ObjectClass> |
getSuperiorClasses()
Retrieves an unmodifiable view of the set of direct superior
classes for this objectclass.
|
boolean |
isDescendantOf(ObjectClass objectClass)
Indicates whether this objectclass is a descendant of the
provided class.
|
boolean |
isDirty()
Returns
true if this object class has been removed or replaced in
the schema. |
boolean |
isExtensibleObject()
Indicates whether this objectclass is the extensibleObject
objectclass.
|
boolean |
isOptional(AttributeType attributeType)
Indicates whether the provided attribute type is included in the
optional attribute list for this or any of its superior
objectclasses.
|
boolean |
isRequired(AttributeType attributeType)
Indicates whether the provided attribute type is included in the
required attribute list for this or any of its superior
objectclasses.
|
boolean |
isRequiredOrOptional(AttributeType attributeType)
Indicates whether the provided attribute type is in the list of
required or optional attributes for this objectclass or any of
its superior classes.
|
ObjectClass |
setDirty()
Marks this object class as dirty, indicating that it has been removed or
replaced in the schema.
|
String |
toString() |
checkSafeProperties, equals, getDefinitionWithFileName, getDescription, getExtraProperties, getNameOrOID, getNormalizedNames, getNormalizedPrimaryName, getNormalizedPrimaryNameOrOID, getOID, getPrimaryName, getSchemaFile, getSingleValueProperty, getUserDefinedNames, hashCode, hasName, hasNameOrOID, isObsolete, setExtraProperty, setExtraProperty, setSchemaFile
public ObjectClass(String definition, String primaryName, Collection<String> names, String oid, String description, Set<ObjectClass> superiorClasses, Set<AttributeType> requiredAttributes, Set<AttributeType> optionalAttributes, org.forgerock.opendj.ldap.schema.ObjectClassType objectClassType, boolean isObsolete, Map<String,List<String>> extraProperties)
If no primaryName
is specified, but a set of
names
is specified, then the first name retrieved
from the set of names
will be used as the primary
name.
definition
- The definition string used to create this objectclass.
It must not be null
.primaryName
- The primary name for this objectclass, or
null
if there is no primary name.names
- The set of names that may be used to reference this
objectclass.oid
- The OID for this objectclass. It must not be
null
.description
- The description for this objectclass, or null
if
there is no description.superiorClasses
- The superior classes for this objectclass, or
null
if there is no superior object class.requiredAttributes
- The set of required attribute types for this
objectclass.optionalAttributes
- The set of optional attribute types for this
objectclass.objectClassType
- The objectclass type for this objectclass, or
null
to default to structural.isObsolete
- Indicates whether this objectclass is declared
"obsolete".extraProperties
- A set of extra properties for this objectclass.public Set<ObjectClass> getSuperiorClasses()
public boolean isDescendantOf(ObjectClass objectClass)
objectClass
- The objectClass for which to make the determination.true
if this objectclass is a descendant
of the provided class, or false
if not.public Set<AttributeType> getRequiredAttributes()
public Set<AttributeType> getRequiredAttributeChain()
public boolean isRequired(AttributeType attributeType)
attributeType
- The attribute type for which to make the determination.true
if the provided attribute type is
required by this objectclass or any of its superior
classes, or false
if not.public Set<AttributeType> getOptionalAttributes()
public Set<AttributeType> getOptionalAttributeChain()
public boolean isOptional(AttributeType attributeType)
attributeType
- The attribute type for which to make the determination.true
if the provided attribute type is
optional for this objectclass or any of its superior
classes, or false
if not.public boolean isRequiredOrOptional(AttributeType attributeType)
attributeType
- The attribute type for which to make the determination.true
if the provided attribute type is
required or allowed for this objectclass or any of its
superior classes, or false
if it is not.public org.forgerock.opendj.ldap.schema.ObjectClassType getObjectClassType()
public boolean isExtensibleObject()
true
if this objectclass is the
extensibleObject objectclass, or false
if
it is not.public ObjectClass setDirty()
public boolean isDirty()
true
if this object class has been removed or replaced in
the schema.true
if this object class has been removed or replaced in
the schema.Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.