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
public class NameForm extends AbstractNamedSchemaElement
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- Author:
- Middleware Services
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNameForm.DefaultDefinitionFunctionParses a name form definition using a char buffer.static classNameForm.RegexDefinitionFunctionParses a name form definition using a regular expression.
-
Constructor Summary
Constructors Constructor Description NameForm(java.lang.String s)Creates a new name form.NameForm(java.lang.String oid, java.lang.String[] names, java.lang.String description, boolean obsolete, java.lang.String structuralClass, java.lang.String[] requiredAttributes, java.lang.String[] optionalAttributes, Extensions extensions)Creates a new name form.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.Stringformat()Returns this schema element as formatted string per RFC 4512.java.lang.StringgetOID()Returns the oid.java.lang.String[]getOptionalAttributes()Returns the optional attributes.java.lang.String[]getRequiredAttributes()Returns the required attributes.java.lang.StringgetStructuralClass()Returns the structural object class.inthashCode()static NameFormparse(java.lang.String definition)Parses the supplied definition string and creates an initialized name form.voidsetOptionalAttributes(java.lang.String[] s)Sets the optional attributes.voidsetRequiredAttributes(java.lang.String[] s)Sets the required attributes.voidsetStructuralClass(java.lang.String s)Sets the structural object class.java.lang.StringtoString()-
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
-
-
-
-
Constructor Detail
-
NameForm
public NameForm(java.lang.String s)
Creates a new name form.- Parameters:
s- oid
-
NameForm
public NameForm(java.lang.String oid, java.lang.String[] names, java.lang.String description, boolean obsolete, java.lang.String structuralClass, java.lang.String[] requiredAttributes, java.lang.String[] optionalAttributes, Extensions extensions)Creates a new name form.- Parameters:
oid- oidnames- namesdescription- descriptionobsolete- obsoletestructuralClass- structural object classrequiredAttributes- required attributesoptionalAttributes- optional attributesextensions- extensions
-
-
Method Detail
-
getOID
public java.lang.String getOID()
Returns the oid.- Returns:
- oid
-
getStructuralClass
public java.lang.String getStructuralClass()
Returns the structural object class.- Returns:
- structural object class
-
setStructuralClass
public void setStructuralClass(java.lang.String s)
Sets the structural object class.- Parameters:
s- structural object class
-
getRequiredAttributes
public java.lang.String[] getRequiredAttributes()
Returns the required attributes.- Returns:
- required attributes
-
setRequiredAttributes
public void setRequiredAttributes(java.lang.String[] s)
Sets the required attributes.- Parameters:
s- required attributes
-
getOptionalAttributes
public java.lang.String[] getOptionalAttributes()
Returns the optional attributes.- Returns:
- optional attributes
-
setOptionalAttributes
public void setOptionalAttributes(java.lang.String[] s)
Sets the optional attributes.- Parameters:
s- optional attributes
-
parse
public static NameForm parse(java.lang.String definition) throws SchemaParseException
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
public java.lang.String format()
Description copied from interface:SchemaElementReturns this schema element as formatted string per RFC 4512.- Returns:
- formatted string
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classAbstractSchemaElement
-
hashCode
public int hashCode()
- Specified by:
hashCodein classAbstractSchemaElement
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-