Class DefaultMasterDetailSettingService

java.lang.Object
com.hybris.backoffice.masterdetail.impl.DefaultMasterDetailSettingService
All Implemented Interfaces:
MasterDetailService, Serializable

public class DefaultMasterDetailSettingService extends Object implements MasterDetailService, Serializable
This is a default implementation for master detail service interface
See Also:
  • Constructor Details

    • DefaultMasterDetailSettingService

      public DefaultMasterDetailSettingService()
  • Method Details

    • registerMaster

      public void registerMaster(MDMasterLogic masterLogic)
      Register a master view instance into MasterDetail settings service and render all registered detail views into master view
      Specified by:
      registerMaster in interface MasterDetailService
      Parameters:
      masterLogic - - the master view logic
    • registerDetail

      public void registerDetail(MDDetailLogic detailLogic)
      Register a detail view instance into MasterDetail settings service Please make sure SettingItem data of this detail view ready when registering
      Specified by:
      registerDetail in interface MasterDetailService
      Parameters:
      detailLogic - - the detail view logic
    • getDetails

      public List<MDDetailLogic> getDetails()
      Return all registered detail views
      Specified by:
      getDetails in interface MasterDetailService
    • reset

      public void reset()
      Clean all registered master view and detail views
      Specified by:
      reset in interface MasterDetailService
    • enableSave

      public void enableSave(boolean enabled)
      Make the MasterDetail setting view can be saved or not
      Specified by:
      enableSave in interface MasterDetailService
      Parameters:
      enabled - - is the save operation can be executed
    • saveDetail

      public boolean saveDetail(String id)
      Trigger save operation for a detail view
      Specified by:
      saveDetail in interface MasterDetailService
      Parameters:
      id - - id of the detail view
      Returns:
      true if save success, false if save failure
    • resetDetail

      public void resetDetail(String id)
      Reset a detail view
      Specified by:
      resetDetail in interface MasterDetailService
      Parameters:
      id - - id of the detail view
    • detailDataChanged

      public void detailDataChanged(SettingItem settingItem)
      Notify master view that data changed in a detail view
      Specified by:
      detailDataChanged in interface MasterDetailService
      Parameters:
      settingItem - - changed SettingItem data of the detail view
    • isDetailDataChanged

      public boolean isDetailDataChanged(String id)
      Check if data changed in detail view
      Specified by:
      isDetailDataChanged in interface MasterDetailService
      Parameters:
      id - - id of the detail view
      Returns:
      true if data changed or false if not
    • needRefreshUI

      public boolean needRefreshUI(String id)
      Check if need to refresh UI after save
      Specified by:
      needRefreshUI in interface MasterDetailService
      Parameters:
      id - - id of the detail view
      Returns:
      true if need to refresh UI after save or false if not