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
|
Constructor Summary |
Utils()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
Utils
public Utils()
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 ofexprType - The type which we want the expression to be. -1 if
we do not care about this parametervalType - The type which we want the value to be. If null then
we do not care about this parameter typeevent - The runtime event from which to get parameter values if
neededpolicy - 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