public class StaxEventItemWriterBuilder<T>
extends java.lang.Object
StaxEventItemWriter
.StaxEventItemWriter
Constructor and Description |
---|
StaxEventItemWriterBuilder() |
Modifier and Type | Method and Description |
---|---|
StaxEventItemWriter<T> |
build()
Returns a configured
StaxEventItemWriter |
StaxEventItemWriterBuilder<T> |
encoding(java.lang.String encoding)
Encoding for the file.
|
StaxEventItemWriterBuilder<T> |
footerCallback(StaxWriterCallback footerCallback)
A
StaxWriterCallback to provide any footer elements |
StaxEventItemWriterBuilder<T> |
forceSync(boolean forceSync)
Flag to indicate that changes should be force-synced to disk on flush.
|
StaxEventItemWriterBuilder<T> |
headerCallback(StaxWriterCallback headerCallback)
A
StaxWriterCallback to provide any header elements |
StaxEventItemWriterBuilder<T> |
marshaller(org.springframework.oxm.Marshaller marshaller)
The
Marshaller implementation responsible for the serialization of the
items to XML. |
StaxEventItemWriterBuilder<T> |
name(java.lang.String name)
The name used to calculate the key within the
ExecutionContext . |
StaxEventItemWriterBuilder<T> |
overwriteOutput(boolean overwriteOutput)
Indicates if an existing file should be overwritten if found.
|
StaxEventItemWriterBuilder<T> |
resource(org.springframework.core.io.Resource resource)
The
Resource to be used as output. |
StaxEventItemWriterBuilder<T> |
rootElementAttributes(java.util.Map<java.lang.String,java.lang.String> rootElementAttributes)
A Map of attributes to be included in the document's root element.
|
StaxEventItemWriterBuilder<T> |
rootTagName(java.lang.String rootTagName)
The name of the root tag for the output document.
|
StaxEventItemWriterBuilder<T> |
saveState(boolean saveState)
Indicates if the state of the writer should be saved in the
ExecutionContext . |
StaxEventItemWriterBuilder<T> |
shouldDeleteIfEmpty(boolean shouldDelete)
Flag to indicate that the output file should be deleted if no results were written
to it.
|
StaxEventItemWriterBuilder<T> |
transactional(boolean transactional)
The resulting writer is participating in a transaction and writes should be delayed
as late as possible.
|
StaxEventItemWriterBuilder<T> |
version(java.lang.String version)
Version of XML to be generated.
|
public StaxEventItemWriterBuilder<T> name(java.lang.String name)
ExecutionContext
. Required if
saveState(boolean)
is set to true.name
- name of the reader instanceItemStreamSupport.setName(String)
public StaxEventItemWriterBuilder<T> resource(org.springframework.core.io.Resource resource)
Resource
to be used as output.resource
- the output from the writerStaxEventItemWriter.setResource(Resource)
public StaxEventItemWriterBuilder<T> marshaller(org.springframework.oxm.Marshaller marshaller)
Marshaller
implementation responsible for the serialization of the
items to XML. This field is required.marshaller
- the component used to generate XMLStaxEventItemWriter.setMarshaller(Marshaller)
public StaxEventItemWriterBuilder<T> headerCallback(StaxWriterCallback headerCallback)
StaxWriterCallback
to provide any header elementsheaderCallback
- a StaxWriterCallback
StaxEventItemWriter.setHeaderCallback(StaxWriterCallback)
public StaxEventItemWriterBuilder<T> footerCallback(StaxWriterCallback footerCallback)
StaxWriterCallback
to provide any footer elementsfooterCallback
- a StaxWriterCallback
StaxEventItemWriter.setFooterCallback(StaxWriterCallback)
public StaxEventItemWriterBuilder<T> transactional(boolean transactional)
transactional
- indicates that the writer is transactional. Defaults to false.StaxEventItemWriter.setTransactional(boolean)
public StaxEventItemWriterBuilder<T> forceSync(boolean forceSync)
forceSync
- indicates if force sync should occur. Defaults to false.StaxEventItemWriter.setForceSync(boolean)
public StaxEventItemWriterBuilder<T> shouldDeleteIfEmpty(boolean shouldDelete)
shouldDelete
- indicatorStaxEventItemWriter.setShouldDeleteIfEmpty(boolean)
public StaxEventItemWriterBuilder<T> encoding(java.lang.String encoding)
encoding
- String encoding algorithmStaxEventItemWriter.setEncoding(String)
public StaxEventItemWriterBuilder<T> version(java.lang.String version)
Marshaller
provided.version
- XML versionStaxEventItemWriter.version
public StaxEventItemWriterBuilder<T> rootTagName(java.lang.String rootTagName)
rootTagName
- tag nameStaxEventItemWriter.setRootTagName(String)
public StaxEventItemWriterBuilder<T> rootElementAttributes(java.util.Map<java.lang.String,java.lang.String> rootElementAttributes)
rootElementAttributes
- map fo attributesStaxEventItemWriter.setRootElementAttributes(Map)
public StaxEventItemWriterBuilder<T> overwriteOutput(boolean overwriteOutput)
overwriteOutput
- indicatorStaxEventItemWriter.setOverwriteOutput(boolean)
public StaxEventItemWriterBuilder<T> saveState(boolean saveState)
ExecutionContext
. Setting this to false
will impact restartability. Defaults to true.saveState
- indicatorStaxEventItemWriter.setSaveState(boolean)
public StaxEventItemWriter<T> build()
StaxEventItemWriter