Class DefaultCxActionResultService
java.lang.Object
de.hybris.platform.personalizationservices.action.impl.DefaultCxActionResultService
- All Implemented Interfaces:
CxActionResultService
Default implementation of
CxActionResultService.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearActionResultsInSession(UserModel user, CatalogVersionModel catalogVersion) Removes action results from the current session for given user and catalog versionprotected Optional<CxResultsModel>createActionResults(String resultsKey, UserModel user, CatalogVersionModel cv, List<CxAbstractActionResult> actionResults) protected Optional<CxResultsModel>findResults(UserModel user, CatalogVersionModel catalogVersion) protected CxActionResultDaogetActionResults(UserModel user, CatalogVersionModel catalogVersion) Retrieves action results from the current session for given user and catalog version.protected CxConfigurationServicegetCxResults(UserModel user, CatalogVersionModel cv) Returns user result persisted in databaseprotected CxUserSegmentSessionServiceprotected StringgetDefaultResultsKey(CatalogVersionModel catalogVersion) protected DefaultSessionTokenServiceprotected ModelServiceprotected StringgetResultsKey(UserModel user, CatalogVersionModel catalogVersion) protected StringgetResultsTimeKey(UserModel user, CatalogVersionModel catalogVersion) protected SerializationServiceprotected SessionServiceprotected Optional<CxResultsModel>getSingleResult(String resultsKey) protected TimeServiceprotected UserServiceprotected voidvoidloadActionResultsInSession(UserModel user, Collection<CatalogVersionModel> catalogVersions) Load action results stored on the persisted user for the catalog versions and store them on the session.protected voidloadActionResultsInSessionInternal(UserModel user, Collection<CatalogVersionModel> catalogVersions) protected voidprotected voidsaveDefaultResult(CxResultsModel results) voidsetActionResultDao(CxActionResultDao actionResultDao) voidsetActionResultsInSession(UserModel user, CatalogVersionModel catalogVersion, List<CxAbstractActionResult> actionResults) Stores action results in the current session for given user and catalog versionvoidsetCxConfigurationService(CxConfigurationService cxConfigurationService) voidsetCxUserSegmentSessionService(CxUserSegmentSessionService cxUserSegmentSessionService) voidsetDefaultSessionTokenService(DefaultSessionTokenService defaultSessionTokenService) voidsetModelService(ModelService modelService) voidsetSerializationService(SerializationService serializationService) voidsetSessionService(SessionService sessionService) voidsetTimeService(TimeService timeService) voidsetUserService(UserService userService) voidstoreActionResults(UserModel user, CatalogVersionModel cv, List<CxAbstractActionResult> actionResults) Save action resultsvoidstoreDefaultActionResults(UserModel user, CatalogVersionModel cv, List<CxAbstractActionResult> actionResults) * Save default action results
-
Field Details
-
CX_ACTION_RESULTS
- See Also:
-
CX_ACTION_RESULTS_TIME
- See Also:
-
CX_DEFAULT_ACTION_RESULTS
- See Also:
-
-
Constructor Details
-
DefaultCxActionResultService
public DefaultCxActionResultService()
-
-
Method Details
-
setActionResultsInSession
public void setActionResultsInSession(UserModel user, CatalogVersionModel catalogVersion, List<CxAbstractActionResult> actionResults) Description copied from interface:CxActionResultServiceStores action results in the current session for given user and catalog version- Specified by:
setActionResultsInSessionin interfaceCxActionResultService- Parameters:
user- user for which action results should be storedcatalogVersion- Catalog versionactionResults- action results to store
-
loadActionResultsInSession
public void loadActionResultsInSession(UserModel user, Collection<CatalogVersionModel> catalogVersions) Description copied from interface:CxActionResultServiceLoad action results stored on the persisted user for the catalog versions and store them on the session.- Specified by:
loadActionResultsInSessionin interfaceCxActionResultService- Parameters:
user- user to load the action results fromcatalogVersions- catalog versions to load the action results for
-
loadActionResultsInSessionInternal
protected void loadActionResultsInSessionInternal(UserModel user, Collection<CatalogVersionModel> catalogVersions) -
findResults
-
loadActionResultsInSession
-
loadSegmentsIntoSession
-
storeDefaultActionResults
public void storeDefaultActionResults(UserModel user, CatalogVersionModel cv, List<CxAbstractActionResult> actionResults) Description copied from interface:CxActionResultService* Save default action results- Specified by:
storeDefaultActionResultsin interfaceCxActionResultService- Parameters:
user- user for whom we save resultscv- catalog version for which we save resultsactionResults- action results to save
-
saveDefaultResult
-
storeActionResults
public void storeActionResults(UserModel user, CatalogVersionModel cv, List<CxAbstractActionResult> actionResults) Description copied from interface:CxActionResultServiceSave action results- Specified by:
storeActionResultsin interfaceCxActionResultService- Parameters:
user- user for whom we save resultscv- catalog version for which we save resultsactionResults- action results to save
-
createActionResults
protected Optional<CxResultsModel> createActionResults(String resultsKey, UserModel user, CatalogVersionModel cv, List<CxAbstractActionResult> actionResults) -
getSingleResult
-
getCxResults
Description copied from interface:CxActionResultServiceReturns user result persisted in database- Specified by:
getCxResultsin interfaceCxActionResultService- Parameters:
user- user to get results forcv- catalog version for which we retrieve result- Returns:
- result for given parameters or Optional.empty
-
clearActionResultsInSession
Description copied from interface:CxActionResultServiceRemoves action results from the current session for given user and catalog version- Specified by:
clearActionResultsInSessionin interfaceCxActionResultService- Parameters:
user- for which action results should be removedcatalogVersion- Catalog version
-
getActionResults
public List<CxAbstractActionResult> getActionResults(UserModel user, CatalogVersionModel catalogVersion) Description copied from interface:CxActionResultServiceRetrieves action results from the current session for given user and catalog version.- Specified by:
getActionResultsin interfaceCxActionResultService- Parameters:
user- for which action results should be retrievedcatalogVersion- Catalog version- Returns:
- Collection of action results (may be empty). Not null.
-
getResultsKey
-
getResultsTimeKey
-
getDefaultResultsKey
-
getSessionService
-
getCxConfigurationService
-
getSerializationService
-
getModelService
-
getTimeService
-
getUserService
-
getDefaultSessionTokenService
-
getActionResultDao
-
getCxUserSegmentSessionService
-
setSessionService
-
setSerializationService
-
setModelService
-
setTimeService
-
setCxConfigurationService
-
setUserService
-
setDefaultSessionTokenService
-
setActionResultDao
-
setCxUserSegmentSessionService
-