Skip navigation links

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

E17493-03


oracle.ide.extension.rules
Class RuleFunction

java.lang.Object
  extended by oracle.ide.extension.rules.RuleFunction

Direct Known Subclasses:
AllSelectionsHaveAttribute, AlwaysEnabled, AnySelectionHasAttribute, ContextHasElement, ContextHasNode, ContextHasProject, ContextHasView, ContextHasWorkspace, ContextObjectIsNamed, ElementHasAttribute, ExtensionEnabled, ExtensionInitialized, MultipleSelection, NodeIsDirty, ProductHasId, ProjectHasContent, ProjectHasTechScope, ProjectPropertiesHasKey, PropertyHasValue, SingleSelection

public abstract class RuleFunction
extends java.lang.Object

Abstract base class for all rule function classes. A RuleFunction class provides an implementation of the evaluate() method that returns true or false given a RuleEvaluationContext and a set of parameters.


Constructor Summary
RuleFunction()
           

 

Method Summary
abstract  boolean evaluate(RuleEvaluationContext ruleContext, java.util.Map<java.lang.String,RuleFunctionParameter> parameters)
           
protected  RuleFunctionParameter getRequiredParameterOrThrow(java.util.Map<java.lang.String,RuleFunctionParameter> parameters, java.lang.String paramName)
          Helper method that retrieves the parameter matching the given paramName from the parameters map and throws a RuleEvaluationException if no such parameter is contained in the map
protected  boolean matchesNameOfClassOrAncestor(java.lang.Class clazz, java.lang.String className)
          Returns true if the given className matches the class name of the given Class object, or any of the supertypes in the class heirarchy.

 

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

 

Constructor Detail

RuleFunction

public RuleFunction()

Method Detail

evaluate

public abstract boolean evaluate(RuleEvaluationContext ruleContext,
                                 java.util.Map<java.lang.String,RuleFunctionParameter> parameters)
                          throws RuleEvaluationException
Throws:
RuleEvaluationException

getRequiredParameterOrThrow

protected final RuleFunctionParameter getRequiredParameterOrThrow(java.util.Map<java.lang.String,RuleFunctionParameter> parameters,
                                                                  java.lang.String paramName)
                                                           throws RuleEvaluationException
Helper method that retrieves the parameter matching the given paramName from the parameters map and throws a RuleEvaluationException if no such parameter is contained in the map
Throws:
RuleEvaluationException

matchesNameOfClassOrAncestor

protected final boolean matchesNameOfClassOrAncestor(java.lang.Class clazz,
                                                     java.lang.String className)
Returns true if the given className matches the class name of the given Class object, or any of the supertypes in the class heirarchy. Note that this method does not attempt to load the class specified by className.
Parameters:
clazz -
className -
Returns:

Skip navigation links

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

E17493-03


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