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 Summary
ConstructorsConstructorDescriptionDefaultCMSSyncSearchRestrictionService(TypeService typeService, UserService userService, ModelService modelService, FlexibleSearchService flexibleSearchService) Class constructor to set dependency service -
Method Summary
Modifier and TypeMethodDescriptioncreateCmsSyncSearchRestriction(String restrictionCode, Class<?> restrictedTypeClass, String query) Creates and saves a search restriction with the given data.protected FlexibleSearchServiceprotected ModelServiceprotected List<SearchRestrictionModel>getSearchRestrictionByCode(String restrictionCode) Gets the SearchRestriction by codeprotected UserModelGets the principal in charge of executing synchronization jobs.protected TypeServiceprotected UserService
-
Constructor Details
-
DefaultCMSSyncSearchRestrictionService
public DefaultCMSSyncSearchRestrictionService(TypeService typeService, UserService userService, ModelService modelService, FlexibleSearchService flexibleSearchService) Class constructor to set dependency service- Parameters:
flexibleSearchService- - the flexible search servicemodelService- - the user servicetypeService- - the type serviceuserService- - 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:
createCmsSyncSearchRestrictionin interfaceCMSSyncSearchRestrictionService- Parameters:
restrictionCode- The code used to identify the search restriction to createrestrictedTypeClass- The type that will be restricted by this search restrictionquery- The query used to perform the search restriction- Returns:
- The new created SearchRestrictionModel
-
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
Gets the SearchRestriction by code- Parameters:
restrictionCode- - code of SearchRestriction- Returns:
- the collection of SearchRestriction
-
getFlexibleSearchService
-
getModelService
-
getUserService
-
getTypeService
-