java.lang.Object | |
↳ | java.security.Identity |
Known Direct Subclasses |
This class is deprecated.
The functionality of this class has been replace by
Principal
, KeyStore
and the java.security.cert
package.
Identity
represents an identity like a person or a company.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new instance of
Identity with the specified name. | |||||||||||
Creates a new instance of
Identity with the specified name and
the scope of this Identity . |
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new instance of
Identity . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a
Certificate to this Identity . | |||||||||||
Returns the certificates for this
Identity . | |||||||||||
Compares the specified object with this
Identity for equality and
returns true if the specified object is equal, false
otherwise. | |||||||||||
Returns the information string of this
Identity . | |||||||||||
Returns the name of this
Identity . | |||||||||||
Returns the
PublicKey associated with this Identity . | |||||||||||
Returns the
IdentityScope of this Identity . | |||||||||||
Returns the hash code value for this
Identity . | |||||||||||
Removes the specified
Certificate from this Identity . | |||||||||||
Sets an information string for this
Identity . | |||||||||||
Sets the specified
PublicKey to this Identity . | |||||||||||
Returns a string containing a concise, human-readable description of the
this
Identity . | |||||||||||
Returns a string containing a concise, human-readable description of the
this
Identity including its name and its scope. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Compares the specified
Identity with this Identity for
equality and returns true if the specified object is equal,
false otherwise. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
java.security.Principal
|
Creates a new instance of Identity
with the specified name.
name | the name of this Identity .
|
---|
Creates a new instance of 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.
|
---|
Adds a Certificate
to this Identity
.
If a SecurityManager
is installed, code calling this method needs
the SecurityPermission
addIdentityCertificate
to be
granted, otherwise a SecurityException
will be thrown.
certificate | the Certificate to be added to this Identity . |
---|
KeyManagementException | if the certificate is not valid. |
---|---|
SecurityException | if a SecurityManager is installed and the caller does
not have permission to invoke this method.
|
Returns the certificates for this Identity
. External
modifications of the returned array has no impact on this Identity
.
Certificates
for this Identity
Compares the specified object with this 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.
obj | object to be compared for equality with this Identity . |
---|
true
if the specified object is equal to this Identity
, otherwise false
.
Returns the information string of this Identity
.
Identity
.
Returns the name of this Identity
.
Identity
.
Returns the PublicKey
associated with this Identity
.
PublicKey
associated with this Identity
.
Returns the IdentityScope
of this Identity
.
IdentityScope
of this Identity
.
Returns the hash code value for this Identity
. Returns the same
hash code for Identity
s that are equal to each other as required
by the general contract of hashCode()
.
Identity
.Removes the specified Certificate
from this Identity
.
If a SecurityManager
is installed, code calling this method needs
the SecurityPermission
"removeIdentityCertificate"
to be
granted, otherwise a SecurityException
will be thrown.
certificate | the Certificate to be removed. |
---|
KeyManagementException | if the certificate is not found. |
---|---|
SecurityException | if a SecurityManager is installed and the caller does
not have permission to invoke this method.
|
Sets an information string for this Identity
.
If a SecurityManager
is installed, code calling this method needs
the SecurityPermission
setIdentityInfo
to be granted,
otherwise a SecurityException
will be thrown.
info | the information to be set. |
---|
SecurityException | if a SecurityManager is installed and the caller does
not have permission to invoke this method.
|
---|
Sets the specified PublicKey
to this Identity
.
If a SecurityManager
is installed, code calling this method needs
the SecurityPermission
setIdentityPublicKey
to be
granted, otherwise a SecurityException
will be thrown.
key | the PublicKey to be set. |
---|
KeyManagementException | if another Identity in the same scope as this Identity already has the same PublicKey . |
---|---|
SecurityException | if a SecurityManager is installed and the caller does
not have permission to invoke this method.
|
Returns a string containing a concise, human-readable description of the
this Identity
.
detailed | whether or not this method should return detailed information. |
---|
Permission
.
Returns a string containing a concise, human-readable description of the
this Identity
including its name and its scope.
If a SecurityManager
is installed, code calling this method
needs the SecurityPermission
printIdentity
to be granted,
otherwise a SecurityException
will be thrown.
Identity
.SecurityException | if a SecurityManager is installed and the caller does
not have permission to invoke this method.
|
---|
Compares the specified 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.