IBM WebSphere Extended Deployment (XD)TM
Release 6.0.1

com.ibm.websphere.objectgrid.security
MapPermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--com.ibm.websphere.objectgrid.security.MapPermission


This class represents permissions to the ObjectMap. It has five different actions:

Please refere to com.ibm.websphere.objectgrid.ObjectMap class for the permissions needed for each method.
See Also:
    Permission


Field Summary
protected  intmask
          
public  intNUMBER_PERMISSION
          
public  intREAD
          
public  intWRITE
          
public  intINSERT
          
public  intREMOVE
          
public  intINVALIDATE
          
public  StringPERMISSIONS
          
public  StringALL_PERMISSION
          
public  intALL
          

Constructor Summary
MapPermission(java.lang.String)
          
MapPermission(java.lang.String, java.lang.String)
          
MapPermission(java.lang.String, int)
          


Method Summary
public  booleanimplies(java.security.Permission)
          
public  booleanequals(java.lang.Object)
          
public  inthashCode()
          
public  StringgetActions()
          
public  StringgetActions(int)
           A static method to return the action String for the inputed mask.
public  StringgetParsedNames()
           This method returns an array which contains the object grid name and map name.
public  intgetActionsInInt()
           This method returns an int value which represents the permission. For example,.

Inherited Methods

Methods inherited from java.security.Permission
checkGuard, getName, newPermissionCollection, toString
Methods inherited from java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

mask

protected 
  mask
mask indicating the permissions

NUMBER_PERMISSION

public 
  static NUMBER_PERMISSION
number of Permissions

READ

public 
  static READ
Read permission constant

WRITE

public 
  static WRITE
Write permission constant

INSERT

public 
  static INSERT
Insert permission constant

REMOVE

public 
  static REMOVE
Remove permission constant

INVALIDATE

public 
  static INVALIDATE
Invalidate permission constant

PERMISSIONS

public 
  static PERMISSIONS
Permission string array

ALL_PERMISSION

public 
  static ALL_PERMISSION
all permission String

ALL

public 
  static ALL
all permission constant

Constructor Detail

MapPermission

public MapPermission( String name)
Constructor
Parameters:
name - the ObjectMap name


MapPermission

public MapPermission( String name,String actions)
Constructor
Parameters:
name - the ObjectMap name
actions - the actions, such as "read", "write", "remove", "insert", and "invalidate".


MapPermission

public MapPermission( String name,int actions)
constructor
Parameters:
name - the ObjectMap name
actions - the actions integer. For example, MapPermission.READ|MapPermission.WRITE


Method Detail

implies

public boolean implies(Permission permission)
Parameters:
    permission - the Permission object


Returns:
     true, if the Permission object is the same as this.


equals

public boolean equals(Object o)

See Also:
    equals(java.lang.Object)
Parameters:


hashCode

public int hashCode()

See Also:
    hashCode()


getActions

public String getActions()
Get the action string


Returns:
     the action String


getActions

public String getActions(int m)
A static method to return the action String for the inputed mask.
Parameters:
    m - the mask


Returns:
     the action string representated for the mask


getParsedNames

public String getParsedNames()
This method returns an array which contains the object grid name and map name.


Returns:
     the parsed name array


getActionsInInt

public int getActionsInInt()
This method returns an int value which represents the permission. For example, for a MapPermission which has read and insert permissions, the returned int value will be 5 (MapPermission.READ|MapPermission.INSERT).


Returns:
     an int value which represents the permission.


IBM WebSphere Extended Deployment (XD)TM
Release 6.0.1