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, toStringpublic ServicePermission(String name, String action)
name - the prinicpal's nameaction - the allowed actionspublic boolean implies(Permission perm)
PermissionPermission implies that the
specified Permission is also granted.implies in class Permissionperm - the Permission to test againstpublic boolean equals(Object obj)
Permissionimplies, rather
than equals, when making access control decisions.equals in class Permissionobj - the object to compare toObject.hashCode()public int hashCode()
PermissionPermission. 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 PermissionObject.equals(Object),
System.identityHashCode(Object)public String getActions()
getActions in class PermissionPermissionpublic PermissionCollection newPermissionCollection()
PermissionPermissionCollection 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 PermissionPermissionCollection