Package org.ldaptive.schema
Class ObjectClass
java.lang.Object
org.ldaptive.schema.AbstractSchemaElement
org.ldaptive.schema.AbstractNamedSchemaElement
org.ldaptive.schema.ObjectClass
- All Implemented Interfaces:
SchemaElement
Bean for an object class schema element.
ObjectClassDescription = LPAREN WSP numericoid ; object identifier [ SP "NAME" SP qdescrs ] ; short names (descriptors) [ SP "DESC" SP qdstring ] ; description [ SP "OBSOLETE" ] ; not active [ SP "SUP" SP oids ] ; superior object classes [ SP kind ] ; kind of class [ SP "MUST" SP oids ] ; attribute types [ SP "MAY" SP oids ] ; attribute types extensions WSP RPAREN
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Parses an object class definition using a char buffer.static class
Parses an object class definition using a regular expression. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
hash code seed.private ObjectClassType
Object class type.private final String
OID.private String[]
Optional attributes.private String[]
Required attributes.private String[]
Superior classes. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new object class.ObjectClass
(String oid, String[] names, String description, boolean obsolete, String[] superiorClasses, ObjectClassType objectClassType, String[] requiredAttributes, String[] optionalAttributes, Extensions extensions) Creates a new object class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
format()
Returns this schema element as formatted string per RFC 4512.Returns the object class type.getOID()
Returns the oid.String[]
Returns the optional attributes.String[]
Returns the required attributes.String[]
Returns the superior classes.int
hashCode()
static ObjectClass
Parses the supplied definition string and creates an initialized object class.void
Sets the object class type.void
Sets the optional attributes.void
Sets the required attributes.void
setSuperiorClasses
(String[] s) Sets the superior classes.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. -
superiorClasses
Superior classes. -
objectClassType
Object class type. -
requiredAttributes
Required attributes. -
optionalAttributes
Optional attributes.
-
-
Constructor Details
-
ObjectClass
Creates a new object class.- Parameters:
s
- oid
-
ObjectClass
public ObjectClass(String oid, String[] names, String description, boolean obsolete, String[] superiorClasses, ObjectClassType objectClassType, String[] requiredAttributes, String[] optionalAttributes, Extensions extensions) Creates a new object class.- Parameters:
oid
- oidnames
- namesdescription
- descriptionobsolete
- obsoletesuperiorClasses
- superior classesobjectClassType
- object class typerequiredAttributes
- required attributesoptionalAttributes
- optional attributesextensions
- extensions
-
-
Method Details
-
getOID
Returns the oid.- Returns:
- oid
-
getSuperiorClasses
Returns the superior classes.- Returns:
- superior classes
-
setSuperiorClasses
Sets the superior classes.- Parameters:
s
- superior classes
-
getObjectClassType
Returns the object class type.- Returns:
- object class type
-
setObjectClassType
Sets the object class type.- Parameters:
type
- object class type
-
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 object class.- Parameters:
definition
- to parse- Returns:
- object class
- 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
-