javax.security.auth.kerberos
public final class ServicePermission extends Permission
Constructor and Description |
---|
ServicePermission(String name,
String action)
Create a new service permission with the indicated name and actions.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Check to see if this object equals obj.
|
String |
getActions()
Return a string representing the actions.
|
int |
hashCode()
This method returns a hash code for this
Permission . |
boolean |
implies(Permission perm)
This method tests whether this
Permission implies that the
specified Permission is also granted. |
PermissionCollection |
newPermissionCollection()
This method returns an empty
PermissionCollection object
that can store permissions of this type, or null if no
such collection is defined. |
checkGuard, getName, toString
public ServicePermission(String name, String action)
name
- the prinicpal's nameaction
- the allowed actionspublic boolean implies(Permission perm)
Permission
Permission
implies that the
specified Permission
is also granted.implies
in class Permission
perm
- the Permission
to test againstpublic boolean equals(Object obj)
Permission
implies
, rather
than equals
, when making access control decisions.equals
in class Permission
obj
- the object to compare toObject.hashCode()
public int hashCode()
Permission
Permission
. It
must satisfy the contract of Object.hashCode
: it must be
the same for all objects that equals considers to be the same.hashCode
in class Permission
Object.equals(Object)
,
System.identityHashCode(Object)
public String getActions()
getActions
in class Permission
Permission
public PermissionCollection newPermissionCollection()
Permission
PermissionCollection
object
that can store permissions of this type, or null
if no
such collection is defined. Subclasses must override this to provide
an appropriate collection when one is needed to accurately calculate
implies
.newPermissionCollection
in class Permission
PermissionCollection