1 package com.kodexa.client.steps; 2 3 import com.kodexa.client.Document; 4 import com.kodexa.client.pipeline.PipelineContext; 5 6 /** 7 * An interface that describes the contract for a pipeline step. 8 * <p> 9 * Each step will recieve one document at a time, and also the pipeline context, it can then work with that document 10 * and return it, or create a new document to return. 11 */ 12 public interface PipelineStep { 13 14 /** 15 * The pipeline will call the process method, passing each document to the step. The step will then perform 16 * and actions and can return either the same document or a new document representing its result. 17 * <p> 18 * It can also interact with the context if it wishes to work with the stores or other contextual information. 19 * 20 * @param document The document to process 21 * @param context The pipeline's context 22 * @return The document after the steps actions 23 */ 24 Document../../../../com/kodexa/client/Document.html#Document">Document process(Document document, PipelineContext context); 25 26 /** 27 * The name of the pipeline step 28 * 29 * @return a string representing the name 30 */ 31 String getName(); 32 }