Package java.security
Class Identity
java.lang.Object
java.security.Identity
- All Implemented Interfaces:
Serializable,Principal
- Direct Known Subclasses:
IdentityScope,Signer
@Deprecated public abstract class Identity extends Object implements Principal, Serializable
Deprecated.
Identity represents an identity like a person or a company.- See Also:
- Serialized Form
-
Constructor Summary
Constructors Modifier Constructor Description protectedIdentity()Deprecated.Constructs a new instance ofIdentity.Identity(String name)Deprecated.Creates a new instance ofIdentitywith the specified name.Identity(String name, IdentityScope scope)Deprecated.Creates a new instance ofIdentitywith the specified name and the scope of thisIdentity. -
Method Summary
Modifier and Type Method Description voidaddCertificate(Certificate certificate)Deprecated.Adds aCertificateto thisIdentity.Certificate[]certificates()Deprecated.Returns the certificates for thisIdentity.booleanequals(Object obj)Deprecated.Compares the specified object with thisIdentityfor equality and returnstrueif the specified object is equal,falseotherwise.StringgetInfo()Deprecated.Returns the information string of thisIdentity.StringgetName()Deprecated.Returns the name of thisIdentity.PublicKeygetPublicKey()Deprecated.Returns thePublicKeyassociated with thisIdentity.IdentityScopegetScope()Deprecated.Returns theIdentityScopeof thisIdentity.inthashCode()Deprecated.Returns the hash code value for thisIdentity.protected booleanidentityEquals(Identity identity)Deprecated.Compares the specifiedIdentitywith thisIdentityfor equality and returnstrueif the specified object is equal,falseotherwise.voidremoveCertificate(Certificate certificate)Deprecated.Removes the specifiedCertificatefrom thisIdentity.voidsetInfo(String info)Deprecated.Sets an information string for thisIdentity.voidsetPublicKey(PublicKey key)Deprecated.Sets the specifiedPublicKeyto thisIdentity.StringtoString()Deprecated.Returns a string containing a concise, human-readable description of the thisIdentityincluding its name and its scope.StringtoString(boolean detailed)Deprecated.Returns a string containing a concise, human-readable description of the thisIdentity.
-
Constructor Details
-
Identity
protected Identity()Deprecated.Constructs a new instance ofIdentity. -
Identity
Deprecated.Creates a new instance ofIdentitywith the specified name.- Parameters:
name- the name of thisIdentity.
-
Identity
Deprecated.Creates a new instance ofIdentitywith the specified name and the scope of thisIdentity.- Parameters:
name- the name of thisIdentity.scope- theIdentityScopeof thisIdentity.- Throws:
KeyManagementException- if anIdentitywith the same name is already present in the specified scope.
-
-
Method Details
-
addCertificate
Deprecated.Adds aCertificateto thisIdentity.- Parameters:
certificate- theCertificateto be added to thisIdentity.- Throws:
KeyManagementException- if the certificate is not valid.
-
removeCertificate
Deprecated.Removes the specifiedCertificatefrom thisIdentity.- Parameters:
certificate- theCertificateto be removed.- Throws:
KeyManagementException- if the certificate is not found.
-
certificates
Deprecated.Returns the certificates for thisIdentity. External modifications of the returned array has no impact on thisIdentity.- Returns:
- the
Certificatesfor thisIdentity
-
identityEquals
Deprecated.Compares the specifiedIdentitywith thisIdentityfor equality and returnstrueif the specified object is equal,falseotherwise.To be equal, two
Identityobjects need to have the same name and the same public keys.- Parameters:
identity- the identity to check for equality.- Returns:
trueif theIdentityobjects are equal,falseotherwise.
-
toString
Deprecated.Returns a string containing a concise, human-readable description of the thisIdentity.- Parameters:
detailed- whether or not this method should return detailed information.- Returns:
- a printable representation for this
Permission.
-
getScope
Deprecated.Returns theIdentityScopeof thisIdentity.- Returns:
- the
IdentityScopeof thisIdentity.
-
setPublicKey
Deprecated.Sets the specifiedPublicKeyto thisIdentity.- Parameters:
key- thePublicKeyto be set.- Throws:
KeyManagementException- if anotherIdentityin the same scope as thisIdentityalready has the samePublicKey.
-
getPublicKey
Deprecated.Returns thePublicKeyassociated with thisIdentity.- Returns:
- the
PublicKeyassociated with thisIdentity.
-
setInfo
Deprecated.Sets an information string for thisIdentity.- Parameters:
info- the information to be set.
-
getInfo
Deprecated.Returns the information string of thisIdentity.- Returns:
- the information string of this
Identity.
-
equals
Deprecated.Compares the specified object with thisIdentityfor equality and returnstrueif the specified object is equal,falseotherwise.Identityobjects are considered equal, if they have the same name and are in the same scope.- Specified by:
equalsin interfacePrincipal- Overrides:
equalsin classObject- Parameters:
obj- object to be compared for equality with thisIdentity.- Returns:
trueif the specified object is equal to thisIdentity, otherwisefalse.- See Also:
Object.hashCode()
-
getName
Deprecated.Returns the name of thisIdentity. -
hashCode
public int hashCode()Deprecated.Returns the hash code value for thisIdentity. Returns the same hash code forIdentitys that are equal to each other as required by the general contract ofObject.hashCode().- Specified by:
hashCodein interfacePrincipal- Overrides:
hashCodein classObject- Returns:
- the hash code value for this
Identity. - See Also:
Object.equals(Object),equals(Object)
-
toString
Deprecated.Returns a string containing a concise, human-readable description of the thisIdentityincluding its name and its scope.
-
Principal,KeyStoreand thejava.security.certpackage instead.