Oracle

weblogic.security.principal
Class WLSAbstractPrincipal

java.lang.Object
  extended by weblogic.security.principal.WLSAbstractPrincipal
All Implemented Interfaces:
Serializable, Principal, WLSPrincipal
Direct Known Subclasses:
WLSGroupImpl, WLSUserImpl

public abstract class WLSAbstractPrincipal
extends Object
implements WLSPrincipal

The WLSAbstractPrincipal class is a convenience abstract class that implements a principal whose name field will be signed by the weblogic.security.provider.PrincipalValidatorImpl class. To use this class, you should make the PrincipalValidatorImpl class the runtime class for your Principal Validation provider, or extend that class and make the extended class your Principal Validation provider.

Note: Use of this class is not required by WebLogic Server. It is simply a convenience class.

See Also:
Serialized Form

Constructor Summary
protected WLSAbstractPrincipal()
          Constructs an instance of the WLSAbstractPrincipal.
 
Method Summary
 boolean equals(Object another)
          Compares this principal to the principal in the specified object.
 String getName()
          Gets the name of this principal.
 byte[] getSalt()
          Gets the principal's salt.
 byte[] getSignature()
          Gets the derived principal's trust signature.
 byte[] getSignedData()
          Gets the derived principal's signing data, which is used to generate the trust signature.
 int hashCode()
          Returns a hashcode for the name of this principal.
protected  void setName(String name)
          Sets the name of this principal.
 void setSalt(byte[] salt)
          Sets the principal's salt.
 void setSignature(byte[] signature)
          Sets the derived principal's trust signature.
 String toString()
          Returns a String representation of this principal.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WLSAbstractPrincipal

protected WLSAbstractPrincipal()
Constructs an instance of the WLSAbstractPrincipal.

Method Detail

getName

public String getName()
Gets the name of this principal.

Specified by:
getName in interface Principal
Returns:
the name of this principal, represented as a String.

See Also:
WLSAbstractPrincipal.setName(java.lang.String)

setName

protected void setName(String name)
Sets the name of this principal.

Parameters:
name - the name of this principal, represented as a String.

See Also:
WLSAbstractPrincipal.getName()

equals

public boolean equals(Object another)
Compares this principal to the principal in the specified object.

Specified by:
equals in interface Principal
Overrides:
equals in class Object
Parameters:
another - the other principal with which to compare this principal.

Returns:
TRUE if the principal passed in matches the principal passed in, and FALSE otherwise.


toString

public String toString()
Returns a String representation of this principal.

Specified by:
toString in interface Principal
Overrides:
toString in class Object
Returns:
this principal, represented as a String.


hashCode

public int hashCode()
Returns a hashcode for the name of this principal.

Specified by:
hashCode in interface Principal
Overrides:
hashCode in class Object
Returns:
the name of this principal, represented as an int.


getSignature

public byte[] getSignature()
Gets the derived principal's trust signature.

Specified by:
getSignature in interface WLSPrincipal
Returns:
the derived principal's trust signature, represented as an array of bytes.

See Also:
WLSAbstractPrincipal.setSignature(byte[])

setSignature

public void setSignature(byte[] signature)
Sets the derived principal's trust signature.

Specified by:
setSignature in interface WLSPrincipal
Parameters:
signature - the derived principal's trust signsture, represented as an array of bytes.

See Also:
WLSAbstractPrincipal.getSignature()

getSalt

public byte[] getSalt()
Gets the principal's salt.

Specified by:
getSalt in interface WLSPrincipal
Returns:
the principal's salt, represented as an array of bytes.

See Also:
WLSAbstractPrincipal.setSalt(byte[])

setSalt

public void setSalt(byte[] salt)
Sets the principal's salt.

Parameters:
salt - the principal's salt, represented as an array of bytes.

See Also:
WLSAbstractPrincipal.getSalt()

getSignedData

public byte[] getSignedData()
Gets the derived principal's signing data, which is used to generate the trust signature.

Specified by:
getSignedData in interface WLSPrincipal
Returns:
the derived principal's signing data, represented as a sequence of bytes in the platform's default charset.


Documentation is available at
http://edocs.bea.com/wls/docs103
Copyright 2008 Oracle