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
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent API for incrementally constructing name forms. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif the provided object is a name form having the same numeric OID as this name form.final StringReturns 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.inthashCode()Returns the hash code for this name form.booleanReturnstrueif this name form has the specified user-friendly name.booleanhasNameOrOid(String nameOrOid) Returnstrueif this name form has the specified user-friendly name or numeric OID.booleanReturnstrueif this name form is "obsolete".booleanisOptional(AttributeType attributeType) Returnstrueif the provided attribute type is included in the list of optional attributes for this name form.booleanisRequired(AttributeType attributeType) Returnstrueif the provided attribute type is included in the list of required attributes for this name form.booleanisRequiredOrOptional(AttributeType attributeType) Returnstrueif the provided attribute type is included in the list of optional or required attributes for this name form.final StringtoString()Returns the string representation of this schema element as defined in RFC 2252.
-
Method Details
-
equals
Returnstrueif the provided object is a name form having the same numeric OID as this name form.- Parameters:
o- The object to be compared.- Returns:
trueif 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
Returnstrueif this name form has the specified user-friendly name.- Parameters:
name- The name.- Returns:
trueif this name form has the specified user-friendly name.
-
hasNameOrOid
Returnstrueif this name form has the specified user-friendly name or numeric OID.- Parameters:
nameOrOid- The name or numeric OID.- Returns:
trueif this name form has the specified user-friendly name or numeric OID.
-
isObsolete
public boolean isObsolete()Returnstrueif this name form is "obsolete".- Returns:
trueif this name form is "obsolete".
-
isOptional
Returnstrueif the provided attribute type is included in the list of optional attributes for this name form.- Parameters:
attributeType- The attribute type.- Returns:
trueif the provided attribute type is included in the list of optional attributes for this name form.
-
isRequired
Returnstrueif the provided attribute type is included in the list of required attributes for this name form.- Parameters:
attributeType- The attribute type.- Returns:
trueif the provided attribute type is included in the list of required attributes for this name form.
-
isRequiredOrOptional
Returnstrueif the provided attribute type is included in the list of optional or required attributes for this name form.- Parameters:
attributeType- The attribute type.- Returns:
trueif the provided attribute type is included in the list of optional or required attributes for this name form.
-
getDescription
Description copied from interface:SchemaElementReturns the description of this schema element, or the empty string if it does not have a description.- Specified by:
getDescriptionin interfaceSchemaElement- Returns:
- The description of this schema element, or the empty string if it does not have a description.
-
getExtraProperties
Description copied from interface:SchemaElementReturns an unmodifiable map containing all of the extra properties associated with this schema element.- Specified by:
getExtraPropertiesin 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.
-