public class BMECatWriter extends 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,
Collection classificationSystemVersions,
Language exportLang,
Map hybris2bmecatMediaMap,
Media exportedMedias,
Map priceMapping,
boolean udpNet,
Date refDate,
Customer refCustomer,
Currency exportCurrency,
boolean ignoreErrors,
boolean suppressEmptyCategories,
boolean suppressProductsWithoutPrices,
String classificationNumberFormat)
Constructs an
BMECatWriter. |
public BMECatWriter(CatalogVersion catVersion, EnumerationValue transactionMode, Collection classificationSystemVersions, Language exportLang, Map hybris2bmecatMediaMap, Media exportedMedias, Map priceMapping, boolean udpNet, Date refDate, Customer refCustomer, Currency exportCurrency, boolean ignoreErrors, boolean suppressEmptyCategories, boolean suppressProductsWithoutPrices, 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(String message)
protected void debug(String message)
protected void warn(String message)
protected void error(String message)
public 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(Writer writer) throws IllegalStateException, IllegalArgumentException, IOException
public Date getReferenceDate()
protected BMECatWriter.SessionSettings changeSessionSettings(JaloSession session)
public void write(Writer writer) throws IOException
Writer.writer - the Writer the export should be written toIOExceptionpublic 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 Collection getClassificationSystemVersions()
public Language getExportLang()
public EnumerationValue getTransactionMode()
public Map getHybris2bmecatMediaMap()
public Map getPriceMapping()
Copyright © 2017 SAP SE. All Rights Reserved.