com.ibm.commerce.pagelayout.widget.management.impl

Class DefaultContentWidgetManager

  • All Implemented Interfaces:
    WidgetManager
    Direct Known Subclasses:
    DefaultContentAndWebActivityWidgetManager, ProductListingWidgetManager


    public class DefaultContentWidgetManager
    extends MarketingWidgetManager

    This class provides methods to help create, update, delete and retrieve marketing default content based on the page composer widgets using them.

    Each widget that requires marketing default content can make use of this superclass to create/read/update/delete default marketing content by referencing the associated content through the use of extended data from the widget.

    The following widgets will be using a generated e-marketing spot as well as default content:

    • Product recommendation widget
    • Category recommendation widget
    • Content recommendation widget
    • Rotating content widget
    • Product listing widget
    • Rich text widget

    The e-marketing spot associated with the widget using default marketing content will managed by the default widget manager superclass.

    See Also:
    DefaultWidgetManager, ContentRecommendationWidgetManager, RotatingContentWidgetManager, ProductListingWidgetManager
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void createExtendedData(com.ibm.commerce.pagelayout.facade.datatypes.LayoutType aLayout, com.ibm.commerce.pagelayout.facade.datatypes.WidgetType aWidget, com.ibm.commerce.pagelayout.facade.datatypes.ExtendedDataType aExtData, com.ibm.commerce.pagelayout.facade.server.entity.datatypes.PageLayoutWidget aWidgetSDO)
      This method will be invoked whenever a create action is performed within a widget.
      void deleteExtendedData(com.ibm.commerce.pagelayout.facade.datatypes.LayoutType aLayout, com.ibm.commerce.pagelayout.facade.datatypes.WidgetType aWidget, com.ibm.commerce.pagelayout.facade.datatypes.ExtendedDataType aExtData, com.ibm.commerce.pagelayout.facade.server.entity.datatypes.PageLayoutWidget aWidgetSDO)
      This method will be invoked whenever a delete action is performed within a widget.
      void retrieveExtendedData(com.ibm.commerce.pagelayout.facade.datatypes.LayoutType layout, com.ibm.commerce.pagelayout.facade.datatypes.WidgetType widget, com.ibm.commerce.pagelayout.facade.server.entity.datatypes.PageLayoutWidget widgetSDO, java.lang.Integer[] storePath, java.lang.Integer[] languageIds, SelectionCriteria criteria, java.lang.Object... parameters)
      This methods retrieves the URL links for the URL link widget.
      void updateExtendedData(com.ibm.commerce.pagelayout.facade.datatypes.LayoutType layout, com.ibm.commerce.pagelayout.facade.datatypes.WidgetType widget, com.ibm.commerce.pagelayout.facade.datatypes.ExtendedDataType extData, com.ibm.commerce.pagelayout.facade.server.entity.datatypes.PageLayoutWidget aWidgetSDO)
      This method will be invoked whenever an update action is performed within a widget.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultContentWidgetManager

        public DefaultContentWidgetManager()
    • Method Detail

      • createExtendedData

        public void createExtendedData(com.ibm.commerce.pagelayout.facade.datatypes.LayoutType aLayout,
                                       com.ibm.commerce.pagelayout.facade.datatypes.WidgetType aWidget,
                                       com.ibm.commerce.pagelayout.facade.datatypes.ExtendedDataType aExtData,
                                       com.ibm.commerce.pagelayout.facade.server.entity.datatypes.PageLayoutWidget aWidgetSDO)
                                throws LayoutException

        This method will be invoked whenever a create action is performed within a widget. The widget logical object will be passed in from the request, along with it's noun part ExtendedDataType.

        The noun part will be checked to see if it has any references to marketing default content creation, meaning the request from the client has requested that marketing default content be associated with this widget.

        If the widget needs to manage associated marketing default content, the noun part ExtendedDataType passed in will contain a data type of IBM_DefaultMarketingContent. See ExtendedDataType.getDataType() .

        A marketing web service call will be made to associate the default marketing content based on the information provided, namely the e-marketing spot associated with the widget, the default content type, the internal identifier of the default content to be associated, the sequence of the default content (optional) as well as business context information (store, language, workspaces).

        In summary a widget that needs to create an association to itself and marketing default content will need to pass the following information in

        Set the data type in the extended data logical object in ExtendedDataType.getDataType()

        • ExtendedDataType.setDataType()
          A flag indicating that the type extended data for this widget that needs to be managed is marketing default content.
          Ex. ExtendedDataType.getDataType()=IBM_DefaultMarketingContent

        In the list of name-value pair attributes in ExtendedDataType.getAttributes() , which is a list of AttributesType representing a name-value pair.

        • contentType:
          The type of default content being managed. Accepted values are 'CatalogGroup', 'CatalogEntry' or 'MarketingContent' corresponding to the CONTENTTYPE column of the DMEMSPOTDEF table. However, no validation will be performed against this.
          Ex. contentType=MarketingContent
        • contentId:
          The identifier of the default content. This corresponds to the CONTENT column of the DMEMSPOTDEF table.
          Ex. contentId=90001
        • sequence:
          The display sequence of the default content. This corresponds to the SEQUENCE column of the DMEMSPOTDEF table.
          Ex. sequence=3
        Specified by:
        createExtendedData in interface WidgetManager
        Overrides:
        createExtendedData in class MarketingWidgetManager
        Parameters:
        aLayout - The layout object to which the widget belongs to.
        aWidget - The widget where the extended data is being created.
        aExtData - The extended data being created from the page layout.
        aWidgetSDO - The physical data object object of the widget.
        Throws:
        LayoutException - This exception will be thrown if there was an error creating the extended data.
        See Also:
        DefaultWidgetManager.createExtendedData(LayoutType, WidgetType, ExtendedDataType, PageLayoutWidget), com.ibm.commerce.pagelayout.facade.PageLayoutFacadeConstants.WIDGET_EXT_DATA_TYPE_MARKETING_DEFAULT_CONTENT, LayoutType, WidgetType, ExtendedDataType, ExtendedDataType.getDataType(), ExtendedDataType.getAttributes()
      • updateExtendedData

        public void updateExtendedData(com.ibm.commerce.pagelayout.facade.datatypes.LayoutType layout,
                                       com.ibm.commerce.pagelayout.facade.datatypes.WidgetType widget,
                                       com.ibm.commerce.pagelayout.facade.datatypes.ExtendedDataType extData,
                                       com.ibm.commerce.pagelayout.facade.server.entity.datatypes.PageLayoutWidget aWidgetSDO)
                                throws LayoutException

        This method will be invoked whenever an update action is performed within a widget. The widget logical object will be passed in from the request, along with it's noun part ExtendedDataType.

        The noun part will be checked to see if it has any references to marketing default content creation, meaning the request from the client has requested that marketing default content be associated with this widget.

        If the widget needs to manage associated marketing default content, the noun part ExtendedDataType passed in will contain a data type of IBM_DefaultMarketingContent. See ExtendedDataType.getDataType() .

        A marketing web service call will be made to update the associated default marketing content based on the information provided, namely the e-marketing spot associated with the widget, the default content type, the internal identifier of the default content to be associated, the sequence of the default content (optional) as well as business context information (store, language, workspaces).

        In summary a widget that needs to update an association to itself and marketing default content will need to pass the following information in

        Set the data type in the extended data logical object in ExtendedDataType.getDataType()

        • ExtendedDataType.setDataType()
          A flag indicating that the type extended data for this widget that needs to be managed is marketing default content.
          Ex. ExtendedDataType.getDataType()=IBM_DefaultMarketingContent

        In the list of name-value pair attributes in ExtendedDataType.getAttributes() , which is a list of AttributesType representing a name-value pair.

        • contentType:
          The type of default content being managed. Accepted values are 'CatalogGroup', 'CatalogEntry' or 'MarketingContent' corresponding to the CONTENTTYPE column of the DMEMSPOTDEF table. However, no validation will be performed against this.
          Ex. contentType=MarketingContent
        • uniqueId:
          The identifier of the default content definition. This corresponds to the DMEMSPOTDEF_ID column of the DMEMSPOTDEF table.
          Ex. uniqueId=50001
        • contentId:
          The identifier of the default content. This corresponds to the CONTENT column of the DMEMSPOTDEF table.
          Ex. contentId=90001
        • sequence:
          The display sequence of the default content. This corresponds to the SEQUENCE column of the DMEMSPOTDEF table.
          Ex. sequence=3
        Specified by:
        updateExtendedData in interface WidgetManager
        Overrides:
        updateExtendedData in class MarketingWidgetManager
        Parameters:
        aLayout - The layout object to which the widget belongs to.
        aWidget - The widget where the extended data is being created.
        aExtData - The extended data being created from the page layout.
        aWidgetSDO - The physical data object object of the widget.
        Throws:
        LayoutException - This exception will be thrown if there was an error updating the extended data.
        See Also:
        DefaultWidgetManager.createExtendedData(LayoutType, WidgetType, ExtendedDataType, PageLayoutWidget), com.ibm.commerce.pagelayout.facade.PageLayoutFacadeConstants.WIDGET_EXT_DATA_TYPE_MARKETING_DEFAULT_CONTENT, LayoutType, WidgetType, ExtendedDataType, ExtendedDataType.getDataType(), ExtendedDataType.getAttributes()
      • deleteExtendedData

        public void deleteExtendedData(com.ibm.commerce.pagelayout.facade.datatypes.LayoutType aLayout,
                                       com.ibm.commerce.pagelayout.facade.datatypes.WidgetType aWidget,
                                       com.ibm.commerce.pagelayout.facade.datatypes.ExtendedDataType aExtData,
                                       com.ibm.commerce.pagelayout.facade.server.entity.datatypes.PageLayoutWidget aWidgetSDO)
                                throws LayoutException

        This method will be invoked whenever a delete action is performed within a widget. The widget logical object will be passed in from the request, along with it's noun part ExtendedDataType.

        The noun part will be checked to see if it has any references to marketing default content creation, meaning the request from the client has requested that marketing default content be associated with this widget.

        If the widget needs to manage associated marketing default content, the noun part ExtendedDataType passed in will contain a data type of IBM_DefaultMarketingContent. See ExtendedDataType.getDataType() .

        A marketing web service call will be made to delete the associated default marketing content based on the information provided, namely the e-marketing spot associated with the widget, the default content type, the internal identifier of the default content to be associated, the sequence of the default content (optional) as well as business context information (store, language, workspaces).

        In summary a widget that needs to create an association to itself and marketing default content will need to pass the following information in

        Set the data type in the extended data logical object in ExtendedDataType.getDataType()

        • ExtendedDataType.setDataType()
          A flag indicating that the type extended data for this widget that needs to be managed is marketing default content.
          Ex. ExtendedDataType.getDataType()=IBM_DefaultMarketingContent

        In the list of name-value pair attributes in ExtendedDataType.getAttributes() , which is a list of AttributesType representing a name-value pair.

        • contentId:
          The identifier of the default content. This corresponds to the CONTENT column of the DMEMSPOTDEF table.
          Ex. contentId=90001
        • uniqueId:
          The identifier of the default content definition. This corresponds to the DMEMSPOTDEF_ID column of the DMEMSPOTDEF table.
          Ex. uniqueId=50001
        Specified by:
        deleteExtendedData in interface WidgetManager
        Overrides:
        deleteExtendedData in class MarketingWidgetManager
        Parameters:
        aLayout - The layout object to which the widget belongs to.
        aWidget - The widget where the extended data is being deleted.
        aExtData - The extended data being deleted from the page layout.
        aWidgetSDO - The physical data object object of the widget.
        Throws:
        LayoutException - This exception will be thrown if there was an error deleting the extended data.
        See Also:
        DefaultWidgetManager.deleteExtendedData(LayoutType, WidgetType, ExtendedDataType, PageLayoutWidget)
      • retrieveExtendedData

        public void retrieveExtendedData(com.ibm.commerce.pagelayout.facade.datatypes.LayoutType layout,
                                         com.ibm.commerce.pagelayout.facade.datatypes.WidgetType widget,
                                         com.ibm.commerce.pagelayout.facade.server.entity.datatypes.PageLayoutWidget widgetSDO,
                                         java.lang.Integer[] storePath,
                                         java.lang.Integer[] languageIds,
                                         SelectionCriteria criteria,
                                         java.lang.Object... parameters)
                                  throws LayoutException
        This methods retrieves the URL links for the URL link widget.
        Specified by:
        retrieveExtendedData in interface WidgetManager
        Overrides:
        retrieveExtendedData in class MarketingWidgetManager
        Parameters:
        layout - The layout object to which the widget belongs to.
        widget - The widget object that needs to be populated.
        widgetSDO - The physical data object of the widget.
        storePath - The store path of the request.
        languageIds - The requested language ids.
        criteria - The selection criteria of the request.
        parameters - This list would contain the selection criteria object.
        Throws:
        LayoutException - This exception is thrown when error occurs while retrieving the URL links.