Package org.apache.harmony.security
Class SystemScope
java.lang.Object
java.security.Identity
java.security.IdentityScope
org.apache.harmony.security.SystemScope
- All Implemented Interfaces:
Serializable,Principal
public class SystemScope extends IdentityScope
- See Also:
IdentityScope, Serialized Form
-
Constructor Summary
Constructors Constructor Description SystemScope()SystemScope(String name)SystemScope(String name, IdentityScope scope) -
Method Summary
Modifier and Type Method Description voidaddIdentity(Identity identity)Adds anIdentityto thisIdentityScope.IdentitygetIdentity(String name)Returns theIdentitywith the specified name ornullif noIdentitywith the specified name is present in this scope.IdentitygetIdentity(PublicKey key)Returns theIdentitywhich is associated with the specified key ornullif noIdentityassociated with the specified key is present in this scope.Enumerationidentities()Returns anEnumerationover theIdentityobjects in thisIdentityScope.voidremoveIdentity(Identity identity)Removes anIdentityfrom thisIdentityScope.intsize()Returns the number ofIdentityobjects in this scope.Methods inherited from class java.security.IdentityScope
getIdentity, getSystemScope, setSystemScope, toStringMethods inherited from class java.security.Identity
addCertificate, certificates, equals, getInfo, getName, getPublicKey, getScope, hashCode, identityEquals, removeCertificate, setInfo, setPublicKey, toString
-
Constructor Details
-
SystemScope
public SystemScope()- See Also:
IdentityScope()
-
SystemScope
- See Also:
IdentityScope(String)
-
SystemScope
- Throws:
KeyManagementException- See Also:
IdentityScope(String, IdentityScope)
-
-
Method Details
-
size
public int size()Description copied from class:IdentityScopeReturns the number ofIdentityobjects in this scope.- Specified by:
sizein classIdentityScope- Returns:
- the number of
Identityobjects in this scope. - See Also:
IdentityScope.size()
-
getIdentity
Description copied from class:IdentityScopeReturns theIdentitywith the specified name ornullif noIdentitywith the specified name is present in this scope.- Specified by:
getIdentityin classIdentityScope- Parameters:
name- the name of theIdentityto be returned.- Returns:
- the
Identitywith the specified name ornullif not present. - See Also:
IdentityScope.getIdentity(java.lang.String)
-
getIdentity
Description copied from class:IdentityScopeReturns theIdentitywhich is associated with the specified key ornullif noIdentityassociated with the specified key is present in this scope.- Specified by:
getIdentityin classIdentityScope- Parameters:
key- thePublicKeyof theIdentityto be returned.- Returns:
- the
Identityassociated with the specified key ornullif not present. - See Also:
IdentityScope.getIdentity(java.security.PublicKey)
-
addIdentity
Description copied from class:IdentityScopeAdds anIdentityto thisIdentityScope.- Specified by:
addIdentityin classIdentityScope- Parameters:
identity- theIdentityto be added.- Throws:
KeyManagementException- if the specifiedIdentityis invalid or an identity with the same key already exists.- See Also:
IdentityScope.addIdentity(java.security.Identity)
-
removeIdentity
Description copied from class:IdentityScopeRemoves anIdentityfrom thisIdentityScope.- Specified by:
removeIdentityin classIdentityScope- Parameters:
identity- theIdentityto be removed.- Throws:
KeyManagementException- if theIdentityis not present in this scope.- See Also:
IdentityScope.removeIdentity(java.security.Identity)
-
identities
Description copied from class:IdentityScopeReturns anEnumerationover theIdentityobjects in thisIdentityScope.- Specified by:
identitiesin classIdentityScope- Returns:
- an
Enumerationover theIdentityobjects in thisIdentityScope. - See Also:
IdentityScope.identities()
-