SMILA 1.0 API documentation

org.eclipse.smila.processing.pipelets
Class FileReaderPipelet

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

public class FileReaderPipelet
extends java.lang.Object
implements Pipelet

This pipelet reads in a file described by a path attribute and sets the content as an attachment.


Field Summary
static java.lang.String PROPERTY_CONTENT_ATTACHMENT
          Constant for the property contentAttachment.
static java.lang.String PROPERTY_PATH_ATTRIBUTE
          Constant for the property pathAttribute.
 
Constructor Summary
FileReaderPipelet()
           
 
Method Summary
 void configure(AnyMap configuration)
          set configuration of pipelet.
 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_PATH_ATTRIBUTE

public static final java.lang.String PROPERTY_PATH_ATTRIBUTE
Constant for the property pathAttribute.

See Also:
Constant Field Values

PROPERTY_CONTENT_ATTACHMENT

public static final java.lang.String PROPERTY_CONTENT_ATTACHMENT
Constant for the property contentAttachment.

See Also:
Constant Field Values
Constructor Detail

FileReaderPipelet

public FileReaderPipelet()
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.
See Also:
org.eclipse.smila.processing.SimplePipelet#process(org.eclipse.smila.blackboard.BlackboardService, org.eclipse.smila.datamodel.id.Id[])

SMILA 1.0 API documentation