org.eclipse.stardust.engine.api.runtime
Class PermissionState

java.lang.Object
  extended by org.eclipse.stardust.common.IntKey
      extended by org.eclipse.stardust.engine.api.runtime.PermissionState
All Implemented Interfaces:
Serializable, Comparable

public class PermissionState
extends org.eclipse.stardust.common.IntKey

A representation of the state of a permission. This class also provides human readable values for the permission states.

Version:
$Revision: 28303 $
Author:
fherinean
See Also:
Serialized Form

Field Summary
static PermissionState Denied
          The permission is denied to the current user.
static int DENIED
          The permission is denied to the current user.
static PermissionState Granted
          The permission is granted to the current user.
static int GRANTED
          The permission is granted to the current user.
static PermissionState Unknown
          The permission state is unknown.
static int UNKNOWN
          The permission state is unknown.
 
Method Summary
static PermissionState getState(int value)
          Factory method to get the PermissionState corresponding to the given code.
static String getString(int value)
          Gets the name of the PermissionState corresponding to the given code.
 
Methods inherited from class org.eclipse.stardust.common.IntKey
compareTo, equals, getKey, getKeys, getName, getValue, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN

public static final int UNKNOWN
The permission state is unknown.

See Also:
Constant Field Values

GRANTED

public static final int GRANTED
The permission is granted to the current user.

See Also:
Constant Field Values

DENIED

public static final int DENIED
The permission is denied to the current user.

See Also:
Constant Field Values

Unknown

public static final PermissionState Unknown
The permission state is unknown.


Granted

public static final PermissionState Granted
The permission is granted to the current user.


Denied

public static final PermissionState Denied
The permission is denied to the current user.

Method Detail

getString

public static String getString(int value)
Gets the name of the PermissionState corresponding to the given code.

Parameters:
value - one of the PermissionState codes.
Returns:
the name of the corresponding PermissionState.

getState

public static PermissionState getState(int value)
Factory method to get the PermissionState corresponding to the given code.

Parameters:
value - one of the PermissionState codes.
Returns:
one of the predefined PermissionStates or null if it's an invalid code.


Copyright © 2017 Eclipse Stardust. All Rights Reserved.