public class BMECatWriter
extends java.lang.Object
BMECatWriter is an interface to easy specify an BMECatExport. The mandatory informations have to be
specified in the constructor.
If you want to customize the export via the USER_DEFINED_EXTENSIONS you can add own
XMLTagWriter to the UserDefinedExtensionsTagWriter provided by the methods:
getHeaderUserDefinedExtensionsTagWriter()getArticleUserDefinedExtensionsTagWriter()getCatalogStructureUserDefinedExtensionsTagWriter()BMECatTagWriter
Here is an example:
final UserDefinedExtensionsTagWriter articleUdxTagWriter = bmeCatTagWriter.getArticleUserDefinedExtensionsTagWriter();
articleUdxTagWriter.addSubTagWriter(new SimpleTagWriter(articleUdxTagWriter, "UDX.HYBRIS.PK")
{
protected void writeContent(final XMLOutputter xmlOut, final Object object) throws IOException
{
final Product p = (Product) object;
xmlOut.setLineBreak(LineBreak.NONE);
xmlOut.pcdata(p.getPK().toString());
}
});
You can also add, remove or replace any XMLTagWriter via the addSubTagWriter-methods of
XMLTagWriter.| Modifier and Type | Class and Description |
|---|---|
protected class |
BMECatWriter.MyBMECatTagWriter |
static interface |
BMECatWriter.RangedItemProvider
An interface to provide items in a range.
|
protected static class |
BMECatWriter.SessionSettings |
| Constructor and Description |
|---|
BMECatWriter(CatalogVersion catVersion,
EnumerationValue transactionMode,
java.util.Collection classificationSystemVersions,
Language exportLang,
java.util.Map hybris2bmecatMediaMap,
Media exportedMedias,
java.util.Map priceMapping,
boolean udpNet,
java.util.Date refDate,
Customer refCustomer,
Currency exportCurrency,
boolean ignoreErrors,
boolean suppressEmptyCategories,
boolean suppressProductsWithoutPrices,
java.lang.String classificationNumberFormat)
Constructs an
BMECatWriter. |
| Modifier and Type | Method and Description |
|---|---|
protected BMECatWriter.SessionSettings |
changeSessionSettings(JaloSession session) |
protected XMLOutputter |
createXMLOutputter(java.io.Writer writer) |
protected void |
debug(java.lang.String message) |
protected void |
error(java.lang.String message) |
boolean |
errorsOccured() |
BMECatTagWriter |
getBMECatTagWriter() |
BMECatWriter.RangedItemProvider |
getCategoriesProvider() |
CatalogVersion |
getCatVersion() |
java.lang.String |
getClassificationNumberFormat() |
java.util.Collection |
getClassificationSystemVersions() |
int |
getCurrentItemsCount() |
Currency |
getExportCurrency() |
Language |
getExportLang() |
java.util.Map |
getHybris2bmecatMediaMap() |
java.util.Map |
getPriceMapping() |
BMECatWriter.RangedItemProvider |
getProductsProvider() |
Customer |
getReferenceCustomer() |
java.util.Date |
getReferenceDate() |
int |
getTotalItemsCount() |
EnumerationValue |
getTransactionMode() |
boolean |
ignoreErrors() |
protected void |
info(java.lang.String message) |
protected boolean |
isDebugEnabled() |
protected boolean |
isErrorEnabled() |
protected boolean |
isInfoEnabled() |
boolean |
isUDPNet() |
protected boolean |
isWarnEnabled() |
void |
setCategoriesProvider(BMECatWriter.RangedItemProvider categoriesProvider)
Here you can specify the categories that you want to export.
|
void |
setProductsProvider(BMECatWriter.RangedItemProvider productsProvider)
Here you can specify the products that you want to export.
|
boolean |
suppressEmptyCategories() |
boolean |
suppressProductsWithoutPrices() |
protected void |
warn(java.lang.String message) |
void |
write(java.io.Writer writer)
Writes a BMECat catalog to the given
Writer. |
public BMECatWriter(CatalogVersion catVersion, EnumerationValue transactionMode, java.util.Collection classificationSystemVersions, Language exportLang, java.util.Map hybris2bmecatMediaMap, Media exportedMedias, java.util.Map priceMapping, boolean udpNet, java.util.Date refDate, Customer refCustomer, Currency exportCurrency, boolean ignoreErrors, boolean suppressEmptyCategories, boolean suppressProductsWithoutPrices, java.lang.String classificationNumberFormat)
BMECatWriter.catVersion - CatalogVersion that should be exportedtransactionMode - the BMECat mode that should be exportedclassificationSystemVersions - a Collection of ClassificationSystemVersions that should be exportedexportLang - the Language of the BMECat exportprotected boolean isInfoEnabled()
protected boolean isDebugEnabled()
protected boolean isWarnEnabled()
protected boolean isErrorEnabled()
protected void info(java.lang.String message)
protected void debug(java.lang.String message)
protected void warn(java.lang.String message)
protected void error(java.lang.String message)
public java.lang.String getClassificationNumberFormat()
public boolean suppressEmptyCategories()
public boolean suppressProductsWithoutPrices()
public Customer getReferenceCustomer()
public boolean isUDPNet()
public boolean ignoreErrors()
public Currency getExportCurrency()
public boolean errorsOccured()
protected XMLOutputter createXMLOutputter(java.io.Writer writer)
throws java.lang.IllegalStateException,
java.lang.IllegalArgumentException,
java.io.IOException
java.lang.IllegalStateExceptionjava.lang.IllegalArgumentExceptionjava.io.IOExceptionpublic java.util.Date getReferenceDate()
protected BMECatWriter.SessionSettings changeSessionSettings(JaloSession session)
public void write(java.io.Writer writer)
throws java.io.IOException
Writer.writer - the Writer the export should be written tojava.io.IOExceptionpublic int getTotalItemsCount()
public int getCurrentItemsCount()
public BMECatTagWriter getBMECatTagWriter()
BMECatTagWriter from there you have access to all subwriterspublic BMECatWriter.RangedItemProvider getCategoriesProvider()
null if not setpublic void setCategoriesProvider(BMECatWriter.RangedItemProvider categoriesProvider)
RangedItemProvider here, all categories of the selected CatalogVersion will be exported.categoriesProvider - the RangedItemProvider for the categories to exportpublic BMECatWriter.RangedItemProvider getProductsProvider()
null if not setpublic void setProductsProvider(BMECatWriter.RangedItemProvider productsProvider)
RangedItemProvider
here, all products of the selected CatalogVersion will be exported.productsProvider - the RangedItemProvider for the products to exportpublic CatalogVersion getCatVersion()
public java.util.Collection getClassificationSystemVersions()
public Language getExportLang()
public EnumerationValue getTransactionMode()
public java.util.Map getHybris2bmecatMediaMap()
public java.util.Map getPriceMapping()
Copyright © 2018 SAP SE. All Rights Reserved.