public class TemplateWriter extends TextWriter
DataEndpoint.State
currentRecord
lastRecord, PRODUCT, PRODUCT_VERSION, VENDOR, XML_INPUT_FACTORY_KEY
BUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZE
id, log, name, TIMESTAMP_FORMAT
Constructor and Description |
---|
TemplateWriter(File file) |
TemplateWriter(File file,
boolean append) |
TemplateWriter(File file,
boolean append,
boolean useTemplateObjectWrapper) |
TemplateWriter(Writer writer) |
TemplateWriter(Writer writer,
boolean useTemplateObjectWrapper) |
Modifier and Type | Method and Description |
---|---|
DataException |
addExceptionProperties(DataException exception)
Adds this endpoint's current state to a
DataException . |
void |
close()
Indicates that this endpoint has finished reading or writing.
|
Configuration |
getConfiguration() |
Map<String,Object> |
getData() |
Template |
getDetailTemplate() |
Template |
getFooterTemplate() |
Template |
getHeaderTemplate() |
boolean |
isAlwaysShowFooter() |
boolean |
isAlwaysShowHeader() |
boolean |
isUseTemplateObjectWrapper() |
void |
open()
Makes this endpoint ready for reading or writing.
|
TemplateWriter |
setAlwaysShowFooter(boolean alwaysShowFooter)
Indicates if the footer should be written, even if no records were written (defaults to true).
|
TemplateWriter |
setAlwaysShowHeader(boolean alwaysShowHeader)
Indicates if the header should be written, even if no records are written (defaults to true).
|
TemplateWriter |
setDetailTemplate(String detailTemplate) |
TemplateWriter |
setDetailTemplate(Template detailTemplate) |
TemplateWriter |
setFooterTemplate(String footerTemplate) |
TemplateWriter |
setFooterTemplate(Template footerTemplate) |
TemplateWriter |
setHeaderTemplate(String headerTemplate) |
TemplateWriter |
setHeaderTemplate(Template headerTemplate) |
protected void |
writeRecord(Record record) |
getFile, getWriter, isAppend, isAutoCloseWriter, isFieldNamesInFirstRow, isFlushOnWrite, setAutoCloseWriter, setFlushOnWrite, write
setFieldNamesInFirstRow, writeImpl
available, getNestedEndpoint, getNestedWriter, getRootEndpoint, getRootWriter
decrementRecordCount, enableJmx, getLastRecord, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, incrementRecordCount, isRecordCountBigInteger, resetRecordCount, toString
addElapsedtime, assertClosed, assertNotOpened, assertOpened, finalize, getClosedOn, getDescription, getElapsedTime, getElapsedTimeAsString, getOpenedOn, getOpenElapsedTime, getOpenElapsedTimeAsString, getSelfTime, getSelfTimeAsString, getState, isCaptureElapsedTime, isClosed, isOpen, setCaptureElapsedTime, setDescription
public TemplateWriter(File file, boolean append)
public TemplateWriter(File file)
public TemplateWriter(Writer writer)
public TemplateWriter(File file, boolean append, boolean useTemplateObjectWrapper)
public TemplateWriter(Writer writer, boolean useTemplateObjectWrapper)
public Configuration getConfiguration()
public boolean isAlwaysShowFooter()
public TemplateWriter setAlwaysShowFooter(boolean alwaysShowFooter)
public boolean isAlwaysShowHeader()
public TemplateWriter setAlwaysShowHeader(boolean alwaysShowHeader)
public boolean isUseTemplateObjectWrapper()
public Template getHeaderTemplate()
public TemplateWriter setHeaderTemplate(String headerTemplate)
public TemplateWriter setHeaderTemplate(Template headerTemplate)
public Template getFooterTemplate()
public TemplateWriter setFooterTemplate(String footerTemplate)
public TemplateWriter setFooterTemplate(Template footerTemplate)
public Template getDetailTemplate()
public TemplateWriter setDetailTemplate(String detailTemplate)
public TemplateWriter setDetailTemplate(Template detailTemplate)
public void open() throws DataException
DataEndpoint
open
in class AbstractWriter
DataException
public void close() throws DataException
DataEndpoint
close
in class TextWriter
DataException
protected void writeRecord(Record record) throws Throwable
writeRecord
in class AbstractWriter
Throwable
public DataException addExceptionProperties(DataException exception)
Endpoint
DataException
. Since this method is called whenever an
exception is thrown, subclasses should override it to add their specific information.addExceptionProperties
in class TextWriter
Copyright (c) 2006-2024 North Concepts Inc. All Rights Reserved.