Class ObjectClassHolder
- java.lang.Object
-
- org.apache.directory.api.ldap.schema.converter.SchemaElementImpl
-
- org.apache.directory.api.ldap.schema.converter.ObjectClassHolder
-
- All Implemented Interfaces:
SchemaElement
public class ObjectClassHolder extends SchemaElementImpl
A bean used to encapsulate the literal String values of an ObjectClass definition found within an OpenLDAP schema configuration file.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description ObjectClassHolder(String oid)
Create an instance of ObjectClass element
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
dnToLdif(String schemaName)
Transform a schema name to a Dn pointing to the correct position in the DITObjectClassTypeEnum
getClassType()
List<String>
getMay()
List<String>
getMust()
List<String>
getSuperiors()
Get the list of superior for this objectClassvoid
setClassType(ObjectClassTypeEnum classType)
Set the objectClass type.void
setMay(List<String> may)
Set the list of optional attributesvoid
setMust(List<String> must)
Set the list of mandatory attributesvoid
setSuperiors(List<String> superiors)
Set the list of inherited objectClassesString
toLdif(String schemaName)
Convert this objectClass to a Ldif stringString
toString()
-
Methods inherited from class org.apache.directory.api.ldap.schema.converter.SchemaElementImpl
getDescription, getExtension, getExtensions, getNames, getOid, isObsolete, setDescription, setExtensions, setNames, setObsolete
-
-
-
-
Constructor Detail
-
ObjectClassHolder
public ObjectClassHolder(String oid)
Create an instance of ObjectClass element- Parameters:
oid
- the OjectClass OID
-
-
Method Detail
-
getSuperiors
public List<String> getSuperiors()
Get the list of superior for this objectClass- Returns:
- A list of all inherited objectClasses
-
setSuperiors
public void setSuperiors(List<String> superiors)
Set the list of inherited objectClasses- Parameters:
superiors
- The list of inherited objectClasses
-
setMust
public void setMust(List<String> must)
Set the list of mandatory attributes- Parameters:
must
- The list of mandatory attributes
-
setMay
public void setMay(List<String> may)
Set the list of optional attributes- Parameters:
may
- The list of optional attributes
-
getClassType
public ObjectClassTypeEnum getClassType()
- Returns:
- The objectClass type
-
setClassType
public void setClassType(ObjectClassTypeEnum classType)
Set the objectClass type.- Parameters:
classType
- The objectClass type.
-
toLdif
public String toLdif(String schemaName) throws LdapException
Convert this objectClass to a Ldif string- Parameters:
schemaName
- The name of the schema file containing this objectClass- Returns:
- A ldif formatted string
- Throws:
LdapException
- If something went wrong
-
dnToLdif
public String dnToLdif(String schemaName) throws LdapException
Transform a schema name to a Dn pointing to the correct position in the DIT- Specified by:
dnToLdif
in classSchemaElementImpl
- Parameters:
schemaName
- The schema name- Returns:
- the Dn associated with this schema in the DIT
- Throws:
LdapException
- If the conversion goes wrong
-
-