com.ibm.commerce.pagelayout.widget.management

Class WidgetManagementService

  • java.lang.Object
    • com.ibm.commerce.pagelayout.widget.management.WidgetManagementService


  • public class WidgetManagementService
    extends java.lang.Object
    This class provides encapsulates the calls to the widget manager that is required to manage the persistence and retrieval operation of the widget. Each of its methods delegates to the widget manager identified for the widget. The widget manager is resolved based on the either of the following information in the widget:
    • Widget Definition Unique ID
    • Widget Definition Identifier and Store ID
    • The unique ID of the widget itself.
    If the widget definition used in the widget does not have a widget manager defined, then each of the service methods performs a no-operation.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright field.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void create(com.ibm.commerce.pagelayout.facade.datatypes.LayoutType layout, com.ibm.commerce.pagelayout.facade.datatypes.WidgetType widget)
      This method validates and creates the widget information specified in the widget object.
      void createExtendedData(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 widgetSDO)
      This method validates and creates the widget extended data specified in the extended data object.
      void delete(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)
      This method validates and deletes the widget information specified in the widget object.
      void deleteExtendedData(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 widgetSDO)
      This method validates and deletes the widget extended data specified in the extended data object.
      static WidgetManagementService getInstance()
      Returns the sole instance of this class.
      void retrieve(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.Object... parameters)
      This method populates the widget object provided during a GetLayout service execution.
      void retrieve(com.ibm.commerce.pagelayout.facade.datatypes.PageDesignType pageDesign, com.ibm.commerce.pagelayout.facade.datatypes.WidgetType widget, java.lang.Object... parameters)
      This method populates the widget object provided during a GetPageDesign service execution.
      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 method populates extended data of the widget object during a GetLayout service execution.
      void undo(com.ibm.commerce.foundation.internal.server.services.changehistory.beans.TaskGroupChangeHistoryDataSet tgchDataSet, com.ibm.commerce.pagelayout.facade.datatypes.WidgetType widget, LayoutManagementResourceManager layoutResourceManager)
      Undo changes to the widget
      void update(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)
      This method validates and updates the widget information specified in the widget object.
      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 widgetSDO)
      This method validates and updates the widget extended data specified in the extended data object.
      • Methods inherited from class java.lang.Object

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

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright field.
        See Also:
        Constant Field Values
    • Method Detail

      • getInstance

        public static WidgetManagementService getInstance()
        Returns the sole instance of this class.
        Returns:
        The WidgetManagementService instance.
      • create

        public void create(com.ibm.commerce.pagelayout.facade.datatypes.LayoutType layout,
                           com.ibm.commerce.pagelayout.facade.datatypes.WidgetType widget)
                    throws LayoutException
        This method validates and creates the widget information specified in the widget object.
        Parameters:
        layout - The layout to which the widget is being added.
        widget - The widget that is being added.
        Throws:
        LayoutException - This exception is thrown in the following conditions:
        • When the widget definition cannot be resolved from the widget.
        • When the widget manager indicates validation errors.
        • When the widget manager indicates errors during creation.
      • createExtendedData

        public void createExtendedData(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 widgetSDO)
                                throws LayoutException
        This method validates and creates the widget extended data specified in the extended data object.
        Parameters:
        layout - The layout to which the widget is being added.
        widget - The widget that is being worked on.
        extData - The extended data that is being added.
        widgetSDO - The physical data object object of the widget.
        Throws:
        LayoutException - This exception is thrown in the following conditions:
        • When the widget definition cannot be resolved from the widget.
        • When the widget manager indicates validation errors.
        • When the widget manager indicates errors during creation.
      • update

        public void update(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)
                    throws LayoutException
        This method validates and updates the widget information specified in the widget object.
        Parameters:
        layout - The layout where the widget is being updated.
        widget - The widget that is being updated.
        widgetSDO - The physical data object object of the widget.
        Throws:
        LayoutException - This exception is thrown in the following conditions:
        • When the widget definition cannot be resolved from the widget. The widget definition is resolved based on either of the following:
          • The widget definition unique ID
          • The widget definition identifier and store ID
        • When the widget manager indicates validation errors.
        • When the widget manager indicates errors during update.
      • 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 widgetSDO)
                                throws LayoutException
        This method validates and updates the widget extended data specified in the extended data object.
        Parameters:
        layout - The layout where the widget is being updated.
        widget - The widget where the extended data is being updated.
        extData - The extended data that is being updated.
        widgetSDO - The physical data object object of the widget.
        Throws:
        LayoutException - This exception is thrown in the following conditions:
        • When the widget definition cannot be resolved from the widget. The widget definition is resolved based on either of the following:
          • The widget definition unique ID
          • The widget definition identifier and store ID
        • When the widget manager indicates validation errors.
        • When the widget manager indicates errors during update.
      • delete

        public void delete(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)
                    throws LayoutException
        This method validates and deletes the widget information specified in the widget object.
        Parameters:
        layout - The layout from which the widget is being deleted.
        widget - The widget that is being deleted.
        widgetSDO - The physical data object object of the widget.
        Throws:
        LayoutException - This exception is thrown in the following conditions:
        • When the widget definition cannot be resolved from the widget. The widget definition is resolved based on either of the following:
          • The widget definition unique ID
          • The widget definition identifier and store ID.
          • The unique ID of the widget.
        • When the widget manager indicates validation errors.
        • When the widget manager indicates errors during deletion.
      • deleteExtendedData

        public void deleteExtendedData(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 widgetSDO)
                                throws LayoutException
        This method validates and deletes the widget extended data specified in the extended data object.
        Parameters:
        layout - The layout where the widget is being updated.
        widget - The widget where the extended data is being updated.
        extData - The extended data that is being deleted.
        widgetSDO - The physical data object object of the widget.
        Throws:
        LayoutException - This exception is thrown in the following conditions:
        • When the widget definition cannot be resolved from the widget. The widget definition is resolved based on either of the following:
          • The widget definition unique ID
          • The widget definition identifier and store ID.
          • The unique ID of the widget.
        • When the widget manager indicates validation errors.
        • When the widget manager indicates errors during deletion.
      • undo

        public void undo(com.ibm.commerce.foundation.internal.server.services.changehistory.beans.TaskGroupChangeHistoryDataSet tgchDataSet,
                         com.ibm.commerce.pagelayout.facade.datatypes.WidgetType widget,
                         LayoutManagementResourceManager layoutResourceManager)
                  throws LayoutException
        Undo changes to the widget
        Parameters:
        tgchDataSet - The change history record
        widget - The widget
        layoutResourceManager - The Layout Resource Manager
        Throws:
        LayoutException - If there is an error. This should be raised if all undo actions performed by the underlying infrastructure should be rolled back.
      • retrieve

        public void retrieve(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.Object... parameters)
                      throws LayoutException
        This method populates the widget object provided during a GetLayout service execution.
        Parameters:
        layout - The layout object to which the widget belongs to.
        widget - The widget object to populate
        widgetSDO - The physical data object object of the widget.
        parameters - These are additional parameters to be passed to the widget manager.
        Throws:
        LayoutException - This exception is thrown in the following conditions:
        • When the widget definition cannot be resolved from the widget.
        • When the widget manager indicates errors during retrieval.
      • 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 method populates extended data of the widget object during a GetLayout service execution.
        Parameters:
        layout - The layout object to which the widget belongs to.
        widget - The widget object to populate extended data.
        widgetSDO - The physical data object object of the widget.
        storePath - The store path of the request.
        languageIds - The requested language ids.
        criteria - The selection criteria of the request.
        parameters - These are additional parameters to be passed to the widget manager.
        Throws:
        LayoutException - This exception is thrown in the following conditions:
        • When the widget definition cannot be resolved from the widget.
        • When the widget manager indicates errors during retrieval.
      • retrieve

        public void retrieve(com.ibm.commerce.pagelayout.facade.datatypes.PageDesignType pageDesign,
                             com.ibm.commerce.pagelayout.facade.datatypes.WidgetType widget,
                             java.lang.Object... parameters)
                      throws PageDesignException
        This method populates the widget object provided during a GetPageDesign service execution.
        Parameters:
        pageDesign - The layout object to which the widget belongs to.
        widget - The widget object to populate
        parameters - These are additional parameters to be passed to the widget manager.
        Throws:
        PageDesignException - This exception is thrown in the following conditions:
        • When the widget definition cannot be resolved from the widget.
        • When the widget manager indicates errors during retrieval.