Package org.ldaptive.schema
Class ObjectClass
- java.lang.Object
 - 
- org.ldaptive.AbstractFreezable
 - 
- org.ldaptive.schema.AbstractSchemaElement
 - 
- org.ldaptive.schema.AbstractNamedSchemaElement
 - 
- org.ldaptive.schema.ObjectClass
 
 
 
 
 
- 
- All Implemented Interfaces:
 Freezable,SchemaElement
public final class ObjectClass extends AbstractNamedSchemaElement
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 Classes Modifier and Type Class Description static classObjectClass.DefaultDefinitionFunctionParses an object class definition using a char buffer.static classObjectClass.RegexDefinitionFunctionParses an object class definition using a regular expression. 
- 
Field Summary
Fields Modifier and Type Field Description private static intHASH_CODE_SEEDhash code seed.private ObjectClassTypeobjectClassTypeObject class type.private StringoidOID.private String[]optionalAttributesOptional attributes.private String[]requiredAttributesRequired attributes.private String[]superiorClassesSuperior classes. 
- 
Constructor Summary
Constructors Constructor Description ObjectClass(String s)Creates 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Stringformat()Returns this schema element as formatted string per RFC 4512.ObjectClassTypegetObjectClassType()Returns the object class type.StringgetOID()Returns the oid.String[]getOptionalAttributes()Returns the optional attributes.String[]getRequiredAttributes()Returns the required attributes.String[]getSuperiorClasses()Returns the superior classes.inthashCode()static ObjectClassparse(String definition)Parses the supplied definition string and creates an initialized object class.voidsetObjectClassType(ObjectClassType type)Sets the object class type.voidsetOptionalAttributes(String[] s)Sets the optional attributes.voidsetRequiredAttributes(String[] s)Sets the required attributes.voidsetSuperiorClasses(String[] s)Sets the superior classes.StringtoString()- 
Methods inherited from class org.ldaptive.schema.AbstractNamedSchemaElement
getName, getNames, hasName, isObsolete, setNames, setObsolete 
- 
Methods inherited from class org.ldaptive.schema.AbstractSchemaElement
containsBooleanExtension, freeze, getDescription, getExtensions, setDescription, setExtensions 
- 
Methods inherited from class org.ldaptive.AbstractFreezable
assertMutable, freeze, freeze, isFrozen 
 - 
 
 - 
 
- 
- 
Field Detail
- 
HASH_CODE_SEED
private static final int HASH_CODE_SEED
hash code seed.- See Also:
 - Constant Field Values
 
 
- 
oid
private final String oid
OID. 
- 
superiorClasses
private String[] superiorClasses
Superior classes. 
- 
objectClassType
private ObjectClassType objectClassType
Object class type. 
- 
requiredAttributes
private String[] requiredAttributes
Required attributes. 
- 
optionalAttributes
private String[] optionalAttributes
Optional attributes. 
 - 
 
- 
Constructor Detail
- 
ObjectClass
public ObjectClass(String s)
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 Detail
- 
getOID
public String getOID()
Returns the oid.- Returns:
 - oid
 
 
- 
getSuperiorClasses
public String[] getSuperiorClasses()
Returns the superior classes.- Returns:
 - superior classes
 
 
- 
setSuperiorClasses
public void setSuperiorClasses(String[] s)
Sets the superior classes.- Parameters:
 s- superior classes
 
- 
getObjectClassType
public ObjectClassType getObjectClassType()
Returns the object class type.- Returns:
 - object class type
 
 
- 
setObjectClassType
public void setObjectClassType(ObjectClassType type)
Sets the object class type.- Parameters:
 type- object class type
 
- 
getRequiredAttributes
public String[] getRequiredAttributes()
Returns the required attributes.- Returns:
 - required attributes
 
 
- 
setRequiredAttributes
public void setRequiredAttributes(String[] s)
Sets the required attributes.- Parameters:
 s- required attributes
 
- 
getOptionalAttributes
public String[] getOptionalAttributes()
Returns the optional attributes.- Returns:
 - optional attributes
 
 
- 
setOptionalAttributes
public void setOptionalAttributes(String[] s)
Sets the optional attributes.- Parameters:
 s- optional attributes
 
- 
parse
public static ObjectClass parse(String definition) throws SchemaParseException
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
public String format()
Description copied from interface:SchemaElementReturns this schema element as formatted string per RFC 4512.- Returns:
 - formatted string
 
 
- 
equals
public boolean equals(Object o)
- Overrides:
 equalsin classAbstractSchemaElement
 
- 
hashCode
public int hashCode()
- Specified by:
 hashCodein classAbstractSchemaElement
 
 - 
 
 -