|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.novell.java.security.Identity
Represents identities, which are real-world objects. Identities can be people, companies, or organizations whose identities can be authenticated using their public keys. Identities may also be more abstract (or concrete) constructs, such as daemon threads or smart cards.
Identity objects have an immutable name and a public key. If an Identity is specified to have a particular scope, then the name and public key of the Identity are unique within that scope.
An Identity also has a set of certificates to certify its own public key. The Principal names specified in these certificates need not be the same, only the key must be unique.
An Identity can be subclassed to include postal and e-mail addresses, telephone numbers, images of faces and logos, and so on.
IdentityScope
,
Principal
Constructor Summary | |
Identity(java.lang.String name)
Constructs an identity with the passed-in name but no scope. |
|
Identity(java.lang.String name,
IdentityScope scope)
Constructs an identity with the passed-in name and scope. |
Method Summary | |
void |
addCertificate(com.novell.java.security.cert.Certificate certificate)
Adds a certificate for this identity. |
boolean |
equals(java.lang.Object identity)
Compares two Objects for equality. |
com.novell.java.security.cert.Certificate[] |
getCertificates()
Returns a copy of all the certificates for this identity. |
java.lang.String |
getInfo()
Returns the general information string previously specified (set) for this identity. |
java.lang.String |
getName()
Returns the name of this identity as a String. |
PublicKey |
getPublicKey()
Returns the public key for this identity. |
IdentityScope |
getScope()
Returns the scope of this identity as an IdentityScope object. |
int |
hashCode()
Returns a hash code value for this object (identity). |
void |
removeCertificate(com.novell.java.security.cert.Certificate certificate)
Removes a certificate from this identity. |
void |
setInfo(java.lang.String info)
Specifies a general information string for this identity. |
void |
setPublicKey(PublicKey key)
Sets the public key for this identity. |
java.lang.String |
toString()
Generates a short string representation of the object (identity) containing its name and scope (if any). |
java.lang.String |
toString(boolean detailed)
Generates a short string representation of the object (identity) containing optionally more details than provided by the toString() method without any arguments. |
Methods inherited from class java.lang.Object |
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public Identity(java.lang.String name, IdentityScope scope) throws KeyManagementException
name
- The name of the identity.scope
- The scope of the identity.public Identity(java.lang.String name)
name
- The name of the identity.Method Detail |
public final java.lang.String getName()
public final IdentityScope getScope()
public PublicKey getPublicKey()
public void setPublicKey(PublicKey key) throws KeyManagementException
key
- The public key for this identity.public void setInfo(java.lang.String info)
info
- The information string to set.getInfo()
public java.lang.String getInfo()
setInfo(java.lang.String)
public void addCertificate(com.novell.java.security.cert.Certificate certificate) throws KeyManagementException
certificate
- The certificate to be added.public void removeCertificate(com.novell.java.security.cert.Certificate certificate) throws KeyManagementException
certificate
- The certificate to be removed.public com.novell.java.security.cert.Certificate[] getCertificates()
public final boolean equals(java.lang.Object identity)
The equals() method first tests to see if the entities actually refer to the same object, in which case it returns TRUE. Next, it checks to see if the entities have the same name and the same scope. If they do, the method returns TRUE. Otherwise, it calls the identityEquals method. Identity subclasses should override the identityEquals() method.
identity
- The object with which to test for equality.#identityEquals
public java.lang.String toString()
public java.lang.String toString(boolean detailed)
detailed
- A boolean indicating whether or not to provide the
optional detailed information.toString()
public int hashCode()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |