|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.ldap.model.schema.AbstractSchemaObject
org.apache.directory.shared.ldap.model.schema.ObjectClass
public class ObjectClass
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.
DescriptionUtils.getDescription(ObjectClass),
Serialized Form| Field Summary |
|---|
| Fields inherited from class org.apache.directory.shared.ldap.model.schema.AbstractSchemaObject |
|---|
description, extensions, isEnabled, isObsolete, isReadOnly, locked, names, objectType, oid, schemaName, specification |
| Constructor Summary | |
|---|---|
ObjectClass(String oid)
Creates a new instance of MatchingRuleUseDescription |
|
| Method Summary | |
|---|---|
void |
addMayAttributeTypeOids(String... oids)
Add some allowed AttributeType |
void |
addMayAttributeTypes(AttributeType... attributeTypes)
Add some allowed AttributeTypes |
void |
addMustAttributeTypeOids(String... oids)
Add some required AttributeType OIDs |
void |
addMustAttributeTypes(AttributeType... attributeTypes)
Add some required AttributeTypes |
void |
addSuperior(ObjectClass... objectClasses)
Add some superior ObjectClasses |
void |
addSuperiorOids(String... oids)
Add some superior ObjectClass OIDs |
void |
clear()
Clear the current SchemaObject : remove all the references to other objects, and all the Maps. |
ObjectClass |
copy()
Copy an ObjectClass |
boolean |
equals(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. |
ObjectClassTypeEnum |
getType()
Gets the type of this ObjectClass as a type safe enum. |
boolean |
isAbstract()
Tells if the current ObjectClass is ABSTRACT |
boolean |
isAuxiliary()
Tells if the current ObjectClass is AUXILIARY |
boolean |
isStructural()
Tells if the current ObjectClass is STRUCTURAL |
void |
removeFromRegistries(List<Throwable> errors,
Registries registries)
Remove the ObjectClass from the registries, updating the references to other SchemaObject. |
void |
setMayAttributeTypeOids(List<String> mayAttributeTypeOids)
|
void |
setMayAttributeTypes(List<AttributeType> mayAttributeTypes)
Sets the list of allowed AttributeTypes |
void |
setMustAttributeTypeOids(List<String> mustAttributeTypeOids)
|
void |
setMustAttributeTypes(List<AttributeType> mustAttributeTypes)
Sets the list of required AttributeTypes |
void |
setSuperiorOids(List<String> superiorOids)
Sets the superior object class OIDs |
void |
setSuperiors(List<ObjectClass> superiors)
Sets the superior object classes |
void |
setType(ObjectClassTypeEnum objectClassType)
Set the ObjectClass type, one of ABSTRACT, AUXILIARY or STRUCTURAL. |
String |
toString()
|
void |
updateMayAttributeTypes(List<AttributeType> mayAttributeTypes)
Update the associated MAY AttributeType, even if the SchemaObject is readOnly |
void |
updateMustAttributeTypes(List<AttributeType> mustAttributeTypes)
Update the associated MUST AttributeType, even if the SchemaObject is readOnly |
void |
updateSuperiors(List<ObjectClass> superiors)
Update the associated SUPERIORS ObjectClasses, even if the SchemaObject is readOnly |
| Methods inherited from class org.apache.directory.shared.ldap.model.schema.AbstractSchemaObject |
|---|
addExtension, addExtension, addName, addToRegistries, compareOid, copy, getDescription, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hashCode, isDisabled, isEnabled, isObsolete, isReadOnly, lock, registerOid, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setReadOnly, setRegistries, setSchemaName, setSpecification, unlock |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectClass(String oid)
oid - the OID for this objectClass| Method Detail |
|---|
public void removeFromRegistries(List<Throwable> errors,
Registries registries)
throws LdapException
removeFromRegistries in interface SchemaObjectremoveFromRegistries in class AbstractSchemaObjecterrors - The errors we got while removing the ObjectClass from the registriesregistries - The Registries
If - the ObjectClass is not valid
LdapException - if one of the referenced schema objects does not existpublic List<String> getMayAttributeTypeOids()
public List<AttributeType> getMayAttributeTypes()
public void addMayAttributeTypeOids(String... oids)
oids - The attributeType oidspublic void addMayAttributeTypes(AttributeType... attributeTypes)
attributeTypes - The attributeTypespublic void setMayAttributeTypeOids(List<String> mayAttributeTypeOids)
mayAttributeTypeOids - the mayAttributeTypeOids to setpublic void setMayAttributeTypes(List<AttributeType> mayAttributeTypes)
mayAttributeTypes - the list of allowed AttributeTypespublic void updateMayAttributeTypes(List<AttributeType> mayAttributeTypes)
mayAttributeTypes - the list of allowed AttributeTypespublic List<String> getMustAttributeTypeOids()
public List<AttributeType> getMustAttributeTypes()
public void addMustAttributeTypeOids(String... oids)
oids - The attributeType OIDspublic void addMustAttributeTypes(AttributeType... attributeTypes)
attributeTypes - The attributeTypsepublic void setMustAttributeTypeOids(List<String> mustAttributeTypeOids)
mustAttributeTypeOids - the mustAttributeTypeOids to setpublic void setMustAttributeTypes(List<AttributeType> mustAttributeTypes)
mustAttributeTypes - the list of required AttributeTypespublic void updateMustAttributeTypes(List<AttributeType> mustAttributeTypes)
mustAttributeTypes - the list of allowed AttributeTypespublic List<ObjectClass> getSuperiors()
public List<String> getSuperiorOids()
public void addSuperiorOids(String... oids)
oids - The superior ObjectClass OIDspublic void addSuperior(ObjectClass... objectClasses)
objectClasses - The superior ObjectClassespublic void setSuperiors(List<ObjectClass> superiors)
superiors - the object classes to setpublic void updateSuperiors(List<ObjectClass> superiors)
superiors - the object classes to setpublic void setSuperiorOids(List<String> superiorOids)
superiorOids - the object class OIDs to setpublic ObjectClassTypeEnum getType()
public void setType(ObjectClassTypeEnum objectClassType)
objectClassType - The ObjectClassType valuepublic boolean isStructural()
true if the ObjectClass is STRUCTURALpublic boolean isAbstract()
true if the ObjectClass is ABSTRACTpublic boolean isAuxiliary()
true if the ObjectClass is AUXILIARYpublic String toString()
toString in class ObjectObject.toString()public ObjectClass copy()
copy in interface SchemaObjectcopy in class AbstractSchemaObjectpublic boolean equals(Object o)
SchemaObject
equals in interface SchemaObjectequals in class AbstractSchemaObjectObject.equals(Object)public void clear()
clear in interface SchemaObjectclear in class AbstractSchemaObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||