@Deprecated public abstract class Identity extends Object implements Principal, Serializable
Identity represents an identity like a person or a company.| Modifier | Constructor and Description |
|---|---|
protected |
Identity()
Deprecated.
Constructs a new instance of
Identity. |
|
Identity(String name)
Deprecated.
Creates a new instance of
Identity with the specified name. |
|
Identity(String name,
IdentityScope scope)
Deprecated.
Creates a new instance of
Identity with the specified name and
the scope of this Identity. |
| Modifier and Type | Method and Description |
|---|---|
void |
addCertificate(Certificate certificate)
Deprecated.
Adds a
Certificate to this Identity. |
Certificate[] |
certificates()
Deprecated.
Returns the certificates for this
Identity. |
boolean |
equals(Object obj)
Deprecated.
Compares the specified object with this
Identity for equality and
returns true if the specified object is equal, false
otherwise. |
String |
getInfo()
Deprecated.
Returns the information string of this
Identity. |
String |
getName()
Deprecated.
Returns the name of this
Identity. |
PublicKey |
getPublicKey()
Deprecated.
Returns the
PublicKey associated with this Identity. |
IdentityScope |
getScope()
Deprecated.
Returns the
IdentityScope of this Identity. |
int |
hashCode()
Deprecated.
Returns the hash code value for this
Identity. |
protected boolean |
identityEquals(Identity identity)
Deprecated.
Compares the specified
Identity with this Identity for
equality and returns true if the specified object is equal,
false otherwise. |
void |
removeCertificate(Certificate certificate)
Deprecated.
Removes the specified
Certificate from this Identity. |
void |
setInfo(String info)
Deprecated.
Sets an information string for this
Identity. |
void |
setPublicKey(PublicKey key)
Deprecated.
Sets the specified
PublicKey to this Identity. |
String |
toString()
Deprecated.
Returns a string containing a concise, human-readable description of the
this
Identity including its name and its scope. |
String |
toString(boolean detailed)
Deprecated.
Returns a string containing a concise, human-readable description of the
this
Identity. |
protected Identity()
Identity.public Identity(String name)
Identity with the specified name.name - the name of this Identity.public Identity(String name, IdentityScope scope) throws KeyManagementException
Identity with the specified name and
the scope of this Identity.name - the name of this Identity.scope - the IdentityScope of this Identity.KeyManagementException - if an Identity with the same name is already present
in the specified scope.public void addCertificate(Certificate certificate) throws KeyManagementException
Certificate to this Identity.certificate - the Certificate to be added to this Identity.KeyManagementException - if the certificate is not valid.public void removeCertificate(Certificate certificate) throws KeyManagementException
Certificate from this Identity.certificate - the Certificate to be removed.KeyManagementException - if the certificate is not found.public Certificate[] certificates()
Identity. External
modifications of the returned array has no impact on this Identity.Certificates for this Identityprotected boolean identityEquals(Identity identity)
Identity with this Identity for
equality and returns true if the specified object is equal,
false otherwise.
To be equal, two Identity objects need to have the same name and
the same public keys.
identity - the identity to check for equality.true if the Identity objects are equal, false otherwise.public String toString(boolean detailed)
Identity.detailed - whether or not this method should return detailed information.Permission.public final IdentityScope getScope()
IdentityScope of this Identity.IdentityScope of this Identity.public void setPublicKey(PublicKey key) throws KeyManagementException
PublicKey to this Identity.key - the PublicKey to be set.KeyManagementException - if another Identity in the same scope as this Identity already has the same PublicKey.public PublicKey getPublicKey()
PublicKey associated with this Identity.PublicKey associated with this Identity.public void setInfo(String info)
Identity.info - the information to be set.public String getInfo()
Identity.Identity.public final boolean equals(Object obj)
Identity for equality and
returns true if the specified object is equal, false
otherwise. Identity objects are considered equal, if they have
the same name and are in the same scope.equals in interface Principalequals in class Objectobj - object to be compared for equality with this Identity.true if the specified object is equal to this Identity, otherwise false.Object.hashCode()public final String getName()
Identity.public int hashCode()
Identity. Returns the same
hash code for Identitys that are equal to each other as required
by the general contract of Object.hashCode().hashCode in interface PrincipalhashCode in class ObjectIdentity.Object.equals(Object),
equals(Object)public String toString()
Identity including its name and its scope.