public class DitContentRule extends AbstractSchemaObject
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.
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID
The mandatory serialVersionUID
|
Constructor and Description |
---|
DitContentRule(String oid)
Creates a DitContentRule object using a unique OID.
|
Modifier and Type | Method and Description |
---|---|
void |
addAuxObjectClasses(ObjectClass objectClass)
Add an Auxiliary ObjectClass
|
void |
addAuxObjectClassOidOids(String oid)
Add an Auxiliary ObjectClass Oid
|
void |
addMayAttributeTypeOids(String oid)
Add an allowed AttributeType
|
void |
addMayAttributeTypes(AttributeType attributeType)
Add an allowed AttributeType
|
void |
addMustAttributeTypeOids(String oid)
Add a required AttributeType OID
|
void |
addMustAttributeTypes(AttributeType attributeType)
Add a required AttributeType
|
void |
addNotAttributeTypeOids(String oid)
Add a precluded AttributeType
|
void |
addNotAttributeTypes(AttributeType attributeType)
Add a precluded AttributeType
|
void |
clear()
Clear the current SchemaObject : remove all the references to other objects,
and all the Maps.
|
DitContentRule |
copy()
Copy a DitContentRule
|
boolean |
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() |
int |
hashCode() |
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 AttributeTypes
|
void |
setMustAttributeTypeOids(List<String> mustAttributeTypeOids) |
void |
setMustAttributeTypes(List<AttributeType> mustAttributeTypes)
Sets the list of required AttributeTypes
|
void |
setNotAttributeTypeOids(List<String> notAttributeTypeOids) |
void |
setNotAttributeTypes(List<AttributeType> notAttributeTypes)
Sets the list of precluded AttributeTypes
|
String |
toString() |
addExtension, addExtension, addName, 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
public static final long serialVersionUID
public DitContentRule(String oid)
oid
- the OID for this DitContentRulepublic List<String> getAuxObjectClassOids()
public void addAuxObjectClassOidOids(String oid)
oid
- The ObjectClass oidpublic void addAuxObjectClasses(ObjectClass objectClass)
objectClass
- The ObjectClasspublic void setAuxObjectClassOids(List<String> auxObjectClassOids)
auxObjectClassOids
- the auxObjectClassOids to setpublic void setAuxObjectClasses(List<ObjectClass> auxObjectClasses)
auxObjectClasses
- the auxObjectClasses to setpublic List<ObjectClass> getAuxObjectClasses()
public List<String> getMayAttributeTypeOids()
public void addMayAttributeTypeOids(String oid)
oid
- The attributeType oidpublic void addMayAttributeTypes(AttributeType attributeType)
attributeType
- The attributeTypepublic void setMayAttributeTypeOids(List<String> mayAttributeTypeOids)
mayAttributeTypeOids
- the mayAttributeTypeOids to setpublic void setMayAttributeTypes(List<AttributeType> mayAttributeTypes)
mayAttributeTypes
- the list of allowed AttributeTypespublic List<AttributeType> getMayAttributeTypes()
public List<String> getMustAttributeTypeOids()
public void addMustAttributeTypeOids(String oid)
oid
- The attributeType OIDpublic void addMustAttributeTypes(AttributeType attributeType)
attributeType
- The attributeTypepublic void setMustAttributeTypeOids(List<String> mustAttributeTypeOids)
mustAttributeTypeOids
- the mustAttributeTypeOids to setpublic void setMustAttributeTypes(List<AttributeType> mustAttributeTypes)
mustAttributeTypes
- the list of required AttributeTypespublic List<AttributeType> getMustAttributeTypes()
public List<String> getNotAttributeTypeOids()
public void addNotAttributeTypeOids(String oid)
oid
- The attributeType oidpublic void addNotAttributeTypes(AttributeType attributeType)
attributeType
- The attributeTypepublic void setNotAttributeTypeOids(List<String> notAttributeTypeOids)
notAttributeTypeOids
- the notAttributeTypeOids to setpublic void setNotAttributeTypes(List<AttributeType> notAttributeTypes)
notAttributeTypes
- the list of precluded AttributeTypespublic List<AttributeType> getNotAttributeTypes()
public String toString()
toString
in class Object
Object.toString()
public DitContentRule copy()
public int hashCode()
AbstractSchemaObject
hashCode
in interface SchemaObject
hashCode
in class AbstractSchemaObject
Object.equals(Object)
public boolean equals(Object o)
AbstractSchemaObject
equals
in interface SchemaObject
equals
in class AbstractSchemaObject
Object.equals(Object)
public void clear()
clear
in interface SchemaObject
clear
in class AbstractSchemaObject
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.