|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.security.Permission com.ibm.websphere.objectgrid.security.ObjectGridPermission
public final class ObjectGridPermission
This class represents permissions to the ObjectGrid. It has two different actions:
Permission
,
ObjectGrid
,
Serialized FormField Summary | |
---|---|
static int |
ALL
All permission constant |
static String |
ALL_PERMISSION
All permissions String |
static int |
DYNAMIC_MAP
Dynamic map permission constant |
static int |
NUMBER_PERMISSION
The total number of possible Permissions |
static String[] |
PERMISSIONS
An array with the string representation of each permission. |
static int |
QUERY
Query permission constant |
Constructor Summary | |
---|---|
ObjectGridPermission(String name,
int actions)
Constructs a new ObjectPermission for the named ObjectGrid with the specified actions. |
|
ObjectGridPermission(String name,
String actions)
Constructs a new ObjectPermission for the named ObjectGrid with the specified actions. |
Method Summary | |
---|---|
boolean |
equals(Object o)
Checks two ObjectGridPermission objects for equality. |
String |
getActions()
Returns the actions as a String. |
static String |
getActions(int m)
Returns the actions as a String for the specified mask. |
int |
getActionsInInt()
Returns an int mask value which represents the permission's actions. |
int |
hashCode()
Returns the hash code value for this ObjectGridPermission object. |
boolean |
implies(Permission permission)
Checks if the specified permission is "implied" by this object. |
Methods inherited from class java.security.Permission |
---|
checkGuard, getName, newPermissionCollection, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int QUERY
public static final int DYNAMIC_MAP
public static final String[] PERMISSIONS
The indexes to the String representation are the int
constants for each permission (i.e. QUERY, DYNAMIC_MAP)
public static final String ALL_PERMISSION
public static final int ALL
public static final int NUMBER_PERMISSION
Constructor Detail |
---|
public ObjectGridPermission(String name, String actions)
The ObjectGrid name for this permission should be in the format of
name
- the ObjectGrid name.actions
- the comma separated list of actions, such as "query", and "dynamicmap".
IllegalArgumentException
- if name is null
or malformed
or if actions is null
or contains an invalidate
action namepublic ObjectGridPermission(String name, int actions)
The ObjectGrid name for this permission should be in the format of
name
- the ObjectGrid nameactions
- the actions mask. For example,
ObjectGridPermission.QUERY|ObjectGridPermission.DYNAMIC_MAP
IllegalArgumentException
- if name is null
or malformed
or if actions is less than 0 or greater than ALL
Method Detail |
---|
public boolean implies(Permission permission)
More specifically, this method returns true if:
implies
in class Permission
permission
- the permission to check against.
public boolean equals(Object o)
Do not use the equals
method for making access control
decisions; use the implies
method.
equals
in class Permission
o
- the object we are testing for equality with this object.
true
if both ObjectGridPermission objects are equivalent.public int hashCode()
hashCode
in class Permission
public String getActions()
getActions
in class Permission
public static String getActions(int m)
m
- the mask
public int getActionsInInt()
For example, for a ObjectGridPermission which has "query" and "dynamicmap" permissions, the returned value will be 3 (ObjectGridPermission.QUERY|ObjectGridPermission.DYNAMIC_MAP).
|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |