定义 IMPEX 订单的 Hybris?

Hybris where IMPEX order is defined?

我想知道在哪里可以看到定义的 impex 导入顺序,我看到每个扩展都有它自己的 extensionNameSystemSetup.java 在那里我可以看到一些方法,例如:

@SystemSetup(type = SystemSetup.Type.PROJECT, process = SystemSetup.Process.ALL)
public void createProjectData(final SystemSetupContext context)
{
    final List<ImportData> importData = new ArrayList<ImportData>();

    final ImportData electronicsImportData = new ImportData();
    electronicsImportData.setProductCatalogName(ELECTRONICS);
    electronicsImportData.setContentCatalogNames(Arrays.asList(ELECTRONICS));
    electronicsImportData.setStoreNames(Arrays.asList(ELECTRONICS));
    importData.add(electronicsImportData);

    getCoreDataImportService().execute(this, context, importData);
    getEventService().publishEvent(new CoreDataImportedEvent(context, importData));

    getSampleDataImportService().execute(this, context, importData);
    getEventService().publishEvent(new SampleDataImportedEvent(context, importData));
}

但是我看不到 impex 的确切顺序在哪里定义。在初始化期间,Hybris 如何知道它必须在导入产品价格之前导入产品?

商业服务扩展中有服务 --> 抽象 class AbstractDataImportService。 此 class 再次由 SampleDataImportService 和 CoreDataImportService 服务扩展。

SampleDataImportService 负责执行基于localextension.xml 的选定商店扩展(如电子、powertools)的示例数据。 并在此 class 中维护执行层次结构。

代码片段如下。

@Override
protected void importProductCatalog(final String extensionName, final String productCatalogName)
{
    // Load Units
    getSetupImpexService().importImpexFile(
            String.format("/%s/import/sampledata/productCatalogs/%sProductCatalog/classifications-units.impex", extensionName,
                    productCatalogName), false);

    // Load Categories
    getSetupImpexService().importImpexFile(
            String.format("/%s/import/sampledata/productCatalogs/%sProductCatalog/categories.impex", extensionName,
                    productCatalogName), false);

    getSetupImpexService().importImpexFile(
            String.format("/%s/import/sampledata/productCatalogs/%sProductCatalog/categories-classifications.impex",
                    extensionName, productCatalogName), false);

    // Load Suppliers
    getSetupImpexService().importImpexFile(
            String.format("/%s/import/sampledata/productCatalogs/%sProductCatalog/suppliers.impex", extensionName,
                    productCatalogName), false);
    getSetupImpexService().importImpexFile(
            String.format("/%s/import/sampledata/productCatalogs/%sProductCatalog/suppliers-media.impex", extensionName,
                    productCatalogName), false);

    // Load medias for Categories as Suppliers loads some new Categories
    getSetupImpexService().importImpexFile(
            String.format("/%s/import/sampledata/productCatalogs/%sProductCatalog/categories-media.impex", extensionName,
                    productCatalogName), false);

    // Load Products
    getSetupImpexService().importImpexFile(
            String.format("/%s/import/sampledata/productCatalogs/%sProductCatalog/products.impex", extensionName,
                    productCatalogName), false);
    getSetupImpexService().importImpexFile(
            String.format("/%s/import/sampledata/productCatalogs/%sProductCatalog/products-media.impex", extensionName,
                    productCatalogName), false);
    getSetupImpexService().importImpexFile(
            String.format("/%s/import/sampledata/productCatalogs/%sProductCatalog/products-classifications.impex", extensionName,
                    productCatalogName), false);

    // Load Products Relations
    getSetupImpexService().importImpexFile(
            String.format("/%s/import/sampledata/productCatalogs/%sProductCatalog/products-relations.impex", extensionName,
                    productCatalogName), false);

    // Load Products Fixes
    getSetupImpexService().importImpexFile(
            String.format("/%s/import/sampledata/productCatalogs/%sProductCatalog/products-fixup.impex", extensionName,
                    productCatalogName), false);

    // Load Prices
    getSetupImpexService().importImpexFile(
            String.format("/%s/import/sampledata/productCatalogs/%sProductCatalog/products-prices.impex", extensionName,
                    productCatalogName), false);

    // Load Stock Levels
    getSetupImpexService().importImpexFile(
            String.format("/%s/import/sampledata/productCatalogs/%sProductCatalog/products-stocklevels.impex", extensionName,
                    productCatalogName), false);
    getSetupImpexService().importImpexFile(
            String.format("/%s/import/sampledata/productCatalogs/%sProductCatalog/products-pos-stocklevels.impex", extensionName,
                    productCatalogName), false);

    // Load Taxes
    getSetupImpexService().importImpexFile(
            String.format("/%s/import/sampledata/productCatalogs/%sProductCatalog/products-tax.impex", extensionName,
                    productCatalogName), false);

    // Load Multi-Dimensial Products
    importMultiDProductCatalog(extensionName, productCatalogName);

}