com.ibm.as400.security.auth
Class UserProfilePrincipal

java.lang.Object
  |
  +--com.ibm.as400.security.auth.AS400Principal
        |
        +--com.ibm.as400.security.auth.UserProfilePrincipal

public class UserProfilePrincipal
extends AS400Principal
implements AS400BasicAuthenticationPrincipal

The UserProfilePrincipal class represents an AS/400 user profile.

See Also:
AS400Principal, Serialized Form

Constructor Summary
UserProfilePrincipal()
          Constructs a UserProfilePrincipal object.
UserProfilePrincipal(AS400 system, java.lang.String name)
          Constructs a UserProfilePrincipal object.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares the specified Object with the credential for equality.
 java.lang.String getUserProfileName()
          Returns the user profile name.
 int hashCode()
          Returns a hash code for this principal.
 void initialize(java.lang.String name)
          Initializes a principal for the local AS/400 system based on the given user profile name.
 void setUserProfileName(java.lang.String name)
          Sets the user profile name.
 java.lang.String toString()
          Returns a string representation of the object
 
Methods inherited from class com.ibm.as400.security.auth.AS400Principal
addPropertyChangeListener, addVetoableChangeListener, getName, getSystem, getUser, removePropertyChangeListener, removeVetoableChangeListener, setSystem
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserProfilePrincipal

public UserProfilePrincipal()
Constructs a UserProfilePrincipal object.

UserProfilePrincipal

public UserProfilePrincipal(AS400 system,
                            java.lang.String name)
Constructs a UserProfilePrincipal object.

The system and name properties are set to the specified values.

Parameters:
system - The AS/400 associated with the principal.
name - The user profile name.
Method Detail

equals

public boolean equals(java.lang.Object o)
Compares the specified Object with the credential for equality.
Overrides:
equals in class java.lang.Object
Parameters:
o - Object to be compared for equality.
Returns:
true if equal; otherwise false.

getUserProfileName

public java.lang.String getUserProfileName()
Returns the user profile name.
Specified by:
getUserProfileName in interface AS400BasicAuthenticationPrincipal
Overrides:
getUserProfileName in class AS400Principal
Returns:
A String containing the name; empty if not assigned.

hashCode

public int hashCode()
Returns a hash code for this principal.
Overrides:
hashCode in class java.lang.Object
Returns:
a hash code for this principal.

initialize

public void initialize(java.lang.String name)
                throws java.lang.Exception
Initializes a principal for the local AS/400 system based on the given user profile name.
Specified by:
initialize in interface AS400BasicAuthenticationPrincipal
Parameters:
name - The profile name.
Throws:
java.lang.Exception - If an exception occurs.

setUserProfileName

public void setUserProfileName(java.lang.String name)
                        throws java.beans.PropertyVetoException
Sets the user profile name.
Parameters:
name - The profile name.
Throws:
java.beans.PropertyVetoException - If the change is vetoed.
ExtendedIllegalArgumentException - If the provided value exceeds the maximum allowed length or contains non-valid characters.

toString

public java.lang.String toString()
Returns a string representation of the object
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.