Class DitContentRule
- java.lang.Object
-
- org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
-
- org.apache.directory.api.ldap.model.schema.DitContentRule
-
- All Implemented Interfaces:
Serializable
,SchemaObject
public class DitContentRule extends AbstractSchemaObject
A ditContentRule specification. ditContentRules identify the content of entries of a particular structural objectClass. They specify the AUXILIARY objectClasses and additional attribute types permitted to appear, or excluded from appearing in entries of the indicated STRUCTURAL objectClass.According to ldapbis [MODELS]:
4.1.6. DIT Content Rules A DIT content rule is a "rule governing the content of entries of a particular structural object class" [X.501]. For DIT entries of a particular structural object class, a DIT content rule specifies which auxiliary object classes the entries are allowed to belong to and which additional attributes (by type) are required, allowed or not allowed to appear in the entries. The list of precluded attributes cannot include any attribute listed as mandatory in rule, the structural object class, or any of the allowed auxiliary object classes. Each content rule is identified by the object identifier, as well as any short names (descriptors), of the structural object class it applies to. An entry may only belong to auxiliary object classes listed in the governing content rule. An entry must contain all attributes required by the object classes the entry belongs to as well as all attributed required by the governing content rule. An entry may contain any non-precluded attributes allowed by the object classes the entry belongs to as well as all attributes allowed by the governing content rule. An entry cannot include any attribute precluded by the governing content rule. An entry is governed by (if present and active in the subschema) the DIT content rule which applies to the structural object class of the entry (see Section 2.4.2). If no active rule is present for the entry's structural object class, the entry's content is governed by the structural object class (and possibly other aspects of user and system schema). DIT content rule descriptions are written according to the ABNF: DITContentRuleDescription = LPAREN WSP numericoid ; object identifier [ SP "NAME" SP qdescrs ] ; short names (descriptors) [ SP "DESC" SP qdstring ] ; description [ SP "OBSOLETE" ] ; not active [ SP "AUX" SP oids ] ; auxiliary object classes [ SP "MUST" SP oids ] ; attribute types [ SP "MAY" SP oids ] ; attribute types [ SP "NOT" SP oids ] ; attribute types extensions WSP RPAREN ; extensions where: [numericoid] is the object identifier of the structural object class associated with this DIT content rule; NAME [qdescrs] are short names (descriptors) identifying this DIT content rule; DESC [qdstring] is a short descriptive string; OBSOLETE indicates this DIT content rule use is not active; AUX specifies a list of auxiliary object classes which entries subject to this DIT content rule may belong to; MUST, MAY, and NOT specify lists of attribute types which are required, allowed, or precluded, respectively, from appearing in entries subject to this DIT content rule; and [extensions] describe extensions.
- Author:
- Apache Directory Project
- See Also:
- RFC 2252 Section 5.4.3, ldapbis [MODELS], Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static long
serialVersionUID
The mandatory serialVersionUID
-
Constructor Summary
Constructors Constructor Description DitContentRule(String oid)
Creates a DitContentRule object using a unique OID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAuxObjectClasses(ObjectClass objectClass)
Add an Auxiliary ObjectClassvoid
addAuxObjectClassOidOids(String oid)
Add an Auxiliary ObjectClass Oidvoid
addMayAttributeTypeOids(String oid)
Add an allowed AttributeTypevoid
addMayAttributeTypes(AttributeType attributeType)
Add an allowed AttributeTypevoid
addMustAttributeTypeOids(String oid)
Add a required AttributeType OIDvoid
addMustAttributeTypes(AttributeType attributeType)
Add a required AttributeTypevoid
addNotAttributeTypeOids(String oid)
Add a precluded AttributeTypevoid
addNotAttributeTypes(AttributeType attributeType)
Add a precluded AttributeTypevoid
clear()
Clear the current SchemaObject : remove all the references to other objects, and all the Maps.DitContentRule
copy()
Copy a DitContentRuleboolean
equals(Object o)
List<ObjectClass>
getAuxObjectClasses()
List<String>
getAuxObjectClassOids()
List<String>
getMayAttributeTypeOids()
List<AttributeType>
getMayAttributeTypes()
List<String>
getMustAttributeTypeOids()
List<AttributeType>
getMustAttributeTypes()
List<String>
getNotAttributeTypeOids()
List<AttributeType>
getNotAttributeTypes()
void
setAuxObjectClasses(List<ObjectClass> auxObjectClasses)
void
setAuxObjectClassOids(List<String> auxObjectClassOids)
void
setMayAttributeTypeOids(List<String> mayAttributeTypeOids)
void
setMayAttributeTypes(List<AttributeType> mayAttributeTypes)
Sets the list of allowed AttributeTypesvoid
setMustAttributeTypeOids(List<String> mustAttributeTypeOids)
void
setMustAttributeTypes(List<AttributeType> mustAttributeTypes)
Sets the list of required AttributeTypesvoid
setNotAttributeTypeOids(List<String> notAttributeTypeOids)
void
setNotAttributeTypes(List<AttributeType> notAttributeTypes)
Sets the list of precluded AttributeTypesString
toString()
-
Methods inherited from class org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
addExtension, addExtension, addName, copy, getDescription, getExtension, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hasExtension, hashCode, 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
-
-
Constructor Detail
-
DitContentRule
public DitContentRule(String oid)
Creates a DitContentRule object using a unique OID.- Parameters:
oid
- the OID for this DitContentRule
-
-
Method Detail
-
getAuxObjectClassOids
public List<String> getAuxObjectClassOids()
- Returns:
- the auxObjectClassOids
-
addAuxObjectClassOidOids
public void addAuxObjectClassOidOids(String oid)
Add an Auxiliary ObjectClass Oid- Parameters:
oid
- The ObjectClass oid
-
addAuxObjectClasses
public void addAuxObjectClasses(ObjectClass objectClass)
Add an Auxiliary ObjectClass- Parameters:
objectClass
- The ObjectClass
-
setAuxObjectClassOids
public void setAuxObjectClassOids(List<String> auxObjectClassOids)
- Parameters:
auxObjectClassOids
- the auxObjectClassOids to set
-
setAuxObjectClasses
public void setAuxObjectClasses(List<ObjectClass> auxObjectClasses)
- Parameters:
auxObjectClasses
- the auxObjectClasses to set
-
getAuxObjectClasses
public List<ObjectClass> getAuxObjectClasses()
- Returns:
- the auxObjectClasses
-
getMayAttributeTypeOids
public List<String> getMayAttributeTypeOids()
- Returns:
- the mayAttributeTypeOids
-
addMayAttributeTypeOids
public void addMayAttributeTypeOids(String oid)
Add an allowed AttributeType- Parameters:
oid
- The attributeType oid
-
addMayAttributeTypes
public void addMayAttributeTypes(AttributeType attributeType)
Add an allowed AttributeType- Parameters:
attributeType
- The attributeType
-
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
-
getMayAttributeTypes
public List<AttributeType> getMayAttributeTypes()
- Returns:
- the mayAttributeTypes
-
getMustAttributeTypeOids
public List<String> getMustAttributeTypeOids()
- Returns:
- the mustAttributeTypeOids
-
addMustAttributeTypeOids
public void addMustAttributeTypeOids(String oid)
Add a required AttributeType OID- Parameters:
oid
- The attributeType OID
-
addMustAttributeTypes
public void addMustAttributeTypes(AttributeType attributeType)
Add a required AttributeType- Parameters:
attributeType
- The attributeType
-
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
-
getMustAttributeTypes
public List<AttributeType> getMustAttributeTypes()
- Returns:
- the mustAttributeTypes
-
getNotAttributeTypeOids
public List<String> getNotAttributeTypeOids()
- Returns:
- the notAttributeTypeOids
-
addNotAttributeTypeOids
public void addNotAttributeTypeOids(String oid)
Add a precluded AttributeType- Parameters:
oid
- The attributeType oid
-
addNotAttributeTypes
public void addNotAttributeTypes(AttributeType attributeType)
Add a precluded AttributeType- Parameters:
attributeType
- The attributeType
-
setNotAttributeTypeOids
public void setNotAttributeTypeOids(List<String> notAttributeTypeOids)
- Parameters:
notAttributeTypeOids
- the notAttributeTypeOids to set
-
setNotAttributeTypes
public void setNotAttributeTypes(List<AttributeType> notAttributeTypes)
Sets the list of precluded AttributeTypes- Parameters:
notAttributeTypes
- the list of precluded AttributeTypes
-
getNotAttributeTypes
public List<AttributeType> getNotAttributeTypes()
- Returns:
- the notAttributeTypes
-
toString
public String toString()
- Overrides:
toString
in classObject
- See Also:
Object.toString()
-
copy
public DitContentRule copy()
Copy a DitContentRule- Returns:
- The copied SchemaObject
-
equals
public boolean equals(Object o)
Description copied from class:AbstractSchemaObject
- Specified by:
equals
in interfaceSchemaObject
- Overrides:
equals
in 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:
clear
in interfaceSchemaObject
- Overrides:
clear
in classAbstractSchemaObject
-
-