org.apache.directory.shared.ldap.schema
Class AbstractAttributeType

java.lang.Object
  extended byorg.apache.directory.shared.ldap.schema.AbstractSchemaObject
      extended byorg.apache.directory.shared.ldap.schema.AbstractAttributeType
All Implemented Interfaces:
AttributeType, SchemaObject, java.io.Serializable

public abstract class AbstractAttributeType
extends AbstractSchemaObject
implements java.io.Serializable, AttributeType

Attribute specification bean used to store the schema information for an attributeType definition.

Version:
$Rev: 379008 $
Author:
Apache Directory Project
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.directory.shared.ldap.schema.AbstractSchemaObject
description, isObsolete, names, oid
 
Constructor Summary
protected AbstractAttributeType(java.lang.String oid)
          Creates an AttributeType using a unique OID.
 
Method Summary
 int getLength()
          Gets a length limit for this AttributeType.
 UsageEnum getUsage()
          Determines the usage for this AttributeType.
 boolean isCanUserModify()
          Gets whether or not this AttributeType can be modified by a user.
 boolean isCollective()
          Gets whether or not this AttributeType is a collective attribute.
 boolean isSingleValue()
          Gets whether or not this AttributeType is single-valued.
protected  void setCanUserModify(boolean canUserModify)
          Sets whether or not an attribute of this AttributeType can be modified by directory users.
protected  void setCollective(boolean collective)
          Sets whether or not an attribute of this AttributeType is a collective.
protected  void setLength(int length)
          Sets the length limit of this AttributeType based on its associated syntax.
protected  void setSingleValue(boolean singleValue)
          Sets whether or not an attribute of this AttributeType single valued or multi-valued.
protected  void setUsage(UsageEnum usage)
          The usage class for this attributeType.
 
Methods inherited from class org.apache.directory.shared.ldap.schema.AbstractSchemaObject
equals, getDescription, getName, getNames, getOid, hashCode, isObsolete, setDescription, setNames, setObsolete, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.directory.shared.ldap.schema.AttributeType
getEquality, getOrdering, getSubstr, getSuperior, getSyntax
 
Methods inherited from interface org.apache.directory.shared.ldap.schema.SchemaObject
getDescription, getName, getNames, getOid, isObsolete
 

Constructor Detail

AbstractAttributeType

protected AbstractAttributeType(java.lang.String oid)
Creates an AttributeType using a unique OID.

Parameters:
oid - the IANA OID number for the attributeType
Method Detail

isSingleValue

public boolean isSingleValue()
Description copied from interface: AttributeType
Gets whether or not this AttributeType is single-valued.

Specified by:
isSingleValue in interface AttributeType
Returns:
true if only one value can exist for this AttributeType, false otherwise
See Also:
AttributeType.isSingleValue()

isCollective

public boolean isCollective()
Description copied from interface: AttributeType
Gets whether or not this AttributeType is a collective attribute.

Specified by:
isCollective in interface AttributeType
Returns:
true if the attribute is collective, false otherwise
See Also:
AttributeType.isCollective()

isCanUserModify

public boolean isCanUserModify()
Description copied from interface: AttributeType
Gets whether or not this AttributeType can be modified by a user.

Specified by:
isCanUserModify in interface AttributeType
Returns:
true if users can modify it, false if only the directory can.
See Also:
AttributeType.isCanUserModify()

getUsage

public UsageEnum getUsage()
Description copied from interface: AttributeType
Determines the usage for this AttributeType.

Specified by:
getUsage in interface AttributeType
Returns:
a type safe UsageEnum
See Also:
AttributeType.getUsage()

getLength

public int getLength()
Description copied from interface: AttributeType
Gets a length limit for this AttributeType.

Specified by:
getLength in interface AttributeType
Returns:
the length of the attribute
See Also:
AttributeType.getLength()

setSingleValue

protected void setSingleValue(boolean singleValue)
Sets whether or not an attribute of this AttributeType single valued or multi-valued.

Parameters:
singleValue - true if its is single valued, false if multi-valued

setCollective

protected void setCollective(boolean collective)
Sets whether or not an attribute of this AttributeType is a collective.

Parameters:
collective - true if it is collective, false otherwise

setCanUserModify

protected void setCanUserModify(boolean canUserModify)
Sets whether or not an attribute of this AttributeType can be modified by directory users.

Parameters:
canUserModify - true if directory users can modify, false otherwise

setUsage

protected void setUsage(UsageEnum usage)
The usage class for this attributeType.

Parameters:
usage - the way attributes of this AttributeType are used in the DSA

setLength

protected void setLength(int length)
Sets the length limit of this AttributeType based on its associated syntax.

Parameters:
length - the new length to set


Copyright © 2003-2006 . All Rights Reserved.