|
Préférences
Moteurs de recherche
|
||||||||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.6.0
javax.security.auth
|
Constructor Summary | |
---|---|
PrivateCredentialPermission(String name,
String actions)
Creates a new PrivateCredentialPermission
with the specified name . |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Checks two PrivateCredentialPermission objects for
equality. |
String |
getActions()
Returns the "canonical string representation" of the actions. |
String |
getCredentialClass()
Returns the Class name of the Credential associated with this PrivateCredentialPermission . |
String[][] |
getPrincipals()
Returns the Principal classes and names
associated with this PrivateCredentialPermission . |
int |
hashCode()
Returns the hash code value for this object. |
boolean |
implies(Permission p)
Checks if this PrivateCredentialPermission implies
the specified Permission . |
PermissionCollection |
newPermissionCollection()
Return a homogeneous collection of PrivateCredentialPermissions in a PermissionCollection . |
Methods inherited from class java.security.Permission |
---|
checkGuard, getName, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PrivateCredentialPermission(String name, String actions)
PrivateCredentialPermission
with the specified name
. The name
specifies both a Credential class and a Principal
Set.
name
- the name specifying the Credential class and
Principal
Set. actions
- the actions specifying that the Credential can be read.
IllegalArgumentException
- if name
does not conform
to the correct syntax or if actions
is not "read".Method Detail |
---|
public String getCredentialClass()
PrivateCredentialPermission
.
PrivateCredentialPermission
.public String[][] getPrincipals()
Principal
classes and names
associated with this PrivateCredentialPermission
.
The information is returned as a two-dimensional array (array[x][y]).
The 'x' value corresponds to the number of Principal
class and name pairs. When (y==0), it corresponds to
the Principal
class value, and when (y==1),
it corresponds to the Principal
name value.
For example, array[0][0] corresponds to the class name of
the first Principal
in the array. array[0][1]
corresponds to the Principal
name of the
first Principal
in the array.
Principal
class and names associated
with this PrivateCredentialPermission
.public boolean implies(Permission p)
PrivateCredentialPermission
implies
the specified Permission
.
This method returns true if:
[* P1 "duke"] implies [a.b.Credential P1 "duke"]. [C1 P1 "duke"] implies [C1 P1 "duke" P2 "dukette"]. [C1 P2 "dukette"] implies [C1 P1 "duke" P2 "dukette"].
implies
in class Permission
p
- the Permission
to check against.
PrivateCredentialPermission
implies
the specified Permission
, false if not.public boolean equals(Object obj)
PrivateCredentialPermission
objects for
equality. Checks that obj is a
PrivateCredentialPermission
,
and has the same credential class as this object,
as well as the same Principals as this object.
The order of the Principals in the respective Permission's
target names is not relevant.
equals
in class Permission
obj
- the object we are testing for equality with this object.
PrivateCredentialPermission
,
has the same credential class as this object,
and has the same Principals as this object.Object.hashCode()
,
Hashtable
public int hashCode()
hashCode
in class Permission
Object.equals(java.lang.Object)
,
Hashtable
public String getActions()
getActions
in class Permission
public PermissionCollection newPermissionCollection()
PermissionCollection
.
No such PermissionCollection
is defined,
so this method always returns null
.
newPermissionCollection
in class Permission