Class AttributeTypeHolder
- java.lang.Object
-
- org.apache.directory.api.ldap.schema.converter.SchemaElementImpl
-
- org.apache.directory.api.ldap.schema.converter.AttributeTypeHolder
-
- All Implemented Interfaces:
SchemaElement
public class AttributeTypeHolder extends SchemaElementImpl
A bean used to hold the literal values of an AttributeType parsed out of an OpenLDAP schema configuration file.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description AttributeTypeHolder(String oid)
Create an instance of an attributeType
-
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 DITString
getEquality()
Get the equality Matching Rulelong
getOidLen()
Get the attributeType's syntax lengthString
getOrdering()
Get the ordering Matching RuleString
getSubstr()
Get the substring Matching RuleString
getSuperior()
Get the optional attributeType's superiorString
getSyntax()
Get the attributeType's syntaxUsageEnum
getUsage()
Get the attributeType's usageboolean
isCollective()
Tells if the attributeType is collectove or notboolean
isNoUserModification()
Tells if the attributeType is mutable or notboolean
isSingleValue()
Tells if the attribute is single-valuedvoid
setCollective(boolean collective)
Set the attributeType collective flagvoid
setEquality(String equality)
Set the equality Matching Rulevoid
setNoUserModification(boolean noUserModification)
Set the attributeType noUserModification flagvoid
setOidLen(long oidLen)
Set the attributeType's syntax lengthvoid
setOrdering(String ordering)
Set the ordering Matching Rulevoid
setSingleValue(boolean singleValue)
Set the attributeType singleValue flagvoid
setSubstr(String substr)
Set the substring Matching Rulevoid
setSuperior(String superior)
Set the attributeType's superiorvoid
setSyntax(String syntax)
Set the attributeType's syntaxvoid
setUsage(UsageEnum usage)
Set the attributeType's usageString
toLdif(String schemaName)
Convert this attributeType 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
-
AttributeTypeHolder
public AttributeTypeHolder(String oid)
Create an instance of an attributeType- Parameters:
oid
- The attributeType's OID
-
-
Method Detail
-
isSingleValue
public boolean isSingleValue()
Tells if the attribute is single-valued- Returns:
- true if the attribute is single-valued, false otherwise
-
setSingleValue
public void setSingleValue(boolean singleValue)
Set the attributeType singleValue flag- Parameters:
singleValue
- The value for this flag
-
isCollective
public boolean isCollective()
Tells if the attributeType is collectove or not- Returns:
- True if the attributeType is collective, false otherwise
-
setCollective
public void setCollective(boolean collective)
Set the attributeType collective flag- Parameters:
collective
- The value for this flag
-
isNoUserModification
public boolean isNoUserModification()
Tells if the attributeType is mutable or not- Returns:
- True if the attributeType is immutable, false otherwise
-
setNoUserModification
public void setNoUserModification(boolean noUserModification)
Set the attributeType noUserModification flag- Parameters:
noUserModification
- The value for this flag
-
getSuperior
public String getSuperior()
Get the optional attributeType's superior- Returns:
- The attributeType's superior, if any
-
setSuperior
public void setSuperior(String superior)
Set the attributeType's superior- Parameters:
superior
- The attributeType's superior
-
getEquality
public String getEquality()
Get the equality Matching Rule- Returns:
- The equality matchingRule
-
setEquality
public void setEquality(String equality)
Set the equality Matching Rule- Parameters:
equality
- The equality Matching Rule
-
getOrdering
public String getOrdering()
Get the ordering Matching Rule- Returns:
- The ordering matchingRule
-
setOrdering
public void setOrdering(String ordering)
Set the ordering Matching Rule- Parameters:
ordering
- The ordering Matching Rule
-
getSubstr
public String getSubstr()
Get the substring Matching Rule- Returns:
- The substring matchingRule
-
setSubstr
public void setSubstr(String substr)
Set the substring Matching Rule- Parameters:
substr
- The substring Matching Rule
-
getSyntax
public String getSyntax()
Get the attributeType's syntax- Returns:
- The attributeType's syntax
-
setSyntax
public void setSyntax(String syntax)
Set the attributeType's syntax- Parameters:
syntax
- The attributeType's syntax
-
getUsage
public UsageEnum getUsage()
Get the attributeType's usage- Returns:
- The attributeType's usage
-
setUsage
public void setUsage(UsageEnum usage)
Set the attributeType's usage- Parameters:
usage
- The attributeType's usage
-
getOidLen
public long getOidLen()
Get the attributeType's syntax length- Returns:
- The attributeType's syntax length
-
setOidLen
public void setOidLen(long oidLen)
Set the attributeType's syntax length- Parameters:
oidLen
- The attributeType's syntax length
-
toLdif
public String toLdif(String schemaName) throws LdapException
Convert this attributeType to a Ldif string- Parameters:
schemaName
- The name of the schema file containing this attributeType- 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
-
-