Package org.ldaptive.schema
Class NameForm
java.lang.Object
org.ldaptive.schema.AbstractSchemaElement
org.ldaptive.schema.AbstractNamedSchemaElement
org.ldaptive.schema.NameForm
- All Implemented Interfaces:
SchemaElement
Bean for a name form schema element.
NameFormDescription = LPAREN WSP numericoid ; object identifier [ SP "NAME" SP qdescrs ] ; short names (descriptors) [ SP "DESC" SP qdstring ] ; 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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Parses a name form definition using a char buffer.static class
Parses a name form definition using a regular expression. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
format()
Returns this schema element as formatted string per RFC 4512.getOID()
Returns the oid.String[]
Returns the optional attributes.String[]
Returns the required attributes.Returns the structural object class.int
hashCode()
static NameForm
Parses the supplied definition string and creates an initialized name form.void
Sets the optional attributes.void
Sets the required attributes.void
Sets the structural object class.toString()
Methods inherited from class org.ldaptive.schema.AbstractNamedSchemaElement
getName, getNames, hasName, isObsolete, setNames, setObsolete
Methods inherited from class org.ldaptive.schema.AbstractSchemaElement
containsBooleanExtension, getDescription, getExtensions, setDescription, setExtensions
-
Field Details
-
HASH_CODE_SEED
private static final int HASH_CODE_SEEDhash code seed.- See Also:
-
oid
OID. -
structuralClass
Structural object class. -
requiredAttributes
Required attributes. -
optionalAttributes
Optional attributes.
-
-
Constructor Details
-
NameForm
Creates a new name form.- Parameters:
s
- oid
-
NameForm
public NameForm(String oid, String[] names, String description, boolean obsolete, String structuralClass, String[] requiredAttributes, String[] optionalAttributes, Extensions extensions) Creates a new name form.- Parameters:
oid
- oidnames
- namesdescription
- descriptionobsolete
- obsoletestructuralClass
- structural object classrequiredAttributes
- required attributesoptionalAttributes
- optional attributesextensions
- extensions
-
-
Method Details
-
getOID
Returns the oid.- Returns:
- oid
-
getStructuralClass
Returns the structural object class.- Returns:
- structural object class
-
setStructuralClass
Sets the structural object class.- Parameters:
s
- structural object class
-
getRequiredAttributes
Returns the required attributes.- Returns:
- required attributes
-
setRequiredAttributes
Sets the required attributes.- Parameters:
s
- required attributes
-
getOptionalAttributes
Returns the optional attributes.- Returns:
- optional attributes
-
setOptionalAttributes
Sets the optional attributes.- Parameters:
s
- optional attributes
-
parse
Parses the supplied definition string and creates an initialized name form.- Parameters:
definition
- to parse- Returns:
- name form
- Throws:
SchemaParseException
- if the supplied definition is invalid
-
format
Description copied from interface:SchemaElement
Returns this schema element as formatted string per RFC 4512.- Returns:
- formatted string
-
equals
- Overrides:
equals
in classAbstractSchemaElement
-
hashCode
public int hashCode()- Specified by:
hashCode
in classAbstractSchemaElement
-
toString
-