Class SchemaElementImpl
- java.lang.Object
-
- org.apache.directory.api.ldap.schema.converter.SchemaElementImpl
-
- All Implemented Interfaces:
SchemaElement
- Direct Known Subclasses:
AttributeTypeHolder
,ObjectClassHolder
public abstract class SchemaElementImpl extends Object implements SchemaElement
An abstract SchemaElement implementation. It contains shared elements from AttributeType and ObjectClass, like obsolete, oid, description, names and extensions (not implemented)- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description SchemaElementImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract String
dnToLdif(String schemaName)
Transform a Schema Element to a LDIF StringString
getDescription()
List<String>
getExtension(String key)
Map<String,List<String>>
getExtensions()
List<String>
getNames()
String
getOid()
boolean
isObsolete()
Tells if the attributeType is obsoletevoid
setDescription(String description)
Set the schema element's descriptionvoid
setExtensions(Map<String,List<String>> extensions)
Set a list of extensions for a schemaElementvoid
setNames(List<String> names)
Set a list of names for a schemaElementvoid
setObsolete(boolean obsolete)
Set the obsolete flag-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.directory.api.ldap.schema.converter.SchemaElement
toLdif
-
-
-
-
Constructor Detail
-
SchemaElementImpl
public SchemaElementImpl()
-
-
Method Detail
-
isObsolete
public boolean isObsolete()
Tells if the attributeType is obsolete- Specified by:
isObsolete
in interfaceSchemaElement
- Returns:
- true if the schema element is obsolete, folse otherwise
-
setObsolete
public void setObsolete(boolean obsolete)
Set the obsolete flag- Specified by:
setObsolete
in interfaceSchemaElement
- Parameters:
obsolete
- The value to be set
-
getOid
public String getOid()
- Specified by:
getOid
in interfaceSchemaElement
- Returns:
- the schema element's OID
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceSchemaElement
- Returns:
- Return the schema element description
-
setDescription
public void setDescription(String description)
Set the schema element's description- Specified by:
setDescription
in interfaceSchemaElement
- Parameters:
description
- The schema element's description
-
getNames
public List<String> getNames()
- Specified by:
getNames
in interfaceSchemaElement
- Returns:
- The list of names for the schemaElement
- See Also:
SchemaElement.getNames()
-
setNames
public void setNames(List<String> names)
Set a list of names for a schemaElement- Specified by:
setNames
in interfaceSchemaElement
- Parameters:
names
- The list of names of this schemaElement
-
getExtension
public List<String> getExtension(String key)
- Specified by:
getExtension
in interfaceSchemaElement
- Parameters:
key
- the Extension key- Returns:
- The list of a values for a given extension
-
getExtensions
public Map<String,List<String>> getExtensions()
- Specified by:
getExtensions
in interfaceSchemaElement
- Returns:
- The list of extensions for the schemaElement
-
setExtensions
public void setExtensions(Map<String,List<String>> extensions)
Set a list of extensions for a schemaElement- Specified by:
setExtensions
in interfaceSchemaElement
- Parameters:
extensions
- The list of extensions of this schemaElement
-
dnToLdif
public abstract String dnToLdif(String schemaName) throws LdapException
Transform a Schema Element to a LDIF String- Parameters:
schemaName
- The schema element to transform- Returns:
- The Schema Element as a ldif String
- Throws:
LdapException
- If the conversion goes wrong
-
-