The Loop component API consists of the following methods:
-
get/set("loopType"). This method allows
you to get/set the type of loop to be For, For
Array, For Each, While, or
Do Until. Note:
Must be one of the LoopAPI.TYPE_XXXX
constants.
- get/set("loopParameter"). This method
allows you to get/set the parameter to be modified for the TYPE_FOR
and TYPE_FOR_EACH loops. If the parameter name provided
is not an existing parameter for the component, it will be created when
apply() is called.
- get/set("fromValue"). This method
allows you to get/set the “from” (i.e., starting) value for the TYPE_FOR
loop as a constant value.
- get/set("toValue"). This method allows
you to get/set the “to” (i.e., ending) value for the TYPE_FOR
loop as a constant value.
- get/set("fromParameter"). This method
allows you to get/set the “from” (i.e., starting) value for the TYPE_FOR
loop as the name of a parameter whose value will be substituted when
this component executes.
- get/set("toParameter"). This method
allows you to get/set the “to” (i.e., ending) value for the TYPE_FOR
loop as the name of a parameter whose value will be substituted when
this component executes.
- get/set("increment"). This method
allows you to get/set the increment value for the TYPE_FOR
loop. The “set” call requires an additional second argument to specify
the increment type as LoopAPI.CONSTANT ("C")or
LoopAPI.PARAMETER ("P") (i.e., a parameter
name).
- get("incrementType"). This method
returns the type of increment (LoopAPI.CONSTANT or LoopAPI.PARAMETER)
for the TYPE_FOR loop.
- add("forEachItem"). This method adds
an item to the list of values that the loop parameter will be set to
in the TYPE_FOR_EACH loop.
- set("condition"). This method sets
the single condition to be evaluated for TYPE_WHILE
and TYPE_UNTIL loops. Any previously defined conditions
are cleared. A condition is an array of strings representing the condition
and must be in the form of an array with:
condition[0]->parameterName condition[1]->operator condition[2]->operand condition[3]->operandType
- get("conditions"). This method returns
the entire set of conditions to be evaluated for TYPE_WHILE
and TYPE_UNTIL loops as a single string.
- get/set("maxIterations"). This method
allows you to get/set a maximum number of iterations for the TYPE_WHILE
and TYPE_UNTIL loops. Typically, you use this method
to ensure that the loop is not infinite.
- get/set("runParallel"). This method
allows you to get/set whether to execute the runs defined by the loop
in parallel. This method is used only for TYPE_FOR and
TYPE_FOR_EACH loops.
|