public abstract class ResultWriter extends AbstractResultHandler
log, paramList
Constructor and Description |
---|
ResultWriter() |
Modifier and Type | Method and Description |
---|---|
void |
closeBlock(PipeLineSession session,
String streamId,
String blockName,
Map<String,Object> blocks) |
void |
closeDocument(PipeLineSession session,
String streamId) |
void |
closeRecordType(PipeLineSession session,
String streamId) |
protected abstract Writer |
createWriter(PipeLineSession session,
String streamId) |
String |
finalizeResult(PipeLineSession session,
String streamId,
boolean error)
Called when all records in the original file are handled.
|
protected Writer |
getWriter(PipeLineSession session,
String streamId,
boolean create) |
void |
handleResult(PipeLineSession session,
String streamId,
String recordKey,
String result)
write a result record.
|
void |
openBlock(PipeLineSession session,
String streamId,
String blockName,
Map<String,Object> blocks) |
void |
openDocument(PipeLineSession session,
String streamId)
Called once, before the first record of a stream is presented to handleResult.
|
void |
openRecordType(PipeLineSession session,
String streamId) |
protected String |
replacePattern(String target,
String blockName) |
void |
setBlockNamePattern(String pattern)
string that is replaced by name of block or name of stream in above strings
|
void |
setOnCloseBlock(String line)
string that is written after the end of each logical block, as defined in the flow
|
void |
setOnCloseDocument(String line)
string that is written after all data of results is written
|
void |
setOnOpenBlock(String line)
string that is written before the start of each logical block, as defined in the flow
|
void |
setOnOpenDocument(String line)
string that is written before any data of results is written
|
protected void |
writeNewLine(Writer w) |
addParameter, close, configure, getParameterList, hasPrefix, isDefault, open, setBlockByRecordType, setDefault, setName, setPipe, setPrefix, setSuffix
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isBlockByRecordType
getName
getApplicationContext, getName
getConfigurationClassLoader
protected abstract Writer createWriter(PipeLineSession session, String streamId) throws Exception
Exception
public void openDocument(PipeLineSession session, String streamId) throws Exception
IResultHandler
openDocument
in interface IResultHandler
openDocument
in class AbstractResultHandler
session
- current PipeLineSessionstreamId
- identification of the original file/stream/messageException
public void closeDocument(PipeLineSession session, String streamId)
closeDocument
in interface IResultHandler
closeDocument
in class AbstractResultHandler
public String finalizeResult(PipeLineSession session, String streamId, boolean error) throws Exception
IResultHandler
session
- current PipeLineSessionstreamId
- identification of the original file/stream/message containing the untransformed recordsException
public void handleResult(PipeLineSession session, String streamId, String recordKey, String result) throws Exception
IResultHandler
session
- current PipeLineSessionstreamId
- identification of the original file/stream/message containing the untransformed recordsrecordKey
- key of the record (describes the record type)result
- transformed recordException
protected void writeNewLine(Writer w) throws IOException
IOException
public void openRecordType(PipeLineSession session, String streamId) throws Exception
session
- current PipeLineSessionstreamId
- identification of the original file/stream/message containing the untransformed recordsException
public void closeRecordType(PipeLineSession session, String streamId) throws Exception
session
- current PipeLineSessionstreamId
- identification of the original file/stream/message containing the untransformed recordsException
public void openBlock(PipeLineSession session, String streamId, String blockName, Map<String,Object> blocks) throws Exception
Exception
public void closeBlock(PipeLineSession session, String streamId, String blockName, Map<String,Object> blocks) throws Exception
Exception
protected Writer getWriter(PipeLineSession session, String streamId, boolean create) throws Exception
Exception
public void setOnOpenDocument(String line)
public void setOnCloseDocument(String line)
public void setOnOpenBlock(String line)
public void setOnCloseBlock(String line)
public void setBlockNamePattern(String pattern)
Copyright © 2023 Frank!Framework. All rights reserved.