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 boolean
equals(java.lang.Object o)
Indicates whether the provided object is equal to this object class.java.lang.String
getDescription()
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.String
getNameOrOID()
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.ObjectClassType
getObjectClassType()
Retrieves the object class type for this object class.java.lang.String
getOID()
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.String
getSchemaFileName()
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.int
hashCode()
Retrieves a hash code for this object class.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.boolean
isObsolete()
Indicates whether this object class is declared obsolete in the server schema.boolean
isOptional(AttributeType t)
Indicates whether the provided attribute type is optional for use with this object class or any of its superior classes.boolean
isRequired(AttributeType t)
Indicates whether the provided attribute type is required for use with this object class or any of its superior classes.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.java.lang.String
toString()
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:
true
if the provided string matches the OID or one of the names for this object class, orfalse
if not.
-
getDescription
java.lang.String getDescription()
Retrieves the description for this object class, if any.- Returns:
- The description for this object class, or
null
if 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:
true
if the provided attribute type is required for use with this object class, orfalse
if 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:
true
if the provided attribute type is optional for use with this object class, orfalse
if 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:
true
if the provided attribute type is allowed for use with this object class, orfalse
if 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:
true
if this object class is declared obsolete in the server schema, orfalse
if 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:
equals
in classjava.lang.Object
- Parameters:
o
- The object for which to make the determination.- Returns:
true
if the provided object is equal to this object class, orfalse
if not.
-
hashCode
int hashCode()
Retrieves a hash code for this object class.- Overrides:
hashCode
in 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:
toString
in classjava.lang.Object
- Returns:
- A string representation of this object class definition.
-
-