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
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longDeclares the Serial Version UidFields inherited from class AbstractSchemaObject
description, extensions, h, isEnabled, isObsolete, locked, names, objectType, oid, schemaName, specification -
Constructor Summary
ConstructorsConstructorDescriptionDitContentRule(String oid) Creates a DitContentRule object using a unique OID. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAuxObjectClasses(ObjectClass objectClass) Add an Auxiliary ObjectClassvoidAdd an Auxiliary ObjectClass OidvoidAdd an allowed AttributeTypevoidaddMayAttributeTypes(AttributeType attributeType) Add an allowed AttributeTypevoidAdd a required AttributeType OIDvoidaddMustAttributeTypes(AttributeType attributeType) Add a required AttributeTypevoidAdd a precluded AttributeTypevoidaddNotAttributeTypes(AttributeType attributeType) Add a precluded AttributeTypevoidclear()Clear the current SchemaObject : remove all the references to other objects, and all the Maps.copy()Copy a DitContentRulebooleanvoidrehash()Compute the hashcode, and store it in the 'h' variablevoidsetAuxObjectClasses(List<ObjectClass> auxObjectClasses) voidsetAuxObjectClassOids(List<String> auxObjectClassOids) voidsetMayAttributeTypeOids(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 AttributeTypesvoidsetNotAttributeTypeOids(List<String> notAttributeTypeOids) voidsetNotAttributeTypes(List<AttributeType> notAttributeTypes) Sets the list of precluded AttributeTypestoString()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:
-
-
Constructor Details
-
DitContentRule
Creates a DitContentRule object using a unique OID.- Parameters:
oid- the OID for this DitContentRule
-
-
Method Details
-
getAuxObjectClassOids
-
addAuxObjectClassOidOids
Add an Auxiliary ObjectClass Oid- Parameters:
oid- The ObjectClass oid
-
addAuxObjectClasses
Add an Auxiliary ObjectClass- Parameters:
objectClass- The ObjectClass
-
setAuxObjectClassOids
-
setAuxObjectClasses
- Parameters:
auxObjectClasses- the auxObjectClasses to set
-
getAuxObjectClasses
- Returns:
- the auxObjectClasses
-
getMayAttributeTypeOids
-
addMayAttributeTypeOids
Add an allowed AttributeType- Parameters:
oid- The attributeType oid
-
addMayAttributeTypes
Add an allowed AttributeType- Parameters:
attributeType- The attributeType
-
setMayAttributeTypeOids
-
setMayAttributeTypes
Sets the list of allowed AttributeTypes- Parameters:
mayAttributeTypes- the list of allowed AttributeTypes
-
getMayAttributeTypes
- Returns:
- the mayAttributeTypes
-
getMustAttributeTypeOids
-
addMustAttributeTypeOids
Add a required AttributeType OID- Parameters:
oid- The attributeType OID
-
addMustAttributeTypes
Add a required AttributeType- Parameters:
attributeType- The attributeType
-
setMustAttributeTypeOids
-
setMustAttributeTypes
Sets the list of required AttributeTypes- Parameters:
mustAttributeTypes- the list of required AttributeTypes
-
getMustAttributeTypes
- Returns:
- the mustAttributeTypes
-
getNotAttributeTypeOids
-
addNotAttributeTypeOids
Add a precluded AttributeType- Parameters:
oid- The attributeType oid
-
addNotAttributeTypes
Add a precluded AttributeType- Parameters:
attributeType- The attributeType
-
setNotAttributeTypeOids
-
setNotAttributeTypes
Sets the list of precluded AttributeTypes- Parameters:
notAttributeTypes- the list of precluded AttributeTypes
-
getNotAttributeTypes
- Returns:
- the notAttributeTypes
-
toString
-
copy
-
rehash
public 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
-