public class OutboundServiceCsvUtils
extends java.lang.Object
| Constructor and Description |
|---|
OutboundServiceCsvUtils() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String[] |
convertListToCsv(java.util.List<java.util.Map<java.lang.String,java.lang.Object>> objList)
Converts a
List of Maps into CSV formatted data CSV header is populated using the keys from the first
Map in the List
|
java.lang.String[] |
convertMapToCsv(java.util.Map<java.lang.String,java.lang.Object> map)
Converts a single
Map into CSV formatted data. |
java.lang.String[] |
convertObjectToCsv(java.lang.Object obj)
Converts a single
Object into CSV formatted data. |
protected java.util.Map<java.lang.String,java.lang.Object> |
convertObjectToMap(java.lang.Object obj) |
void |
setDatePattern(java.lang.String datePattern)
The date pattern to use when converting Date objects to Strings in UTC timezone This value is read from a property
'datahubadapter.datahuboutbound.date.pattern'
|
protected java.lang.String |
toCsvValue(java.lang.Object obj) |
java.util.Map<java.lang.String,java.lang.Object> |
transmissionSafe(java.util.Map<java.lang.String,java.lang.Object> original)
Converts values of a map to be safe for a data transmission meaning the data will be consistently reproduced at
both ends of the communication.
|
public void setDatePattern(java.lang.String datePattern)
datePattern - the date patternpublic java.lang.String[] convertObjectToCsv(java.lang.Object obj)
Object into CSV formatted data.
The Object's property names are appended to the CSV header. The string value of the object's properties will be appended to the CSV body.
obj - the object to convert to CSV formatpublic java.lang.String[] convertMapToCsv(java.util.Map<java.lang.String,java.lang.Object> map)
Map into CSV formatted data.
The Map keys are used as values in the CSV header. The string value of Map.Entry values
will be used in the CSV body.
map - the map to convert into CSV formatted datapublic java.lang.String[] convertListToCsv(java.util.List<java.util.Map<java.lang.String,java.lang.Object>> objList)
List of Maps into CSV formatted data CSV header is populated using the keys from the first
Map in the List
Each Map in the List should contain the same keys
objList - the List of Maps to convert into CSV formatted datapublic java.util.Map<java.lang.String,java.lang.Object> transmissionSafe(java.util.Map<java.lang.String,java.lang.Object> original)
original - a map to make transmission safe.protected java.util.Map<java.lang.String,java.lang.Object> convertObjectToMap(java.lang.Object obj)
protected java.lang.String toCsvValue(java.lang.Object obj)
Copyright © 2018 SAP SE. All Rights Reserved.