Rule Execution Server API

ilog.rules.factory
Class IlrFunctionTaskFactory

java.lang.Object
  extended by ilog.rules.factory.IlrTaskFactory
      extended by ilog.rules.factory.IlrFunctionTaskFactory
All Implemented Interfaces:
ilog.rules.factory.IlrRulesetElement, IlrTaskElement, Serializable

public class IlrFunctionTaskFactory
extends IlrTaskFactory

This class represents the class of a function-based task definition of the IRL language. It provides the specific body as inlined IRL code.

Warning: Serialized objects of this class will not be compatible with future releases. The current serialization support is appropriate for short-term storage or RMI between applications running the same version of IBM Decision Server.

See Also:
IlrRuleTaskFactory, IlrFunctionTaskFactory, IlrFlowTaskFactory, Serialized Form

Constructor Summary
IlrFunctionTaskFactory(IlrReflect reflect, IlrPackageFactory pkg, String name)
          Builds a function-based task by specifying a reflect and a name.
IlrFunctionTaskFactory(IlrReflect reflect, String name)
          Deprecated. Use instead IlrFunctionTaskFactory(IlrReflect reflect, IlrPackageFactory pkg, String name).
 
Method Summary
 ArrayList getAllStatements()
          Provides all statements referenced by the task definition.
 IlrFunctionFactory getFunction()
          Returns the task body.
 boolean hasEmptyBody()
          Indicates whether the task has an empty body or not, that is, if there are no statements for the task body.
 void setFunction(IlrFunctionFactory function)
          Sets the body of the function-based task.
 
Methods inherited from class ilog.rules.factory.IlrTaskFactory
getAllValues, getCompletionFlagValue, getFinalActions, getFormalComment, getInitialActions, getName, getPackage, getProperties, getShortName, setCompletionFlagValue, setFinalActions, setFormalComment, setInitialActions, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlrFunctionTaskFactory

public IlrFunctionTaskFactory(IlrReflect reflect,
                              String name)
Deprecated. Use instead IlrFunctionTaskFactory(IlrReflect reflect, IlrPackageFactory pkg, String name).

Builds a function-based task by specifying a reflect and a name. The task is considered to belong to the default package. The body is empty.

Parameters:
reflect - The reflect object of this function-based task factory.
name - The name of the function-based task.

IlrFunctionTaskFactory

public IlrFunctionTaskFactory(IlrReflect reflect,
                              IlrPackageFactory pkg,
                              String name)
Builds a function-based task by specifying a reflect and a name. The task belongs to the specified package. In case the package is null, the task is considered to belong to the default package. The body is empty.

Parameters:
reflect - The reflect object of this function-based task factory.
pkg - The package to which the task belongs.
name - The name of the function-based task.
Method Detail

setFunction

public void setFunction(IlrFunctionFactory function)
Sets the body of the function-based task. The function shall not be not null, return void, and have no arguments. If any of these conditions is not verified, an IllegalArgumentException exception is thrown.

Parameters:
function - The function that implements the task body.

getFunction

public IlrFunctionFactory getFunction()
Returns the task body.

Returns:
The function that implements the task body.

hasEmptyBody

public boolean hasEmptyBody()
Indicates whether the task has an empty body or not, that is, if there are no statements for the task body.

Specified by:
hasEmptyBody in class IlrTaskFactory
Returns:
true if the task body is empty, else it returns false.

getAllStatements

public ArrayList getAllStatements()
Provides all statements referenced by the task definition. This method can make a factory exploration by a factory explorer easier. The returned list contains statements. If the task references no statements, the returned list is empty.

Overrides:
getAllStatements in class IlrTaskFactory
Returns:
All the statements referenced by the task.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013