Class DefaultConfigurationServiceLayerHelper
java.lang.Object
de.hybris.platform.cpq.productconfig.services.impl.DefaultConfigurationServiceLayerHelper
- All Implemented Interfaces:
ConfigurationServiceLayerHelper
public class DefaultConfigurationServiceLayerHelper
extends Object
implements ConfigurationServiceLayerHelper
default implementation of the
ConfigurationServiceLayerHelper-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intmax pages to processstatic final intitems per page -
Constructor Summary
ConstructorsConstructorDescriptionDefaultConfigurationServiceLayerHelper(de.hybris.platform.site.BaseSiteService baseSiteService) Deprecated, for removal: This API element is subject to removal in a future version.DefaultConfigurationServiceLayerHelper(de.hybris.platform.site.BaseSiteService baseSiteService, de.hybris.platform.servicelayer.user.UserService userService) -
Method Summary
Modifier and TypeMethodDescriptionvoidensureBaseSiteSetAndExecuteConfigurationAction(AbstractOrderModel order, Consumer<BaseSiteModel> action) Executes an action ensuring that that base site of the provided document is set as current base site.
After action execution, the previous current base site is restored.de.hybris.platform.site.BaseSiteServicegetCPQInfo(AbstractOrderEntryModel targetEntry) extracts the CPQ related product infos from the given entryprotected de.hybris.platform.servicelayer.user.UserServiceprotected booleanprotected <T> booleanprocessPage(IntFunction<SearchPageData<T>> searchFunction, int currentPage, Consumer<List<T>> searchResultConsumer) <T> voidprocessPageWise(IntFunction<SearchPageData<T>> searchFunction, Consumer<List<T>> searchResultConsumer) protected UserModelRetrieves order user if this case is relevant for impersonation
-
Field Details
-
MAXIMUM_PAGES
public static final int MAXIMUM_PAGESmax pages to process- See Also:
-
PAGE_SIZE
public static final int PAGE_SIZEitems per page- See Also:
-
-
Constructor Details
-
DefaultConfigurationServiceLayerHelper
@Deprecated(since="2211", forRemoval=true) public DefaultConfigurationServiceLayerHelper(de.hybris.platform.site.BaseSiteService baseSiteService) Deprecated, for removal: This API element is subject to removal in a future version. -
DefaultConfigurationServiceLayerHelper
public DefaultConfigurationServiceLayerHelper(de.hybris.platform.site.BaseSiteService baseSiteService, de.hybris.platform.servicelayer.user.UserService userService) - Parameters:
baseSiteService- base site serviceuserService- user service
-
-
Method Details
-
getCPQInfo
Description copied from interface:ConfigurationServiceLayerHelperextracts the CPQ related product infos from the given entry- Specified by:
getCPQInfoin interfaceConfigurationServiceLayerHelper- Parameters:
targetEntry- entry- Returns:
- CPQ related product infos, or null if not existing
-
ensureBaseSiteSetAndExecuteConfigurationAction
public void ensureBaseSiteSetAndExecuteConfigurationAction(AbstractOrderModel order, Consumer<BaseSiteModel> action) Description copied from interface:ConfigurationServiceLayerHelperExecutes an action ensuring that that base site of the provided document is set as current base site.
After action execution, the previous current base site is restored.- Specified by:
ensureBaseSiteSetAndExecuteConfigurationActionin interfaceConfigurationServiceLayerHelper- Parameters:
order- document providing the base siteaction- action to execute
-
processPageWise
public <T> void processPageWise(IntFunction<SearchPageData<T>> searchFunction, Consumer<List<T>> searchResultConsumer) - Specified by:
processPageWisein interfaceConfigurationServiceLayerHelper- Parameters:
searchFunction- function to deliver pageable resultssearchResultConsumer- consumer for processing the results page wise
-
processPage
protected <T> boolean processPage(IntFunction<SearchPageData<T>> searchFunction, int currentPage, Consumer<List<T>> searchResultConsumer) -
retrieveUserForAbstractOrderEntry
-
isRelevantForImpersonation
-
retrieveUserForAbstractOrderEntryIfRelevant
Description copied from interface:ConfigurationServiceLayerHelperRetrieves order user if this case is relevant for impersonation- Specified by:
retrieveUserForAbstractOrderEntryIfRelevantin interfaceConfigurationServiceLayerHelper- Parameters:
entry- abstract order entry- Returns:
- order user
-
getUserService
protected de.hybris.platform.servicelayer.user.UserService getUserService() -
getBaseSiteService
public de.hybris.platform.site.BaseSiteService getBaseSiteService()
-