Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server
11g Release 2 (11.1.2)

E27155-01 ESAPI


oracle.security.jps.service.policystore.info
Class RuleExpressionEntry<ReturnType extends DataType>

java.lang.Object
  extended by oracle.security.jps.service.policystore.info.RuleExpressionEntry<ReturnType>

Type Parameters:
ReturnType -
Direct Known Subclasses:
BooleanExpressionEntry

public abstract class RuleExpressionEntry<ReturnType extends DataType>
extends java.lang.Object

The class represents the condition expression of a policy. Basically, an expression consists of three parts, 1. Function 2. Parameters 3. Return Type A sample code is shown below to demonstrate how to construct a RuleExpression object

        // define a policy condition, (a = 1) and (b != "abc")
        ExtensionManager xMgr = ap.getExtensionManager();
        AttributeEntry<OpssInteger> a = xMgr.createAttribute("a", "display name", "description", OpssInteger.class, AttributeCategory.DYNAMIC, true);
        AttributeEntry<OpssString> b = xMgr.createAttribute("b", "display name", "description", OpssString.class, AttributeCategory.DYNAMIC, true);
        FunctionEntry strEQ = xMgr.getFunction(RuleExpressionEntry.BuiltInFunctions.STRING_EQUAL.name());
        FunctionEntry intEQ = xMgr.getFunction(RuleExpressionEntry.BuiltInFunctions.INTEGER_EQUAL.name());
        FunctionEntry not = xMgr.getFunction(RuleExpressionEntry.BuiltInFunctions.NOT.name());
        FunctionEntry and = xMgr.getFunction(RuleExpressionEntry.BuiltInFunctions.AND.name());
        //build subexpressions: (a = 1), (b = "abc") and (!(b = "abc"))
        Expression expr1 = new Expression(intEq);
        expr1.addExpressionComponent(a);
        expr1.addExpressionComponent(new OpssInteger(1));

        Expression expr2 = new Expression(strEq);
        expr2.addExpressionComponent(b);
        expr2.addExpressionComponent(new OpssString("abc"));

        Expression expr3 = new Expression(not);
        expr3.addExpressionComponent(expr2);

        Expression expr = new FunctionEntry(and);
        expr.addExpressionComponent(expr1);
        expr.addExpressionComponent(expr3);


        BooleanExpressionEntry<OpssBoolean> condition = new BooleanExpressionEntry<OpssBoolean>(expr);
 

Nested Class Summary
static class RuleExpressionEntry.AttributeDefinitionHolder
           
static class RuleExpressionEntry.BuiltInAttributes
           
static class RuleExpressionEntry.BuiltInFunctions
          Built-in functions supported in OPSS MAPI.
static class RuleExpressionEntry.FunctionCategory
          Categories of functions.

 

Field Summary
static java.util.Map<RuleExpressionEntry.BuiltInAttributes,RuleExpressionEntry.AttributeDefinitionHolder> BUILT_IN_ATTRIBUTE_DEFINTION
           
static java.util.Map<RuleExpressionEntry.BuiltInFunctions,java.lang.Class<?>[]> BUILT_IN_FUNCTION_DEFINITION
           
static java.util.Map<RuleExpressionEntry.BuiltInFunctions,VarArgsInfo> BUILT_IN_FUNCTION_VAR_ARGS
           

 

Constructor Summary
RuleExpressionEntry()
           

 

Method Summary
 ExpressionComponent getExpressionComp()
           
 FunctionEntry getFunction()
           
static RuleExpressionEntry.FunctionCategory getFunctionCategory(RuleExpressionEntry.BuiltInFunctions func)
          Returns the category of a built in function.
static java.lang.String getOperator(RuleExpressionEntry.BuiltInFunctions func)
          Returns operator for the function if any, returns null otherwise.
 Parameters getParameters()
           
 java.lang.String toFreeFormString()
          Returns a free form string representing this expression, for example: func1(p,q + r) AND (!(func2(s))) = true
 java.lang.String toString()
           

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

BUILT_IN_FUNCTION_DEFINITION

public static final java.util.Map<RuleExpressionEntry.BuiltInFunctions,java.lang.Class<?>[]> BUILT_IN_FUNCTION_DEFINITION

BUILT_IN_FUNCTION_VAR_ARGS

public static final java.util.Map<RuleExpressionEntry.BuiltInFunctions,VarArgsInfo> BUILT_IN_FUNCTION_VAR_ARGS

BUILT_IN_ATTRIBUTE_DEFINTION

public static java.util.Map<RuleExpressionEntry.BuiltInAttributes,RuleExpressionEntry.AttributeDefinitionHolder> BUILT_IN_ATTRIBUTE_DEFINTION

Constructor Detail

RuleExpressionEntry

public RuleExpressionEntry()

Method Detail

getParameters

public Parameters getParameters()

getExpressionComp

public ExpressionComponent getExpressionComp()

getFunction

public FunctionEntry getFunction()

getFunctionCategory

public static RuleExpressionEntry.FunctionCategory getFunctionCategory(RuleExpressionEntry.BuiltInFunctions func)
Returns the category of a built in function.
Parameters:
func -

getOperator

public static java.lang.String getOperator(RuleExpressionEntry.BuiltInFunctions func)
Returns operator for the function if any, returns null otherwise. For example, this method returns "=" for STRING_EQUAL function and "<" for TIME_LESS_THAN.
Parameters:
func -

toFreeFormString

public java.lang.String toFreeFormString()
Returns a free form string representing this expression, for example: func1(p,q + r) AND (!(func2(s))) = true

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server
11g Release 2 (11.1.2)

E27155-01 ESAPI


Copyright © 2011,2012, Oracle and/or its affiliates. All rights reserved.