Class ExportFileWriteContext
- java.lang.Object
-
- com.broadleafcommerce.common.dataexport.service.ExportFileWriteContext
-
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
CSVExportFileWriteContext
public abstract class ExportFileWriteContext extends Object implements AutoCloseable
Holds state information particular to a specific export write operation. The usage pattern is that theExportManager
will create an instance of this context (throughExportFileWriter.createExecutionContext(OutputStream)
), which is bound to the output stream of the target file. It will then supply this context to the file writer in subsequent operations, and the file writer will use/update the state information within the context to write the data.When the
ExportManager
determines that the writing should be ended (either on success or error), it will callAutoCloseable.close()
. It is a requirement that the invocation of this method will close theoutputStream
and any other resources that were opened.- Author:
- Samarth Dhruva (samarthd)
-
-
Constructor Summary
Constructors Constructor Description ExportFileWriteContext(@NonNull OutputStream outputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull OutputStream
getOutputStream()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Constructor Detail
-
ExportFileWriteContext
public ExportFileWriteContext(@NonNull @NonNull OutputStream outputStream)
-
-
Method Detail
-
getOutputStream
@NonNull public @NonNull OutputStream getOutputStream()
-
-