Class DefaultCMSSyncSearchRestrictionService

java.lang.Object
de.hybris.platform.cms2.servicelayer.services.impl.DefaultCMSSyncSearchRestrictionService
All Implemented Interfaces:
CMSSyncSearchRestrictionService

public class DefaultCMSSyncSearchRestrictionService extends Object implements CMSSyncSearchRestrictionService
Default implementation of SearchRestriction of synchronization service which is used to create SearchRestriction for CMS_SYNC_USER_ID
  • Constructor Details

    • DefaultCMSSyncSearchRestrictionService

      public DefaultCMSSyncSearchRestrictionService(TypeService typeService, UserService userService, ModelService modelService, FlexibleSearchService flexibleSearchService)
      Class constructor to set dependency service
      Parameters:
      flexibleSearchService - - the flexible search service
      modelService - - the user service
      typeService - - the type service
      userService - - the user service
  • Method Details

    • createCmsSyncSearchRestriction

      public SearchRestrictionModel createCmsSyncSearchRestriction(String restrictionCode, Class<?> restrictedTypeClass, String query)
      Creates and saves a search restriction with the given data.
      Specified by:
      createCmsSyncSearchRestriction in interface CMSSyncSearchRestrictionService
      Parameters:
      restrictionCode - The code used to identify the search restriction to create
      restrictedTypeClass - The type that will be restricted by this search restriction
      query - The query used to perform the search restriction
      Returns:
      The new created SearchRestrictionModel
    • getSyncPrincipal

      protected UserModel getSyncPrincipal()
      Gets the principal in charge of executing synchronization jobs. If the user is not found this method creates and saves the principal.
      Returns:
      the user in charge of executing synchronization jobs.
    • getSearchRestrictionByCode

      protected List<SearchRestrictionModel> getSearchRestrictionByCode(String restrictionCode)
      Gets the SearchRestriction by code
      Parameters:
      restrictionCode - - code of SearchRestriction
      Returns:
      the collection of SearchRestriction
    • getFlexibleSearchService

      protected FlexibleSearchService getFlexibleSearchService()
    • getModelService

      protected ModelService getModelService()
    • getUserService

      protected UserService getUserService()
    • getTypeService

      protected TypeService getTypeService()