SMILA 1.0 API documentation

org.eclipse.smila.processing.pipelets
Class ScriptPipelet

java.lang.Object
  extended by org.eclipse.smila.processing.pipelets.ScriptPipelet
All Implemented Interfaces:
Pipelet

public class ScriptPipelet
extends java.lang.Object
implements Pipelet

Executes a JavaScript on the meta data of every record.

Author:
Tobias Liefke

Nested Class Summary
static class ScriptPipelet.ResultIDs
          An enhanced result collector that is able to drop the current record.
 
Field Summary
static java.lang.String PROPERTY_RESULT_ATTRIBUTE
          Name of the property that will receive the result of the script.
static java.lang.String PROPERTY_SCRIPT
          Name of the property that contains the script.
static java.lang.String PROPERTY_SCRIPT_FILE
          Name of the property that contains the script file.
static java.lang.String PROPERTY_TYPE
          Name of the property that contains the script language.
 
Constructor Summary
ScriptPipelet()
           
 
Method Summary
 void configure(AnyMap configuration)
          set configuration of pipelet. called once after instantiation before the pipelet is actually used in a workflow.
 java.lang.String[] process(Blackboard blackboard, java.lang.String[] recordIds)
          process given records.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_SCRIPT

public static final java.lang.String PROPERTY_SCRIPT
Name of the property that contains the script.

See Also:
Constant Field Values

PROPERTY_SCRIPT_FILE

public static final java.lang.String PROPERTY_SCRIPT_FILE
Name of the property that contains the script file.

See Also:
Constant Field Values

PROPERTY_TYPE

public static final java.lang.String PROPERTY_TYPE
Name of the property that contains the script language.

See Also:
Constant Field Values

PROPERTY_RESULT_ATTRIBUTE

public static final java.lang.String PROPERTY_RESULT_ATTRIBUTE
Name of the property that will receive the result of the script.

See Also:
Constant Field Values
Constructor Detail

ScriptPipelet

public ScriptPipelet()
Method Detail

configure

public void configure(AnyMap configuration)
               throws ProcessingException
set configuration of pipelet. called once after instantiation before the pipelet is actually used in a workflow.

Specified by:
configure in interface Pipelet
Parameters:
configuration - configuration of pipelet.
Throws:
ProcessingException - configuration is not applicable for pipelet (missing properties, wrong datatypes)

process

public java.lang.String[] process(Blackboard blackboard,
                                  java.lang.String[] recordIds)
                           throws ProcessingException
process given records.

Specified by:
process in interface Pipelet
Parameters:
blackboard - Blackboard holding and managing the records.
recordIds - Ids of records to process.
Returns:
Ids of records to be passed into the next pipelet. By default this should be the same as the passed in recordIds unless there is a specific (businesslogic) reason not to do so.
Throws:
ProcessingException - error during processing.

SMILA 1.0 API documentation