Document Properties
Kbid23568Q
Last Modified04-Feb-2020
Added to KB12-Oct-2012
Public AccessEveryone
StatusOnline
Doc TypeGuidelines, Concepts & Cookbooks
Product
  • ICM 7.6
  • ICM 7.7

Concept - Shared Products Changes (valid to 7.6)

1 Introduction

This document covers the concept to display and discard the changes of shared products. This functionality consists of specific Java classes, pipelets, pipelines and templates to display and discard shared product changes. This functionality is based on the Java extension framework. A developer can use the framework to extend the functionality.

The Changes tab displays the changes of shared products which were made by a user and also provide the ability to discard a particular change. To display the changes of different type a Java extension and extension points for each group (e.g., Standard Attributes, Custom Attributes, Product Cost Price, Product List Price etc.) are created.

E.g., the ProductBOStandardAttributeChangesExtensionImpl extension point is responsible to display and discard the changes of standard product attributes. This extension point has a unique group ID StandardAttribute to differentiate its attributes from other groups.

The Java extension combines changes of different groups and returns an iterator of all changes. This iterator is used to display shared product changes.

Similarly if a user selects different types of changes to discard the Java extension uses that changes iterator to split it into different groups and pass it to appropriate extension point to remove them.

2 References

Concept - Extension Points

Cookbook - Extension Points

Cookbook - Shared Products Changes (valid to 7.6)

3 Glossary

Extension point

Point in the code, which marks the place where an extension can plug in. Extension points exist for several code artifacts, like pipelines, templates,queries and others.

Extension

The code fragment that plugs into an extension point. Corresponds to the type of the extension point, e.g., an extension pipeline plugs into a pipeline extension point.

4 Implementation

4.1 Business Object Relations Diagram

The following diagram shows the relations between the involved business objects.

ProductsChangesRelationsDiagram

4.2 Implementation Artifacts

The following table shows all Java classes, pipelines and templates involved in shared product changed implementation.

BusinessObjectExtensionExtension interface which defines the extension ID and  two API methods
ProductBOChangesExtensionImplImplementation class for extension interface
ProductBOChangesExtensionFactoryExtension factory that will create the extension object

implementations.component

instances.component

Defining above factory instance using the component framework
BOChangesProviderAn interface that will be implemented by different extension points for several groups (e.g., Standard Attributes, Custom Attributes, Product Cost Price, Product List Price etc.)

e.g., ProductBOStandardAttributeChangesExtensionImpl,

ProductBOCustomAttributeChangesExtensionImpl etc.

An example of implementation classes for each group to get and remove shared product change

ProductBOChangesExtension.extension

ProductBOWarrantyChangesExtension.extension

ProductBOGiftChangesExtension.extension

for binding the different group of extension point
BOChangesDescriptorData container class that hold the data to display on template
ViewChannelSharedProductChanges.xmlPipeline that contains the logic to display and discard changes
ChannelSharedProductChanges.ismlTemplate to display the change

4.3 Implementation of Extension Points

Shared product changes functionality can be implemented using extension points. The connection between extension points and implementation classes is defined in files of type *.extension. In the previous section are mentioned 3 files:

  • ProductBOChangesExtension.extension
  • ProductBOWarrantyChangesExtension.extension
  • ProductBOGiftChangesExtension.extension

4.3.1 ProductBOChangesExtension

ProductBOChangesExtension.extension
<?xml version="1.0" encoding="UTF-8"?>
<extensionpoint:ExtensionPointModel xmlns:extensionpoint="http://www.intershop.de/extensionpoint/2011" name="ProductBOChangesExtension">
  <extensionBindings type="java" extensionPoint="com.intershop.component.foundation.capi.businessobject.BOChangesProvider-ProductChanges.AllChanges" extension="com.intershop.component.product.internal.ProductBOStandardAttributesBOChangesProviderImpl"/>
  <extensionBindings type="java" extensionPoint="com.intershop.component.foundation.capi.businessobject.BOChangesProvider-ProductChanges.AllChanges" extension="com.intershop.component.product.internal.ProductBOCustomAttributesBOChangesProviderImpl"/>
  <extensionBindings type="java" extensionPoint="com.intershop.component.foundation.capi.businessobject.BOChangesProvider-ProductChanges.AllChanges" extension="com.intershop.component.product.internal.ProductBOListPriceBOChangesProviderImpl"/>
  <extensionBindings type="java" extensionPoint="com.intershop.component.foundation.capi.businessobject.BOChangesProvider-ProductChanges.AllChanges" extension="com.intershop.component.product.internal.ProductBOCostPriceBOChangesProviderImpl"/>
  
  <extensionBindings type="java" extensionPoint="com.intershop.component.foundation.capi.businessobject.BOChangesProvider-ProductChanges.removeChanges" extension="com.intershop.component.product.internal.ProductBOStandardAttributesBOChangesProviderImpl"/>
  <extensionBindings type="java" extensionPoint="com.intershop.component.foundation.capi.businessobject.BOChangesProvider-ProductChanges.removeChanges" extension="com.intershop.component.product.internal.ProductBOCustomAttributesBOChangesProviderImpl"/>
  <extensionBindings type="java" extensionPoint="com.intershop.component.foundation.capi.businessobject.BOChangesProvider-ProductChanges.removeChanges" extension="com.intershop.component.product.internal.ProductBOListPriceBOChangesProviderImpl"/>
  <extensionBindings type="java" extensionPoint="com.intershop.component.foundation.capi.businessobject.BOChangesProvider-ProductChanges.removeChanges" extension="com.intershop.component.product.internal.ProductBOCostPriceBOChangesProviderImpl"/>
</extensionpoint:ExtensionPointModel>

The code block above shows ProductBOChangesExtension.extension file. Here are defined the extension points with name - ...BOChangesProvider-ProductChanges.AllChanges and  ...BOChangesProvider-ProductChanges.removeChanges connected to various implementation classes like ...ProductBOStandardAttributesBOChangesProviderImpl. The implementation of ProductBOChangesExtension extension is made in ProductBOChangesExtensionImpl.java class. The mentioned class ProductBOChangesExtensionFactory creates an instance of ProductBOChangesExtension by the method createExtension(ProductBO object). The implementation and instance of the factory class is defined in the files implementations.component and instance.component. An example for the use of ProductBOChangesExtension is the pipelet DiscardDerivedProductSelectedChanges in the ViewChannelSharedProductChanges-DiscardSelectedChanges pipeline.

4.3.2 ProductBOWarrantyChangesExtension

Displayed below is the code of ProductBOWarrantyChangesExtension.extension - 7.6 version.

ProductBOWarrantyChangesExtension - 7.6
<?xml version="1.0" encoding="UTF-8"?>
<extensionpoint:ExtensionPointModel xmlns:extensionpoint="http://www.intershop.de/extensionpoint/2011" name="ProductBOWarrantyChangesExtension">
  <extensionBindings type="java" extensionPoint="com.intershop.component.foundation.capi.businessobject.BOChangesProvider-ProductChanges.AllChanges" extension="com.intershop.component.warranty.internal.ProductBOWarrantyPriceBOChangesProviderImpl"/>
  <extensionBindings type="java" extensionPoint="com.intershop.component.foundation.capi.businessobject.BOChangesProvider-ProductChanges.AllChanges" extension="com.intershop.component.warranty.internal.ProductBOWarrantyEligibleBOChangesProviderImpl"/>
  <extensionBindings type="java" extensionPoint="com.intershop.component.foundation.capi.businessobject.BOChangesProvider-ProductChanges.removeChanges" extension="com.intershop.component.warranty.internal.ProductBOWarrantyPriceBOChangesProviderImpl"/>
  <extensionBindings type="java" extensionPoint="com.intershop.component.foundation.capi.businessobject.BOChangesProvider-ProductChanges.removeChanges" extension="com.intershop.component.warranty.internal.ProductBOWarrantyEligibleBOChangesProviderImpl"/>
</extensionpoint:ExtensionPointModel>

There is a difference between the extension files in versions 7.6 and 7.4.5. The name of the extension in version 7.4.5 is WarrantyBOChangesExtension, in 7.6 is ProductBOWarrantyChangesExtension. The extension implementation class name in 7.4.5 is WarrantyBOWarrantyPriceBOChangesProviderImpl, In 7.6 the name has been changed to ProductBOWarrantyPriceBOChangesProviderImpl.

ProductBOWarrantyChangesExtension - 7.4.5
<?xml version="1.0" encoding="UTF-8"?>
<extensionpoint:ExtensionPointModel xmlns:extensionpoint="http://www.intershop.de/extensionpoint/2011" name="WarrantyBOChangesExtension">
  <extensionBindings type="java" extensionPoint="com.intershop.component.foundation.capi.businessobject.BOChangesProvider-ProductChanges.AllChanges" extension="com.intershop.component.warranty.internal.WarrantyBOWarrantyPriceBOChangesProviderImpl"/>
  <extensionBindings type="java" extensionPoint="com.intershop.component.foundation.capi.businessobject.BOChangesProvider-ProductChanges.AllChanges" extension="com.intershop.component.warranty.internal.WarrantyBOWarrantyEligibleBOChangesProviderImpl"/>
  <extensionBindings type="java" extensionPoint="com.intershop.component.foundation.capi.businessobject.BOChangesProvider-ProductChanges.removeChanges" extension="com.intershop.component.warranty.internal.WarrantyBOWarrantyPriceBOChangesProviderImpl"/>
  <extensionBindings type="java" extensionPoint="com.intershop.component.foundation.capi.businessobject.BOChangesProvider-ProductChanges.removeChanges" extension="com.intershop.component.warranty.internal.WarrantyBOWarrantyEligibleBOChangesProviderImpl"/>
</extensionpoint:ExtensionPointModel>

The extension WarrantyBOChangesExtension is used in pipeline DiscardWarrantySelectedChanges, but since 7.4 version this pipelet is deprecated and DiscardDerivedProductSelectedChanges (used also with ProductBOChangesExtension) is used. In 7.4 DiscardWarrantySelectedChanges pipelet is executed in ViewChannelSharedProductChanges-DiscardSelectedChanges pipeline, but in newer versions this functionality has been removed.

4.3.3 ProductBOGiftChangesExtension

The following code block shows ProductBOGiftChangesExtension.extension file.

ProductBOGiftChangesExtension
<?xml version="1.0" encoding="UTF-8"?>
<extensionpoint:ExtensionPointModel xmlns:extensionpoint="http://www.intershop.de/extensionpoint/2011"
    name="ProductBOGiftChangesExtension">
  <extensionBindings type="java" extensionPoint="com.intershop.component.foundation.capi.businessobject.BOChangesProvider-ProductChanges.AllChanges"
      extension="com.intershop.component.gifting.internal.product.ProductBOGiftBOChangesProviderImpl"/>
  <extensionBindings type="java" extensionPoint="com.intershop.component.foundation.capi.businessobject.BOChangesProvider-ProductChanges.removeChanges"
      extension="com.intershop.component.gifting.internal.product.ProductBOGiftBOChangesProviderImpl"/>
</extensionpoint:ExtensionPointModel>

The implementation extension class for ...AllChanges and ...removeChanges extension points is ProductBOGiftBOChangesProviderImpl.

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets