Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.security
Class Identity  view Identity download Identity.java

java.lang.Object
  extended byjava.security.Identity
All Implemented Interfaces:
Principal, java.io.Serializable
Direct Known Subclasses:
IdentityScope, Signer

Deprecated. Replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.

public abstract class Identity
extends java.lang.Object
implements Principal, java.io.Serializable

The Identity class is used to represent people and companies that can be authenticated using public key encryption. The identities can also be abstract objects such as smart cards.

Identity objects store a name and public key for each identity. The names cannot be changed and the identities can be scoped. Each identity (name and public key) within a scope are unique to that scope.

Each identity has a set of ceritificates which all specify the same public key, but not necessarily the same name.

The Identity class can be subclassed to allow additional information to be attached to it.


Field Summary
private  java.util.Vector certificates
          Deprecated.  
private  java.lang.String info
          Deprecated.  
private  java.lang.String name
          Deprecated.  
private  PublicKey publicKey
          Deprecated.  
private  IdentityScope scope
          Deprecated.  
private static long serialVersionUID
          Deprecated.  
 
Constructor Summary
protected Identity()
          Deprecated. Constructor for serialization only.
  Identity(java.lang.String name)
          Deprecated. Constructs a new instance of Identity with the specified name and no scope.
  Identity(java.lang.String name, IdentityScope scope)
          Deprecated. Constructs a new instance of Identity with the specified name and scope.
 
Method Summary
 void addCertificate(Certificate certificate)
          Deprecated. Adds a certificate to the list of ceritificates for this identity.
 Certificate[] certificates()
          Deprecated.  
 boolean equals(java.lang.Object identity)
          Deprecated. Checks for equality between this Identity and a specified object.
 java.lang.String getInfo()
          Deprecated.  
 java.lang.String getName()
          Deprecated. This method returns a String that names this Principal.
 PublicKey getPublicKey()
          Deprecated.  
 IdentityScope getScope()
          Deprecated.  
 int hashCode()
          Deprecated. This method returns a hash code value for this Principal.
protected  boolean identityEquals(Identity identity)
          Deprecated. Checks for equality between this Identity and a specified object.
 void removeCertificate(Certificate certificate)
          Deprecated. Removes a certificate from the list of ceritificates for this identity.
 void setInfo(java.lang.String info)
          Deprecated. Sets the general information string.
 void setPublicKey(PublicKey key)
          Deprecated. Sets the public key for this identity.
 java.lang.String toString()
          Deprecated. Returns a string representation of this Identity.
 java.lang.String toString(boolean detailed)
          Deprecated. Returns a detailed string representation of this Identity.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Deprecated. 
See Also:
Constant Field Values

name

private java.lang.String name
Deprecated. 

scope

private IdentityScope scope
Deprecated. 

publicKey

private PublicKey publicKey
Deprecated. 

info

private java.lang.String info
Deprecated. 

certificates

private java.util.Vector certificates
Deprecated. 
Constructor Detail

Identity

protected Identity()
Deprecated. 
Constructor for serialization only.


Identity

public Identity(java.lang.String name,
                IdentityScope scope)
         throws KeyManagementException
Deprecated. 
Constructs a new instance of Identity with the specified name and scope.


Identity

public Identity(java.lang.String name)
Deprecated. 
Constructs a new instance of Identity with the specified name and no scope.

Method Detail

getName

public final java.lang.String getName()
Deprecated. 
Description copied from interface: Principal
This method returns a String that names this Principal.

Specified by:
getName in interface Principal

getScope

public final IdentityScope getScope()
Deprecated. 

getPublicKey

public PublicKey getPublicKey()
Deprecated. 

setPublicKey

public void setPublicKey(PublicKey key)
                  throws KeyManagementException
Deprecated. 
Sets the public key for this identity. The old key and all certificates are removed.


setInfo

public void setInfo(java.lang.String info)
Deprecated. 
Sets the general information string.


getInfo

public java.lang.String getInfo()
Deprecated. 

addCertificate

public void addCertificate(Certificate certificate)
                    throws KeyManagementException
Deprecated. 
Adds a certificate to the list of ceritificates for this identity. The public key in this certificate must match the existing public key if it exists.


removeCertificate

public void removeCertificate(Certificate certificate)
                       throws KeyManagementException
Deprecated. 
Removes a certificate from the list of ceritificates for this identity.


certificates

public Certificate[] certificates()
Deprecated. 

equals

public final boolean equals(java.lang.Object identity)
Deprecated. 
Checks for equality between this Identity and a specified object. It first checks if they are the same object, then if the name and scope match and returns true if successful. If these tests fail, the identityEquals(Identity) 55 method is called.

Specified by:
equals in interface Principal

identityEquals

protected boolean identityEquals(Identity identity)
Deprecated. 
Checks for equality between this Identity and a specified object. A subclass should override this method. The default behavior is to return true if the public key and names match.


toString

public java.lang.String toString()
Deprecated. 
Returns a string representation of this Identity.

Specified by:
toString in interface Principal

toString

public java.lang.String toString(boolean detailed)
Deprecated. 
Returns a detailed string representation of this Identity.


hashCode

public int hashCode()
Deprecated. 
Description copied from interface: Principal
This method returns a hash code value for this Principal. Remember the contract of hashCode - two objects which compare as equals() must have the same hashCode().

Specified by:
hashCode in interface Principal