Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.ide.extension.rules
Class SimpleRule

java.lang.Object
  extended by oracle.ide.extension.rules.Rule
      extended by oracle.ide.extension.rules.SimpleRule


public class SimpleRule
extends Rule

A SimpleRule consists of a reference to a RuleType and a set of parameters. When evaluate() is called, the RuleType's RuleFunction is instantiated and the RuleFunction's evaluate method is passed the parameters (resulting in a boolean return value). This class is the parsed representation of the <rule> element in extension.xml files.


Constructor Summary
SimpleRule(java.lang.String id, Extension extension, RuleType type)
           

 

Method Summary
 boolean addParameter(RuleFunctionParameter parameter)
          Attempts to add a parameter to this Rule.
 boolean evaluate(RuleEvaluationContext ruleContext)
           
 RuleType getType()
           
 boolean hasParameter(java.lang.String name)
           
 boolean matchesType(java.util.Set<java.lang.String> ruleTypeIdSet)
          Returns true if the type of this rule is identified in the given ruleTypeId set

 

Methods inherited from class oracle.ide.extension.rules.Rule
getExtension, getId

 

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

 

Constructor Detail

SimpleRule

public SimpleRule(java.lang.String id,
                  Extension extension,
                  RuleType type)

Method Detail

getType

public RuleType getType()

hasParameter

public boolean hasParameter(java.lang.String name)

addParameter

public boolean addParameter(RuleFunctionParameter parameter)
Attempts to add a parameter to this Rule. Returns false if a parameter of the same name already existed.
Parameters:
parameter -
Returns:

evaluate

public boolean evaluate(RuleEvaluationContext ruleContext)
                 throws RuleEvaluationException
Specified by:
evaluate in class Rule
Throws:
RuleEvaluationException

matchesType

public boolean matchesType(java.util.Set<java.lang.String> ruleTypeIdSet)
Description copied from class: Rule
Returns true if the type of this rule is identified in the given ruleTypeId set
Specified by:
matchesType in class Rule
Returns:

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


Copyright © 1997, 2012, Oracle. All rights reserved.