|
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.ServerMapPermission
public final class ServerMapPermission
This class represents permissions to an ObjectMap hosted in a server, that is, a server-side distributed map. It has two following different actions:
BackingMap
class for the permissions
needed for each method.
Permission
,
ObjectMap
,
Serialized FormField Summary | |
---|---|
static int |
ALL
All permission constant |
static String |
ALL_PERMISSION
All permissions String |
static int |
DYNAMIC_INDEX
dynamic index 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 |
REPLICATE
replicating server map to client map permission constant. |
Constructor Summary | |
---|---|
ServerMapPermission(String name,
int actions)
Constructs a new ServerMapPermission for the named map with the specified actions. |
|
ServerMapPermission(String name,
String actions)
Constructs a new ServerMapPermission for the named map with the specified actions. |
|
ServerMapPermission(String ogName,
String mapName,
int actions)
Constructs a new MapPermission for the named map with the specified actions. |
|
ServerMapPermission(String ogName,
String mapName,
String actions)
Constructs a new ServerMapPermission for the named map with the specified actions. |
Method Summary | |
---|---|
boolean |
equals(Object o)
Checks two ServerMapPermission 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. |
String[] |
getParsedNames()
Returns an array which contains the object grid name and map name. |
int |
hashCode()
Returns the hash code value for this ServerMapPermission 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 NUMBER_PERMISSION
public static final int REPLICATE
public static final int DYNAMIC_INDEX
public static final String[] PERMISSIONS
The indexes to the String representation are the int
constants for each permission (i.e. replicate, dynamicIndex)
public static final String ALL_PERMISSION
public static final int ALL
Constructor Detail |
---|
public ServerMapPermission(String name, String actions)
The map name for this permission should be in the format of
name
- the full name of the map. It is also the permission name.actions
- the comma separated list of actions, such as "replicate" and
"dynamicIndex".
IllegalArgumentException
- if name is null
or malformed
or if actions is null
or contains an invalidate
action namepublic ServerMapPermission(String ogName, String mapName, String actions)
This method is used for the ObjectGrid map of which the ObjectGrid name or map name contains a ".". In this case, we pass the ObjectGrid name and map name separately as the parameters.
ObjectGrid uses <ObjectGrid name>.<map name> as the permission name. Therefore, your application still needs to make sure there is no name conflicts for the <ObjectGrid name>.<map name>. For example, you should not have an ObjectGrid with name "og" and one of its maps with name "session.data", and another ObjectGrid with name "og.session" and one of its maps with name "data".
ogName
- the ObjectGrid name.mapName
- the map name.actions
- the comma separated list of actions, such as "replicate" and
"dynamicIndex".
IllegalArgumentException
- if ObjectGrid name or map name is null
or if actions is null
or contains an invalidate
action namepublic ServerMapPermission(String name, int actions)
The map name for this permission should be in the format of
name
- the full name of the map. It is also the permission name.actions
- the actions mask. For example,
ServerMapPermission.REPLICATION|MapPermission.DYNAMIC_INDEX
IllegalArgumentException
- if name is null
or malformed
or if actions is less than 0 or greater than ALL
public ServerMapPermission(String ogName, String mapName, int actions)
This method is used for the ObjectGrid map of which the ObjectGrid name or map name contains a ".". In this case, we pass the ObjectGrid name and map name as the parameters.
ObjectGrid uses <ObjectGrid name>.<map name> as the permission name. Therefore, your application still needs to make sure there is no name conflicts for the <ObjectGrid name>.<map name>. For example, you should not have an ObjectGrid with name "og" and one of its maps with name "session.data", and another ObjectGrid with name "og.session" and one of its maps with name "data".
ogName
- the ObjectGrid name.mapName
- the map name.actions
- the actions mask. For example,
ServerMapPermission.REPLICATION|MapPermission.DYNAMIC_INDEX
IllegalArgumentException
- if ObjectGrid name or map name is null
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 ServerMapPermission 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 String[] getParsedNames()
public int getActionsInInt()
For example, for a ServerMapPermission which has replicate and dynamicIndex permissions, the returned value will be 5 (ServerMapPermission.REPLICATE|ServerMapPermission.DYNAMIC_INDEX).
|
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 |