com.tivoli.pd.jutil
Class PDRgyUserName

java.lang.Object
  extended by com.tivoli.pd.jutil.PDRgyName
      extended by com.tivoli.pd.jutil.PDRgyUserName
All Implemented Interfaces:
java.lang.Cloneable, java.security.Principal

public class PDRgyUserName
extends PDRgyName

This class represents the name of a user object in Policy Director's backing store. The backing store may be an LDAP or Active Directory database, for example.

Modes: Local,Remote


Constructor Summary
PDRgyUserName(java.lang.String name)
          Constructs a PDRgyUserName with the specified registry name.
PDRgyUserName(java.lang.String rgyName, java.lang.String firstName, java.lang.String lastName)
          Constructs a PDRgyUserName with the specified registry name, first name and last name.
 
Method Summary
 boolean equals(java.lang.Object another)
          Compares this registry user name to the specified object.
 java.lang.String getFirstName()
          Returns the first name of this registry user.
 java.lang.String getLastName()
          Returns the last name of this registry user.
 void setFirstName(java.lang.String name)
          Sets the first name of this registry user to the input name.
 void setLastName(java.lang.String name)
          Sets the last name of this registry user to the input name.
 java.lang.String toString()
          Returns a String representation of this object.
 
Methods inherited from class com.tivoli.pd.jutil.PDRgyName
clone, getName, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PDRgyUserName

public PDRgyUserName(java.lang.String name)
Constructs a PDRgyUserName with the specified registry name.

Note that if an LDAP registry is being used, a registry user name must include a first name (which corresponds to the LDAP Common Name (CN) attribute) and a last name (which corresponds to the LDAP Surname (SN) attribute). Thus, an LDAP registry user name created with this constructor must have the first name and last name set with the setFirstName and setLastName methods, respectively. Alternatively, an LDAP registry user name may be constructed in a single step with the three-argument constructor.

Parameters:
name - the registry user name.

PDRgyUserName

public PDRgyUserName(java.lang.String rgyName,
                     java.lang.String firstName,
                     java.lang.String lastName)
Constructs a PDRgyUserName with the specified registry name, first name and last name.

Parameters:
rgyName - the registry user name. For LDAP registry user names, this corresponds to an LDAP Distinguished Name (DN) attribute and must be in Relative Distinguished Name (RDN) format.
firstName - the user's first name. For LDAP registry user names, this corresponds to an LDAP Common Name (CN) attribute.
lastName - the user's last name. For LDAP registry user names, this corresponds to an LDAP Surname (SN) attribute.
Method Detail

getFirstName

public java.lang.String getFirstName()
Returns the first name of this registry user. For LDAP registry user names, this corresponds to an LDAP Common Name (CN) attribute.


getLastName

public java.lang.String getLastName()
Returns the last name of this registry user. For LDAP registry user names, this corresponds to an LDAP Surname (SN) attribute.


setFirstName

public void setFirstName(java.lang.String name)
Sets the first name of this registry user to the input name. For LDAP registry user names, this corresponds to an LDAP Common Name (CN) attribute.


setLastName

public void setLastName(java.lang.String name)
Sets the last name of this registry user to the input name. For LDAP registry user names, this corresponds to an LDAP Surname (SN) attribute.


toString

public java.lang.String toString()
Returns a String representation of this object.

Specified by:
toString in interface java.security.Principal
Overrides:
toString in class PDRgyName

equals

public boolean equals(java.lang.Object another)
Compares this registry user name to the specified object.

Specified by:
equals in interface java.security.Principal
Overrides:
equals in class PDRgyName
Parameters:
another - registry user name to compare with.
Returns:
true if the registry name, first name and last name of the input object are the same as this object's; false, otherwise.