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
public class ObjectClass extends AbstractSchemaObject
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:
- RFC2252 Section 4.4, ldapbis [MODELS], Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>mayAttributeTypeOidsThe list of allowed AttributeType OIDsprotected List<AttributeType>mayAttributeTypesThe list of allowed AttributeTypesprotected List<String>mustAttributeTypeOidsThe list of required AttributeType OIDsprotected List<AttributeType>mustAttributeTypesThe list of required AttributeTypesprotected ObjectClassTypeEnumobjectClassTypeThe ObjectClass type : ABSTRACT, AUXILIARY or STRUCTURALstatic longserialVersionUIDThe mandatory serialVersionUIDprotected List<String>superiorOidsThe ObjectClass superior OIDsprotected List<ObjectClass>superiorsThe ObjectClass superiors-
Fields inherited from class org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
description, extensions, h, isEnabled, isObsolete, locked, names, objectType, oid, schemaName, specification
-
-
Constructor Summary
Constructors Constructor Description ObjectClass(String oid)Creates a new instance of MatchingRuleUseDescription
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMayAttributeTypeOids(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.ObjectClasscopy()Copy an ObjectClassbooleanequals(Object o)List<String>getMayAttributeTypeOids()List<AttributeType>getMayAttributeTypes()List<String>getMustAttributeTypeOids()List<AttributeType>getMustAttributeTypes()List<String>getSuperiorOids()Gets the superclasses OIDsof this ObjectClass.List<ObjectClass>getSuperiors()Gets the superclasses of this ObjectClass.ObjectClassTypeEnumgetType()Gets the type of this ObjectClass as a type safe enum.inthashCode()booleanisAbstract()Tells if the current ObjectClass is ABSTRACTbooleanisAuxiliary()Tells if the current ObjectClass is AUXILIARYbooleanisStructural()Tells if the current ObjectClass is STRUCTURALvoidsetMayAttributeTypeOids(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.StringtoString()-
Methods inherited from class org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
addExtension, addExtension, addName, compareOid, computeHashCode, copy, getDescription, getExtension, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hasExtension, isDisabled, isEnabled, isObsolete, lock, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setSchemaName, setSpecification, unlock
-
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
The mandatory serialVersionUID- See Also:
- Constant Field Values
-
objectClassType
protected ObjectClassTypeEnum objectClassType
The ObjectClass type : ABSTRACT, AUXILIARY or STRUCTURAL
-
superiors
protected transient List<ObjectClass> superiors
The ObjectClass superiors
-
mayAttributeTypeOids
protected transient List<String> mayAttributeTypeOids
The list of allowed AttributeType OIDs
-
mayAttributeTypes
protected transient List<AttributeType> mayAttributeTypes
The list of allowed AttributeTypes
-
mustAttributeTypeOids
protected transient List<String> mustAttributeTypeOids
The list of required AttributeType OIDs
-
mustAttributeTypes
protected transient List<AttributeType> mustAttributeTypes
The list of required AttributeTypes
-
-
Constructor Detail
-
ObjectClass
public ObjectClass(String oid)
Creates a new instance of MatchingRuleUseDescription- Parameters:
oid- the OID for this objectClass
-
-
Method Detail
-
getMayAttributeTypeOids
public List<String> getMayAttributeTypeOids()
- Returns:
- the mayAttributeTypeOids
-
getMayAttributeTypes
public List<AttributeType> getMayAttributeTypes()
- Returns:
- the mayAttributeTypes
-
addMayAttributeTypeOids
public void addMayAttributeTypeOids(String... oids)
Add some allowed AttributeType- Parameters:
oids- The attributeType oids
-
addMayAttributeTypes
public void addMayAttributeTypes(AttributeType... attributeTypes)
Add some allowed AttributeTypes- Parameters:
attributeTypes- The attributeTypes
-
setMayAttributeTypeOids
public void setMayAttributeTypeOids(List<String> mayAttributeTypeOids)
- Parameters:
mayAttributeTypeOids- the mayAttributeTypeOids to set
-
setMayAttributeTypes
public void setMayAttributeTypes(List<AttributeType> mayAttributeTypes)
Sets the list of allowed AttributeTypes- Parameters:
mayAttributeTypes- the list of allowed AttributeTypes
-
getMustAttributeTypeOids
public List<String> getMustAttributeTypeOids()
- Returns:
- the mustAttributeTypeOids
-
getMustAttributeTypes
public List<AttributeType> getMustAttributeTypes()
- Returns:
- the mustAttributeTypes
-
addMustAttributeTypeOids
public void addMustAttributeTypeOids(String... oids)
Add some required AttributeType OIDs- Parameters:
oids- The attributeType OIDs
-
addMustAttributeTypes
public void addMustAttributeTypes(AttributeType... attributeTypes)
Add some required AttributeTypes- Parameters:
attributeTypes- The attributeTypse
-
setMustAttributeTypeOids
public void setMustAttributeTypeOids(List<String> mustAttributeTypeOids)
- Parameters:
mustAttributeTypeOids- the mustAttributeTypeOids to set
-
setMustAttributeTypes
public void setMustAttributeTypes(List<AttributeType> mustAttributeTypes)
Sets the list of required AttributeTypes- Parameters:
mustAttributeTypes- the list of required AttributeTypes
-
getSuperiors
public List<ObjectClass> getSuperiors()
Gets the superclasses of this ObjectClass.- Returns:
- the superclasses
-
getSuperiorOids
public List<String> getSuperiorOids()
Gets the superclasses OIDsof this ObjectClass.- Returns:
- the superclasses OIDs
-
addSuperiorOids
public void addSuperiorOids(String... oids)
Add some superior ObjectClass OIDs- Parameters:
oids- The superior ObjectClass OIDs
-
addSuperior
public void addSuperior(ObjectClass... objectClasses)
Add some superior ObjectClasses- Parameters:
objectClasses- The superior ObjectClasses
-
setSuperiors
public void setSuperiors(List<ObjectClass> superiors)
Sets the superior object classes- Parameters:
superiors- the object classes to set
-
setSuperiorOids
public void setSuperiorOids(List<String> superiorOids)
Sets the superior object class OIDs- Parameters:
superiorOids- the object class OIDs to set
-
getType
public ObjectClassTypeEnum getType()
Gets the type of this ObjectClass as a type safe enum.- Returns:
- the ObjectClass type as an enum
-
setType
public void setType(ObjectClassTypeEnum objectClassType)
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
-
copy
public ObjectClass copy()
Copy an ObjectClass- Returns:
- The copied SchemaObject
-
hashCode
public int hashCode()
Description copied from class:AbstractSchemaObject- Specified by:
hashCodein interfaceSchemaObject- Overrides:
hashCodein classAbstractSchemaObject- See Also:
Object.equals(Object)
-
equals
public boolean equals(Object o)
Description copied from class:AbstractSchemaObject- Specified by:
equalsin interfaceSchemaObject- Overrides:
equalsin classAbstractSchemaObject- See Also:
Object.equals(Object)
-
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
-
-