Package org.forgerock.opendj.ldap.schema
Class NameForm
java.lang.Object
org.forgerock.opendj.ldap.schema.NameForm
- All Implemented Interfaces:
SchemaElement
This class defines a data structure for storing and interacting with a name
form, which defines the attribute type(s) that must and/or may be used in the
RDN of an entry with a given structural objectclass.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent API for incrementally constructing name forms. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if the provided object is a name form having the same numeric OID as this name form.final String
Returns the description of this schema element, or the empty string if it does not have a description.Returns an unmodifiable map containing all of the extra properties associated with this schema element.Returns the name or numeric OID of this name form.getNames()
Returns an unmodifiable list containing the user-friendly names that may be used to reference this name form.getOid()
Returns the numeric OID of this name form.Returns an unmodifiable set containing the optional attributes of this name form.Returns an unmodifiable set containing the required attributes of this name form.Returns the structural objectclass of this name form.int
hashCode()
Returns the hash code for this name form.boolean
Returnstrue
if this name form has the specified user-friendly name.boolean
hasNameOrOid
(String nameOrOid) Returnstrue
if this name form has the specified user-friendly name or numeric OID.boolean
Returnstrue
if this name form is "obsolete".boolean
isOptional
(AttributeType attributeType) Returnstrue
if the provided attribute type is included in the list of optional attributes for this name form.boolean
isRequired
(AttributeType attributeType) Returnstrue
if the provided attribute type is included in the list of required attributes for this name form.boolean
isRequiredOrOptional
(AttributeType attributeType) Returnstrue
if the provided attribute type is included in the list of optional or required attributes for this name form.final String
toString()
Returns the string representation of this schema element as defined in RFC 2252.
-
Method Details
-
equals
Returnstrue
if the provided object is a name form having the same numeric OID as this name form.- Parameters:
o
- The object to be compared.- Returns:
true
if the provided object is a name form having the same numeric OID as this name form.
-
getNameOrOid
Returns the name or numeric OID of this name form. If it has one or more names, then the primary name will be returned. If it does not have any names, then the numeric OID will be returned.- Returns:
- The name or numeric OID of this name form.
-
getNames
Returns an unmodifiable list containing the user-friendly names that may be used to reference this name form.- Returns:
- An unmodifiable list containing the user-friendly names that may be used to reference this name form.
-
getOid
Returns the numeric OID of this name form.- Returns:
- The numeric OID of this name form.
-
getOptionalAttributes
Returns an unmodifiable set containing the optional attributes of this name form.- Returns:
- An unmodifiable set containing the optional attributes of this name form.
-
getRequiredAttributes
Returns an unmodifiable set containing the required attributes of this name form.- Returns:
- An unmodifiable set containing the required attributes of this name form.
-
getStructuralClass
Returns the structural objectclass of this name form.- Returns:
- The structural objectclass of this name form.
-
hashCode
public int hashCode()Returns the hash code for this name form. It will be calculated as the hash code of the lowercase version of the numeric OID.- Returns:
- The hash code for this name form.
-
hasName
Returnstrue
if this name form has the specified user-friendly name.- Parameters:
name
- The name.- Returns:
true
if this name form has the specified user-friendly name.
-
hasNameOrOid
Returnstrue
if this name form has the specified user-friendly name or numeric OID.- Parameters:
nameOrOid
- The name or numeric OID.- Returns:
true
if this name form has the specified user-friendly name or numeric OID.
-
isObsolete
public boolean isObsolete()Returnstrue
if this name form is "obsolete".- Returns:
true
if this name form is "obsolete".
-
isOptional
Returnstrue
if the provided attribute type is included in the list of optional attributes for this name form.- Parameters:
attributeType
- The attribute type.- Returns:
true
if the provided attribute type is included in the list of optional attributes for this name form.
-
isRequired
Returnstrue
if the provided attribute type is included in the list of required attributes for this name form.- Parameters:
attributeType
- The attribute type.- Returns:
true
if the provided attribute type is included in the list of required attributes for this name form.
-
isRequiredOrOptional
Returnstrue
if the provided attribute type is included in the list of optional or required attributes for this name form.- Parameters:
attributeType
- The attribute type.- Returns:
true
if the provided attribute type is included in the list of optional or required attributes for this name form.
-
getDescription
Description copied from interface:SchemaElement
Returns the description of this schema element, or the empty string if it does not have a description.- Specified by:
getDescription
in interfaceSchemaElement
- Returns:
- The description of this schema element, or the empty string if it does not have a description.
-
getExtraProperties
Description copied from interface:SchemaElement
Returns an unmodifiable map containing all of the extra properties associated with this schema element.- Specified by:
getExtraProperties
in interfaceSchemaElement
- Returns:
- An unmodifiable map containing all of the extra properties associated with this schema element.
-
toString
Returns the string representation of this schema element as defined in RFC 2252.
-