Class ExporterJSON
java.lang.Object
com.helger.photon.exchange.bulkexport.format.ExporterJSON
- All Implemented Interfaces:
IExporter,IExporterFile
Implementation of
IExporterFile for JSON files- Author:
- Philip Helger
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.helger.json.IJsonObjectconvertRecords(IExportRecordProvider aProvider) com.helger.commons.state.ESuccessexportRecords(IExportRecordProvider aProvider, OutputStream aOS) Export all provided records to an output stream.final Charsetfinal EExchangeFileTypefinal com.helger.json.serialize.IJsonWriterSettingsfinal booleanfinal com.helger.json.serialize.JsonWriterSettingsfinal ExporterJSONsetCharset(Charset aCharset) final ExporterJSONsetEmitType(boolean bEmitType) final ExporterJSONsetJsonWriterSettings(com.helger.json.serialize.JsonWriterSettings aJWS)
-
Field Details
-
DEFAULT_EMIT_TYPE
public static final boolean DEFAULT_EMIT_TYPE- See Also:
-
ELEMENT_HEADER
- See Also:
-
ELEMENT_BODY
- See Also:
-
ELEMENT_FOOTER
- See Also:
-
ATTR_TYPE
- See Also:
-
ATTR_VALUE
- See Also:
-
-
Constructor Details
-
ExporterJSON
public ExporterJSON()
-
-
Method Details
-
getFileType
- Specified by:
getFileTypein interfaceIExporterFile- Returns:
- The file type for export.
-
getCharset
-
setCharset
-
jsonWriterSettings
@Nonnull @ReturnsMutableObject public final com.helger.json.serialize.JsonWriterSettings jsonWriterSettings() -
getJsonWriterSettings
@Nonnull @ReturnsImmutableObject public final com.helger.json.serialize.IJsonWriterSettings getJsonWriterSettings() -
setJsonWriterSettings
@Nonnull public final ExporterJSON setJsonWriterSettings(@Nonnull com.helger.json.serialize.JsonWriterSettings aJWS) -
isEmitType
public final boolean isEmitType() -
setEmitType
-
convertRecords
@Nullable public com.helger.json.IJsonObject convertRecords(@Nonnull IExportRecordProvider aProvider) -
exportRecords
@Nonnull public com.helger.commons.state.ESuccess exportRecords(@Nonnull IExportRecordProvider aProvider, @Nonnull @WillClose OutputStream aOS) Description copied from interface:IExporterExport all provided records to an output stream.- Specified by:
exportRecordsin interfaceIExporter- Parameters:
aProvider- The provider for all records. May not benull.aOS- The output stream to write to. Will be closed automatically in any case. May not benull.- Returns:
ESuccess.SUCCESSif at lease one record was provided and saving was successful.
-