Class DefaultQuoteStateSelectionStrategy
java.lang.Object
de.hybris.platform.commerceservices.order.strategies.impl.DefaultQuoteStateSelectionStrategy
- All Implemented Interfaces:
QuoteStateSelectionStrategy
public class DefaultQuoteStateSelectionStrategy
extends Object
implements QuoteStateSelectionStrategy
Default implementation of
QuoteStateSelectionStrategy-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllowedActionsForState(QuoteState state, UserModel userModel) Provides the list of actions based on the given state.getAllowedStatesForAction(QuoteAction action, UserModel userModel) Provides the list of quote states based on provided action.protected Map<QuoteState,Set<QuoteAction>> getInvertedMap(Map<QuoteAction, Set<QuoteState>> actionStateMap) protected Map<QuoteUserType,Map<QuoteState, Set<QuoteAction>>> getInvertedNestedMap(Map<QuoteUserType, Map<QuoteAction, Set<QuoteState>>> userTypeActionStateMap) protected QuoteUserTypeIdentificationStrategygetTransitionStateForAction(QuoteAction action, UserModel userModel) Provides a quote state that the quote should be in for the corresponding action.protected Map<QuoteUserType,Map<QuoteAction, Set<QuoteState>>> protected Map<QuoteUserType,Map<QuoteAction, QuoteState>> protected Map<QuoteUserType,Map<QuoteState, Set<QuoteAction>>> voidsetQuoteUserTypeIdentificationStrategy(QuoteUserTypeIdentificationStrategy quoteUserTypeIdentificationStrategy) voidsetUserTypeActionStateMap(Map<QuoteUserType, Map<QuoteAction, Set<QuoteState>>> quoteUserTypeActionStateMap) voidsetUserTypeActionStateTransitionMap(Map<QuoteUserType, Map<QuoteAction, QuoteState>> userTypeActionStateTransitionMap)
-
Constructor Details
-
DefaultQuoteStateSelectionStrategy
public DefaultQuoteStateSelectionStrategy()
-
-
Method Details
-
getAllowedStatesForAction
Description copied from interface:QuoteStateSelectionStrategyProvides the list of quote states based on provided action.- Specified by:
getAllowedStatesForActionin interfaceQuoteStateSelectionStrategy- Parameters:
action- quote action that is being performeduserModel- user used to determine the allowed states- Returns:
- Set of quote states associated with the action. Empty set will be returned if none of the states is allowed.
-
getAllowedActionsForState
Description copied from interface:QuoteStateSelectionStrategyProvides the list of actions based on the given state.- Specified by:
getAllowedActionsForStatein interfaceQuoteStateSelectionStrategy- Parameters:
state- quote state that can allow one actionuserModel- user used to determine the allowed actions- Returns:
- Set of actions allowed by this state. Empty set will be returned if none of the actions is allowed.
-
getTransitionStateForAction
Description copied from interface:QuoteStateSelectionStrategyProvides a quote state that the quote should be in for the corresponding action.- Specified by:
getTransitionStateForActionin interfaceQuoteStateSelectionStrategy- Parameters:
action- quote action that is being performeduserModel- user used to determine the transition state- Returns:
- quote state
-
getInvertedNestedMap
protected Map<QuoteUserType,Map<QuoteState, getInvertedNestedMapSet<QuoteAction>>> (Map<QuoteUserType, Map<QuoteAction, Set<QuoteState>>> userTypeActionStateMap) -
getInvertedMap
protected Map<QuoteState,Set<QuoteAction>> getInvertedMap(Map<QuoteAction, Set<QuoteState>> actionStateMap) -
getUserTypeActionStateMap
-
setUserTypeActionStateMap
public void setUserTypeActionStateMap(Map<QuoteUserType, Map<QuoteAction, Set<QuoteState>>> quoteUserTypeActionStateMap) -
getUserTypeStateActionMap
-
getUserTypeActionStateTransitionMap
-
setUserTypeActionStateTransitionMap
public void setUserTypeActionStateTransitionMap(Map<QuoteUserType, Map<QuoteAction, QuoteState>> userTypeActionStateTransitionMap) -
getQuoteUserTypeIdentificationStrategy
-
setQuoteUserTypeIdentificationStrategy
public void setQuoteUserTypeIdentificationStrategy(QuoteUserTypeIdentificationStrategy quoteUserTypeIdentificationStrategy)
-