org.apache.directory.api.ldap.model.schema
Class MutableObjectClass

java.lang.Object
  extended by org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
      extended by org.apache.directory.api.ldap.model.schema.ObjectClass
          extended by org.apache.directory.api.ldap.model.schema.MutableObjectClass
All Implemented Interfaces:
Serializable, SchemaObject

public class MutableObjectClass
extends 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.
 

Author:
Apache Directory Project
See Also:
RFC2252 Section 4.4, ldapbis [MODELS], DescriptionUtils#getDescription(MutableObjectClass), Serialized Form

Field Summary
 
Fields inherited from class org.apache.directory.api.ldap.model.schema.ObjectClass
mayAttributeTypeOids, mayAttributeTypes, mustAttributeTypeOids, mustAttributeTypes, objectClassType, superiorOids, superiors
 
Fields inherited from class org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
description, extensions, isEnabled, isObsolete, isReadOnly, locked, names, objectType, oid, schemaName, specification
 
Constructor Summary
MutableObjectClass(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(MutableObjectClass... 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.
 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.
 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.api.ldap.model.schema.ObjectClass
copy, equals, getMayAttributeTypeOids, getMayAttributeTypes, getMustAttributeTypeOids, getMustAttributeTypes, getSuperiorOids, getSuperiors, getType, isAbstract, isAuxiliary, isStructural, toString
 
Methods inherited from class org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
addExtension, addExtension, addName, compareOid, copy, getDescription, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hashCode, isDisabled, isEnabled, isObsolete, isReadOnly, lock, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setReadOnly, setSchemaName, setSpecification, unlock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MutableObjectClass

public MutableObjectClass(String oid)
Creates a new instance of MatchingRuleUseDescription

Parameters:
oid - the OID for this objectClass
Method Detail

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

updateMayAttributeTypes

public void updateMayAttributeTypes(List<AttributeType> mayAttributeTypes)
Update the associated MAY AttributeType, even if the SchemaObject is readOnly

Parameters:
mayAttributeTypes - the list of allowed AttributeTypes

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

updateMustAttributeTypes

public void updateMustAttributeTypes(List<AttributeType> mustAttributeTypes)
Update the associated MUST AttributeType, even if the SchemaObject is readOnly

Parameters:
mustAttributeTypes - the list of allowed AttributeTypes

addSuperiorOids

public void addSuperiorOids(String... oids)
Add some superior ObjectClass OIDs

Parameters:
oids - The superior ObjectClass OIDs

addSuperior

public void addSuperior(MutableObjectClass... 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

updateSuperiors

public void updateSuperiors(List<ObjectClass> superiors)
Update the associated SUPERIORS ObjectClasses, even if the SchemaObject is readOnly

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

setType

public void setType(ObjectClassTypeEnum objectClassType)
Set the ObjectClass type, one of ABSTRACT, AUXILIARY or STRUCTURAL.

Parameters:
objectClassType - The ObjectClassType value

clear

public void clear()
Clear the current SchemaObject : remove all the references to other objects, and all the Maps.

Specified by:
clear in interface SchemaObject
Overrides:
clear in class AbstractSchemaObject


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.