com.mentata.l3d
Class L3DDnAttribute

java.lang.Object
  extended bycom.mentata.l3d.L3DAttribute
      extended bycom.mentata.l3d.L3DDnAttribute
All Implemented Interfaces:
Comparator
Direct Known Subclasses:
SG8DnAttribute

public class L3DDnAttribute
extends L3DAttribute

A container for attributes of distinguished name syntax. This subclass of L3DAttribute stores and compares its values as LDAP distinguished names. Upon construction, an instance can be associated with another object in the same context to serve as the target for entries pointed to by its values. L3DDnAttributes can be initialized with identifiers instead of literal distinguished names.

Since:
0.7
Author:
Jon Roberts

Constructor Summary
L3DDnAttribute()
          Constructs an empty distinguished name attribute without a target class.
L3DDnAttribute(String target)
          Constructs an empty distinguished name attribute with a defined target class.
 
Method Summary
 String[] getShortValues()
          Returns the attribute's dn values as identifiers.
 L3DObject getTargetObject()
          Returns an empty instance of the target object for this dn attribute.
 void initialize(String[] initializers)
          Sets the attribute's initial values based on a submitted list of identifiers.
 boolean isLengthExceeded()
          Ignores the length threshold setting for distinguished name values.
 boolean same(String one, String two)
          Determines if the given distinguished names are considered equal.
 
Methods inherited from class com.mentata.l3d.L3DAttribute
addValue, compare, getAttribute, getBind, getContext, getLabel, getLengthThreshold, getName, getObject, getObject, getPrerequisites, getSize, getThreshold, getValues, isBound, isExceeded, isGenerated, isMultivalue, isRequired, removeValue, setGenerated, setLabel, setLengthThreshold, setPrerequisites, setThreshold, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

L3DDnAttribute

public L3DDnAttribute()
Constructs an empty distinguished name attribute without a target class.


L3DDnAttribute

public L3DDnAttribute(String target)
Constructs an empty distinguished name attribute with a defined target class.

Parameters:
target - the classname of an L3D object for entries referenced by dn values
Method Detail

getTargetObject

public L3DObject getTargetObject()
                          throws L3DException
Returns an empty instance of the target object for this dn attribute.

Returns:
an empty instance of the target L3D object
Throws:
L3DException - if the target object is unspecified or improperly defined

isLengthExceeded

public boolean isLengthExceeded()
Ignores the length threshold setting for distinguished name values.

Overrides:
isLengthExceeded in class L3DAttribute
Returns:
false in all cases

same

public boolean same(String one,
                    String two)
Determines if the given distinguished names are considered equal.

Overrides:
same in class L3DAttribute
Parameters:
one - one dn value to compare
two - the other dn value to compare
Returns:
whether the dn values should be considered equal

getShortValues

public String[] getShortValues()
Returns the attribute's dn values as identifiers.

Overrides:
getShortValues in class L3DAttribute
Returns:
the attribute's values in short format

initialize

public void initialize(String[] initializers)
                throws L3DException
Sets the attribute's initial values based on a submitted list of identifiers.

Overrides:
initialize in class L3DAttribute
Parameters:
initializers - entry identifiers to convert to distinguished name values
Throws:
L3DException - if the target object or an identified entry can't be found