Interface ObjectClass
-
@NotExtensible @ThreadSafety(level=INTERFACE_THREADSAFE) public interface ObjectClass
This interface defines a set of methods that may be used to obtain information about an object class defined in the server schema.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Indicates whether the provided object is equal to this object class.java.lang.StringgetDescription()Retrieves the description for this object class, if any.java.util.Map<java.lang.String,java.util.List<java.lang.String>>getExtensions()Retrieves a map of all defined extensions for this object class.java.lang.StringgetNameOrOID()Retrieves the primary name for this object class, or the numeric OID if no names are defined.java.util.List<java.lang.String>getNames()Retrieves the list of names for this object class, if any.ObjectClassTypegetObjectClassType()Retrieves the object class type for this object class.java.lang.StringgetOID()Retrieves the numeric OID for this object class.java.util.Set<AttributeType>getOptionalAttributeChain()Retrieves the set of optional attributes for this object class and all of its superior classes.java.util.Set<AttributeType>getOptionalAttributes()Retrieves the set of optional attributes for this object class.java.util.Set<AttributeType>getRequiredAttributeChain()Retrieves the set of required attributes for this object class and all of its superior classes.java.util.Set<AttributeType>getRequiredAttributes()Retrieves the set of required attributes for this object class.java.lang.StringgetSchemaFileName()Retrieves the name of the schema file in which this object class is defined.java.util.List<ObjectClass>getSuperiorClasses()Retrieves the immediate superior classes for this object class, if any.inthashCode()Retrieves a hash code for this object class.booleanhasNameOrOID(java.lang.String name)Indicates whether the provided string is equal to the OID or any of the defined names for this object class.booleanisObsolete()Indicates whether this object class is declared obsolete in the server schema.booleanisOptional(AttributeType t)Indicates whether the provided attribute type is optional for use with this object class or any of its superior classes.booleanisRequired(AttributeType t)Indicates whether the provided attribute type is required for use with this object class or any of its superior classes.booleanisRequiredOrOptional(AttributeType t)Indicates whether the provided attribute type is allowed for use with this object class or any of its superior classes, either as a required or optional type.java.lang.StringtoString()Retrieves a string representation of this object class definition.
-
-
-
Method Detail
-
getOID
java.lang.String getOID()
Retrieves the numeric OID for this object class.- Returns:
- The numeric OID for this object class.
-
getNames
java.util.List<java.lang.String> getNames()
Retrieves the list of names for this object class, if any.- Returns:
- The list of names for this object class, or an empty list if there are no user-defined names.
-
getNameOrOID
java.lang.String getNameOrOID()
Retrieves the primary name for this object class, or the numeric OID if no names are defined.- Returns:
- The primary name or OID for this object class.
-
hasNameOrOID
boolean hasNameOrOID(java.lang.String name)
Indicates whether the provided string is equal to the OID or any of the defined names for this object class.- Parameters:
name- The name for which to make the determination.- Returns:
trueif the provided string matches the OID or one of the names for this object class, orfalseif not.
-
getDescription
java.lang.String getDescription()
Retrieves the description for this object class, if any.- Returns:
- The description for this object class, or
nullif it does not have a description.
-
getSuperiorClasses
java.util.List<ObjectClass> getSuperiorClasses()
Retrieves the immediate superior classes for this object class, if any.- Returns:
- The immediate superior classes for this object class, or an empty list if this object class does not have any superior classes.
-
getRequiredAttributes
java.util.Set<AttributeType> getRequiredAttributes()
Retrieves the set of required attributes for this object class. This set will only include the required attributes defined for this object class itself and not those of its superior classes.- Returns:
- The set of required attributes for this object class, or an empty list if it does not have any required attributes.
-
getRequiredAttributeChain
java.util.Set<AttributeType> getRequiredAttributeChain()
Retrieves the set of required attributes for this object class and all of its superior classes.- Returns:
- The set of required attributes for this object class and all of its superior classes, or an empty list if it does not have any required attributes.
-
isRequired
boolean isRequired(AttributeType t)
Indicates whether the provided attribute type is required for use with this object class or any of its superior classes.- Parameters:
t- The attribute type for which to make the definition.- Returns:
trueif the provided attribute type is required for use with this object class, orfalseif not.
-
getOptionalAttributes
java.util.Set<AttributeType> getOptionalAttributes()
Retrieves the set of optional attributes for this object class. This set will only include the optional attributes defined for this object class itself and not those of its superior classes.- Returns:
- The set of optional attributes for this object class, or an empty list if it does not have any optional attributes.
-
getOptionalAttributeChain
java.util.Set<AttributeType> getOptionalAttributeChain()
Retrieves the set of optional attributes for this object class and all of its superior classes.- Returns:
- The set of optional attributes for this object class and all of its superior classes, or an empty list if it does not have any optional attributes.
-
isOptional
boolean isOptional(AttributeType t)
Indicates whether the provided attribute type is optional for use with this object class or any of its superior classes.- Parameters:
t- The attribute type for which to make the definition.- Returns:
trueif the provided attribute type is optional for use with this object class, orfalseif not.
-
isRequiredOrOptional
boolean isRequiredOrOptional(AttributeType t)
Indicates whether the provided attribute type is allowed for use with this object class or any of its superior classes, either as a required or optional type.- Parameters:
t- The attribute type for which to make the definition.- Returns:
trueif the provided attribute type is allowed for use with this object class, orfalseif not.
-
getObjectClassType
ObjectClassType getObjectClassType()
Retrieves the object class type for this object class.- Returns:
- The object class type for this object class.
-
isObsolete
boolean isObsolete()
Indicates whether this object class is declared obsolete in the server schema.- Returns:
trueif this object class is declared obsolete in the server schema, orfalseif not.
-
getExtensions
java.util.Map<java.lang.String,java.util.List<java.lang.String>> getExtensions()
Retrieves a map of all defined extensions for this object class.- Returns:
- A map of all defined extensions for this object class.
-
getSchemaFileName
java.lang.String getSchemaFileName()
Retrieves the name of the schema file in which this object class is defined.- Returns:
- The name of the schema file in which this object class is defined.
-
equals
boolean equals(java.lang.Object o)
Indicates whether the provided object is equal to this object class.- Overrides:
equalsin classjava.lang.Object- Parameters:
o- The object for which to make the determination.- Returns:
trueif the provided object is equal to this object class, orfalseif not.
-
hashCode
int hashCode()
Retrieves a hash code for this object class.- Overrides:
hashCodein classjava.lang.Object- Returns:
- A hash code for this object class.
-
toString
java.lang.String toString()
Retrieves a string representation of this object class definition.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of this object class definition.
-
-