Interface QuoteActionValidationStrategy
-
- All Known Implementing Classes:
DefaultQuoteActionValidationStrategy,ProductConfigurationQuoteActionValidationStrategyImpl
public interface QuoteActionValidationStrategyStrategy that validates whether a user can perform an action on a quote.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisValidAction(QuoteAction quoteAction, QuoteModel quoteModel, UserModel userModel)Indicates whether a user can perform a certain action on a quote.voidvalidate(QuoteAction quoteAction, QuoteModel quoteModel, UserModel userModel)Checks whether a user can perform a certain action on a quote.
-
-
-
Method Detail
-
validate
void validate(QuoteAction quoteAction, QuoteModel quoteModel, UserModel userModel)
Checks whether a user can perform a certain action on a quote.- Parameters:
quoteAction- the quote action to be performedquoteModel- the quote on which the action is to be performeduserModel- the user that wants to perform the action- Throws:
IllegalQuoteStateException- if the action cannot be performed for a quote
-
isValidAction
boolean isValidAction(QuoteAction quoteAction, QuoteModel quoteModel, UserModel userModel)
Indicates whether a user can perform a certain action on a quote.- Parameters:
quoteAction- the quote action to be performedquoteModel- the quote on which the action is to be performeduserModel- the user that wants to perform the action- Returns:
- true if the action is valid for given quote and user, false otherwise
-
-