ponderEnforcement.ponderMC.policyObjects
Class Utils

java.lang.Object
  |
  +--ponderEnforcement.ponderMC.policyObjects.Utils

public class Utils
extends java.lang.Object

Function: Defines constants etc needed by all classes in the project


Field Summary
static int EXECUTION_ALLOW
           
static int EXECUTION_DISALLOW
           
static int POLICY_STATE_DORMANT
           
static int POLICY_STATE_ENABLED
           
static int POLICY_STATE_LOADED
           
 
Constructor Summary
Utils()
           
 
Method Summary
static java.lang.Object getExpressionValue(ExpressionI expr, int exprType, Type valType, PonderEventI event, BasicPolicyI policy)
          Returns the Value of the given expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POLICY_STATE_DORMANT

public static final int POLICY_STATE_DORMANT

POLICY_STATE_LOADED

public static final int POLICY_STATE_LOADED

POLICY_STATE_ENABLED

public static final int POLICY_STATE_ENABLED

EXECUTION_ALLOW

public static final int EXECUTION_ALLOW

EXECUTION_DISALLOW

public static final int EXECUTION_DISALLOW
Constructor Detail

Utils

public Utils()
Method Detail

getExpressionValue

public static java.lang.Object getExpressionValue(ExpressionI expr,
                                                  int exprType,
                                                  Type valType,
                                                  PonderEventI event,
                                                  BasicPolicyI policy)
Returns the Value of the given expression. If the expression or the value is not of the given Type, it returns null. ### Currently it only deals with literal Expressions
Parameters:
expr - The expression to get the value of
exprType - The type which we want the expression to be. -1 if we do not care about this parameter
valType - The type which we want the value to be. If null then we do not care about this parameter type
event - The runtime event from which to get parameter values if needed
policy - The BasicPolicy from which to get parameter values if needed
Returns:
The value of the Expression or null if the expression is not of the given expression type or the value is not of the given type