public class DefaultImpexConverter extends java.lang.Object implements ImpexConverter
Impex object.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_FIELD_SEPARATOR |
static java.lang.String |
DEFAULT_LINE_SEPARATOR |
static java.lang.String |
IMPEX_OPERATION_TYPE |
| Constructor and Description |
|---|
DefaultImpexConverter() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
areUniqueAttributesPopulated(java.util.Map<ImpexHeaderValue,java.lang.Object> row)
Returns true when all values indicated as unique have not empty value.
|
java.lang.String |
convert(Impex impex)
Generates impex script which contains impex header (for example INSERT_UPDATE
Product;code[unique=true];name[lang=en];) and multi-lines which represent impex's data.
|
protected java.lang.String |
getValue(java.lang.Object value)
Returns escaped string value.
|
protected java.lang.String |
prepareHeaderAttribute(ImpexHeaderValue headerAttribute)
Prepares single header value of impex.
|
protected java.lang.String |
prepareImpexHeader(ImpexForType impexForType)
Prepares first row of impex script for given type.
|
protected java.lang.String |
prepareImpexRows(ImpexForType impexForType)
Generates String which contains many lines represent rows for impex scripts.
|
public static final java.lang.String IMPEX_OPERATION_TYPE
public static final java.lang.String DEFAULT_FIELD_SEPARATOR
public static final java.lang.String DEFAULT_LINE_SEPARATOR
public java.lang.String convert(Impex impex)
ImpexConverterconvert in interface ImpexConverterimpex - protected java.lang.String prepareImpexRows(ImpexForType impexForType)
impexForType - ImpexForTypeprotected java.lang.String getValue(java.lang.Object value)
value - which should be converted to string and escaped if neededprotected boolean areUniqueAttributesPopulated(java.util.Map<ImpexHeaderValue,java.lang.Object> row)
row - maps contains ImpexHeaderValue as keys and Object as values.protected java.lang.String prepareImpexHeader(ImpexForType impexForType)
impexForType - ImpexForTypeprotected java.lang.String prepareHeaderAttribute(ImpexHeaderValue headerAttribute)
headerAttribute - ImpexHeaderValue consists of header name, language and indicator whether attribute is uniqueCopyright © 2018 SAP SE. All Rights Reserved.