public class NameForm extends AbstractSchemaObject
According to ldapbis [MODELS]:
4.1.7.2. Name Forms
A name form "specifies a permissible Rdn for entries of a particular
structural object class. A name form identifies a named object
class and one or more attribute types to be used for naming (i.e.
for the Rdn). Name forms are primitive pieces of specification
used in the definition of DIT structure rules" [X.501].
Each name form indicates the structural object class to be named,
a set of required attribute types, and a set of allowed attributes
types. A particular attribute type cannot be listed in both sets.
Entries governed by the form must be named using a value from each
required attribute type and zero or more values from the allowed
attribute types.
Each name form is identified by an object identifier (OID) and,
optionally, one or more short names (descriptors).
Name form descriptions are written according to the ABNF:
NameFormDescription = LPAREN WSP
numericoid ; object identifier
[ SP "NAME" SP qdescrs ] ; short names (descriptors)
[ SP "DESC" SP qdstring ] ;String description
[ SP "OBSOLETE" ] ; not active
SP "OC" SP oid ; structural object class
SP "MUST" SP oids ; attribute types
[ SP "MAY" SP oids ] ; attribute types
extensions WSP RPAREN ; extensions
where:
[numericoid] is object identifier which identifies this name form;
NAME [qdescrs] are short names (descriptors) identifying this name
form;
DESC [qdstring] is a short descriptive string;
OBSOLETE indicates this name form is not active;
OC identifies the structural object class this rule applies to,
MUST and MAY specify the sets of required and allowed, respectively,
naming attributes for this name form; and
[extensions] describe extensions.
All attribute types in the required ("MUST") and allowed ("MAY") lists
shall be different.
| Modifier and Type | Field and Description |
|---|---|
private List<String> |
mayAttributeTypeOids
The set of allowed attribute OIDs for this name form
|
private List<AttributeType> |
mayAttributeTypes
The set of allowed AttributeTypes for this name form
|
private List<String> |
mustAttributeTypeOids
The set of required attribute OIDs for this name form
|
private List<AttributeType> |
mustAttributeTypes
The set of required AttributeTypes for this name form
|
static long |
serialVersionUID
The mandatory serialVersionUID
|
private ObjectClass |
structuralObjectClass
The structural object class this rule applies to
|
private String |
structuralObjectClassOid
The structural object class OID this rule applies to
|
description, extensions, h, isEnabled, isObsolete, locked, names, objectType, oid, schemaName, specification| Constructor and Description |
|---|
NameForm(String oid)
Creates a new instance of MatchingRule.
|
| Modifier and Type | Method and Description |
|---|---|
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 |
clear()
Clear the current SchemaObject : remove all the references to other objects,
and all the Maps.
|
NameForm |
copy()
Copy a NameForm
|
boolean |
equals(Object o) |
List<String> |
getMayAttributeTypeOids()
Gets all the AttributeTypes OIDs of the attribute this NameForm specifies as
being usable without requirement in the given objectClass for naming: as
part of the Rdn.
|
List<AttributeType> |
getMayAttributeTypes()
Gets all the AttributeTypes of the attribute this NameForm specifies as
being useable without requirement in the given objectClass for naming: as
part of the Rdn.
|
List<String> |
getMustAttributeTypeOids()
Gets all the AttributeTypes OIDs of the attributes this NameForm specifies as
having to be used in the given objectClass for naming: as part of the
Rdn.
|
List<AttributeType> |
getMustAttributeTypes()
Gets all the AttributeTypes of the attributes this NameForm specifies as
having to be used in the given objectClass for naming: as part of the
Rdn.
|
ObjectClass |
getStructuralObjectClass()
Gets the STRUCTURAL ObjectClass this name form specifies naming
attributes for.
|
String |
getStructuralObjectClassOid()
Gets the STRUCTURAL ObjectClass this name form specifies naming
attributes for.
|
int |
hashCode() |
void |
setMayAttributeTypeOids(List<String> mayAttributeTypeOids)
Sets the list of allowed AttributeTypes
|
void |
setMayAttributeTypes(List<AttributeType> mayAttributeTypes)
Sets the list of allowed AttributeTypes
|
void |
setMustAttributeTypeOids(List<String> mustAttributeTypeOids)
Sets the list of required AttributeTypes OIDs
|
void |
setMustAttributeTypes(List<AttributeType> mustAttributeTypes)
Sets the list of required AttributeTypes
|
void |
setStructuralObjectClass(ObjectClass structuralObjectClass)
Sets the structural object class this rule applies to
|
void |
setStructuralObjectClassOid(String structuralObjectClassOid)
Sets the structural object class this rule applies to
|
String |
toString() |
addExtension, addExtension, addName, compareOid, computeHashCode, copy, getDescription, getExtension, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hasExtension, isDisabled, isEnabled, isObsolete, lock, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setSchemaName, setSpecification, unlockpublic static final long serialVersionUID
private String structuralObjectClassOid
private ObjectClass structuralObjectClass
private List<String> mustAttributeTypeOids
private List<AttributeType> mustAttributeTypes
private List<String> mayAttributeTypeOids
private List<AttributeType> mayAttributeTypes
public NameForm(String oid)
oid - The MatchingRule OIDpublic String getStructuralObjectClassOid()
public ObjectClass getStructuralObjectClass()
public void setStructuralObjectClassOid(String structuralObjectClassOid)
structuralObjectClassOid - the structural object class to setpublic void setStructuralObjectClass(ObjectClass structuralObjectClass)
structuralObjectClass - the structural object class to setpublic List<String> getMustAttributeTypeOids()
public List<AttributeType> getMustAttributeTypes()
public void setMustAttributeTypeOids(List<String> mustAttributeTypeOids)
mustAttributeTypeOids - the list of required AttributeTypes OIDspublic void setMustAttributeTypes(List<AttributeType> mustAttributeTypes)
mustAttributeTypes - the list of required AttributeTypespublic void addMustAttributeTypeOids(String oid)
oid - The attributeType OIDpublic void addMustAttributeTypes(AttributeType attributeType)
attributeType - The attributeTypepublic List<String> getMayAttributeTypeOids()
public List<AttributeType> getMayAttributeTypes()
public void setMayAttributeTypeOids(List<String> mayAttributeTypeOids)
mayAttributeTypeOids - the list of allowed AttributeTypespublic void setMayAttributeTypes(List<AttributeType> mayAttributeTypes)
mayAttributeTypes - the list of allowed AttributeTypespublic void addMayAttributeTypeOids(String oid)
oid - The attributeType oidpublic void addMayAttributeTypes(AttributeType attributeType)
attributeType - The attributeTypepublic String toString()
toString in class ObjectObject.toString()public NameForm copy()
public int hashCode()
AbstractSchemaObjecthashCode in interface SchemaObjecthashCode in class AbstractSchemaObjectObject.equals(Object)public boolean equals(Object o)
AbstractSchemaObjectequals in interface SchemaObjectequals in class AbstractSchemaObjectObject.equals(Object)public void clear()
clear in interface SchemaObjectclear in class AbstractSchemaObjectCopyright © 2003–2022 The Apache Software Foundation. All rights reserved.