Class ObjectClass
java.lang.Object
org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
org.apache.directory.api.ldap.model.schema.ObjectClass
- All Implemented Interfaces:
Serializable, SchemaObject
An objectClass definition.
According to ldapbis [MODELS]:
Object Class definitions are written according to the ABNF:
ObjectClassDescription = LPAREN WSP
numericoid ; object identifier
[ SP "NAME" SP qdescrs ] ; short names (descriptors)
[ SP "DESC" SP qdstring ] ; description
[ SP "OBSOLETE" ] ; not active
[ SP "SUP" SP oids ] ; superior object classes
[ SP kind ] ; kind of class
[ SP "MUST" SP oids ] ; attribute types
[ SP "MAY" SP oids ] ; attribute types
extensions WSP RPAREN
kind = "ABSTRACT" / "STRUCTURAL" / "AUXILIARY"
where:
[numericoid] is object identifier assigned to this object class;
NAME [qdescrs] are short names (descriptors) identifying this object
class;
DESC [qdstring] is a short descriptive string;
OBSOLETE indicates this object class is not active;
SUP [oids] specifies the direct superclasses of this object class;
the kind of object class is indicated by one of ABSTRACT,
STRUCTURAL, or AUXILIARY, default is STRUCTURAL;
MUST and MAY specify the sets of required and allowed attribute
types, respectively; and
[extensions] describe extensions.
- Author:
- Apache Directory Project
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe list of allowed AttributeType OIDsprotected List<AttributeType> The list of allowed AttributeTypesThe list of required AttributeType OIDsprotected List<AttributeType> The list of required AttributeTypesprotected ObjectClassTypeEnumThe ObjectClass type : ABSTRACT, AUXILIARY or STRUCTURALstatic final longDeclares the Serial Version UidThe ObjectClass superior OIDsprotected List<ObjectClass> The ObjectClass superiorsFields inherited from class AbstractSchemaObject
description, extensions, h, isEnabled, isObsolete, locked, names, objectType, oid, schemaName, specification -
Constructor Summary
ConstructorsConstructorDescriptionObjectClass(String oid) Creates a new instance of MatchingRuleUseDescription -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMayAttributeTypeOids(String... oids) Add some allowed AttributeTypevoidaddMayAttributeTypes(AttributeType... attributeTypes) Add some allowed AttributeTypesvoidaddMustAttributeTypeOids(String... oids) Add some required AttributeType OIDsvoidaddMustAttributeTypes(AttributeType... attributeTypes) Add some required AttributeTypesvoidaddSuperior(ObjectClass... objectClasses) Add some superior ObjectClassesvoidaddSuperiorOids(String... oids) Add some superior ObjectClass OIDsvoidclear()Clear the current SchemaObject : remove all the references to other objects, and all the Maps.copy()Copy an ObjectClassbooleanGets the superclasses OIDsof this ObjectClass.Gets the superclasses of this ObjectClass.getType()Gets the type of this ObjectClass as a type safe enum.booleanTells if the current ObjectClass is ABSTRACTbooleanTells if the current ObjectClass is AUXILIARYbooleanTells if the current ObjectClass is STRUCTURALprotected voidrehash()Compute the hashcode, and store it in the 'h' variablevoidsetMayAttributeTypeOids(List<String> mayAttributeTypeOids) voidsetMayAttributeTypes(List<AttributeType> mayAttributeTypes) Sets the list of allowed AttributeTypesvoidsetMustAttributeTypeOids(List<String> mustAttributeTypeOids) voidsetMustAttributeTypes(List<AttributeType> mustAttributeTypes) Sets the list of required AttributeTypesvoidsetSuperiorOids(List<String> superiorOids) Sets the superior object class OIDsvoidsetSuperiors(List<ObjectClass> superiors) Sets the superior object classesvoidsetType(ObjectClassTypeEnum objectClassType) Set the ObjectClass type, one of ABSTRACT, AUXILIARY or STRUCTURAL.toString()Methods inherited from class AbstractSchemaObject
addExtension, addExtension, addName, compareOid, copy, getDescription, getExtension, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hasExtension, hashCode, isDisabled, isEnabled, isObsolete, lock, rehashBase, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setSchemaName, setSpecification, unlock
-
Field Details
-
serialVersionUID
public static final long serialVersionUIDDeclares the Serial Version Uid- See Also:
-
objectClassType
The ObjectClass type : ABSTRACT, AUXILIARY or STRUCTURAL -
superiorOids
-
superiors
The ObjectClass superiors -
mayAttributeTypeOids
-
mayAttributeTypes
The list of allowed AttributeTypes -
mustAttributeTypeOids
-
mustAttributeTypes
The list of required AttributeTypes
-
-
Constructor Details
-
ObjectClass
Creates a new instance of MatchingRuleUseDescription- Parameters:
oid- the OID for this objectClass
-
-
Method Details
-
getMayAttributeTypeOids
-
getMayAttributeTypes
- Returns:
- the mayAttributeTypes
-
addMayAttributeTypeOids
Add some allowed AttributeType- Parameters:
oids- The attributeType oids
-
addMayAttributeTypes
Add some allowed AttributeTypes- Parameters:
attributeTypes- The attributeTypes
-
setMayAttributeTypeOids
-
setMayAttributeTypes
Sets the list of allowed AttributeTypes- Parameters:
mayAttributeTypes- the list of allowed AttributeTypes
-
getMustAttributeTypeOids
-
getMustAttributeTypes
- Returns:
- the mustAttributeTypes
-
addMustAttributeTypeOids
Add some required AttributeType OIDs- Parameters:
oids- The attributeType OIDs
-
addMustAttributeTypes
Add some required AttributeTypes- Parameters:
attributeTypes- The attributeTypse
-
setMustAttributeTypeOids
-
setMustAttributeTypes
Sets the list of required AttributeTypes- Parameters:
mustAttributeTypes- the list of required AttributeTypes
-
getSuperiors
Gets the superclasses of this ObjectClass.- Returns:
- the superclasses
-
getSuperiorOids
-
addSuperiorOids
Add some superior ObjectClass OIDs- Parameters:
oids- The superior ObjectClass OIDs
-
addSuperior
Add some superior ObjectClasses- Parameters:
objectClasses- The superior ObjectClasses
-
setSuperiors
Sets the superior object classes- Parameters:
superiors- the object classes to set
-
setSuperiorOids
-
getType
Gets the type of this ObjectClass as a type safe enum.- Returns:
- the ObjectClass type as an enum
-
setType
Set the ObjectClass type, one of ABSTRACT, AUXILIARY or STRUCTURAL.- Parameters:
objectClassType- The ObjectClassType value
-
isStructural
public boolean isStructural()Tells if the current ObjectClass is STRUCTURAL- Returns:
trueif the ObjectClass is STRUCTURAL
-
isAbstract
public boolean isAbstract()Tells if the current ObjectClass is ABSTRACT- Returns:
trueif the ObjectClass is ABSTRACT
-
isAuxiliary
public boolean isAuxiliary()Tells if the current ObjectClass is AUXILIARY- Returns:
trueif the ObjectClass is AUXILIARY
-
toString
-
copy
-
rehash
protected void rehash()Description copied from class:AbstractSchemaObjectCompute the hashcode, and store it in the 'h' variable- Overrides:
rehashin classAbstractSchemaObject- See Also:
-
equals
Description copied from class:AbstractSchemaObject- Specified by:
equalsin interfaceSchemaObject- Overrides:
equalsin classAbstractSchemaObject- See Also:
-
clear
public void clear()Clear the current SchemaObject : remove all the references to other objects, and all the Maps.- Specified by:
clearin interfaceSchemaObject- Overrides:
clearin classAbstractSchemaObject
-