Class DefaultCMSSyncSearchRestrictionService

  • All Implemented Interfaces:
    CMSSyncSearchRestrictionService

    public class DefaultCMSSyncSearchRestrictionService
    extends java.lang.Object
    implements CMSSyncSearchRestrictionService
    Default implementation of SearchRestriction of synchronization service which is used to create SearchRestriction for CMS_SYNC_USER_ID
    • Method Detail

      • createCmsSyncSearchRestriction

        public SearchRestrictionModel createCmsSyncSearchRestriction​(java.lang.String restrictionCode,
                                                                     java.lang.Class<?> restrictedTypeClass,
                                                                     java.lang.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 java.util.List<SearchRestrictionModel> getSearchRestrictionByCode​(java.lang.String restrictionCode)
        Gets the SearchRestriction by code
        Parameters:
        restrictionCode - - code of SearchRestriction
        Returns:
        the collection of SearchRestriction
      • getModelService

        protected ModelService getModelService()
      • getUserService

        protected UserService getUserService()
      • getTypeService

        protected TypeService getTypeService()