Class AbstractFraudCheckAction<T extends OrderProcessModel>
- java.lang.Object
-
- de.hybris.platform.processengine.action.AbstractAction<T>
-
- de.hybris.platform.yacceleratorordermanagement.actions.order.AbstractOrderAction<T>
-
- de.hybris.platform.yacceleratorordermanagement.actions.order.fraudcheck.AbstractFraudCheckAction<T>
-
- All Implemented Interfaces:
Action<T>
- Direct Known Subclasses:
FraudCheckOrderAction
public abstract class AbstractFraudCheckAction<T extends OrderProcessModel> extends AbstractOrderAction<T>
Abstract action for fraud check action which define 3 possible transitions (OK,POTENTIAL,FRAUD) and some supplementary methods
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAbstractFraudCheckAction.Transition
-
Field Summary
-
Fields inherited from class de.hybris.platform.yacceleratorordermanagement.actions.order.AbstractOrderAction
timeService
-
Fields inherited from class de.hybris.platform.processengine.action.AbstractAction
modelService, processParameterHelper
-
Fields inherited from interface de.hybris.platform.processengine.spring.Action
ERROR_RETURN_CODE, RETRY_RETURN_CODE
-
-
Constructor Summary
Constructors Constructor Description AbstractFraudCheckAction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected FraudReportModelcreateFraudReport(java.lang.String providerName, FraudServiceResponse response, OrderModel order, FraudStatus status)Create a fraud reportprotected OrderHistoryEntryModelcreateHistoryLog(java.lang.String providerName, OrderModel order, FraudStatus status, java.lang.String code)java.lang.Stringexecute(T process)Executes thisAction's business logic working on the givenBusinessProcessModel.abstract AbstractFraudCheckAction.TransitionexecuteAction(T process)Executes thisAction's business logic working on the givenBusinessProcessModel.java.util.Set<java.lang.String>getTransitions()Accesses all possible return codes of thisAction.-
Methods inherited from class de.hybris.platform.yacceleratorordermanagement.actions.order.AbstractOrderAction
createHistoryLog, getTimeService, setTimeService
-
Methods inherited from class de.hybris.platform.processengine.action.AbstractAction
createTransitions, getModelService, getProcessParameterHelper, getProcessParameterValue, refresh, save, setModelService, setOrderStatus, setProcessParameterHelper
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.processengine.spring.Action
getCurrentActionDefinitionContext
-
-
-
-
Method Detail
-
createFraudReport
protected FraudReportModel createFraudReport(java.lang.String providerName, FraudServiceResponse response, OrderModel order, FraudStatus status)
Create a fraud report- Parameters:
providerName- - the provider nameresponse- - the fraud service responseorder- - the order modelstatus- - the fraud status- Returns:
- a fraud report model
-
createHistoryLog
protected OrderHistoryEntryModel createHistoryLog(java.lang.String providerName, OrderModel order, FraudStatus status, java.lang.String code)
-
getTransitions
public java.util.Set<java.lang.String> getTransitions()
Description copied from interface:ActionAccesses all possible return codes of thisAction. This method is used by the process engine to validate a process definition. Furthermore it can be used by (graphical) editors to access all return codes which have to mapped in transitions.- Returns:
- all possible return codes of this
Action
-
execute
public final java.lang.String execute(T process)
Description copied from interface:ActionExecutes thisAction's business logic working on the givenBusinessProcessModel.- Parameters:
process- The process context to work on.- Returns:
- the return code as stated in the process definition. This code is used by the process engine to determine the next actions.
-
executeAction
public abstract AbstractFraudCheckAction.Transition executeAction(T process)
Executes thisAction's business logic working on the givenBusinessProcessModel.- Parameters:
process- - the process context to work on.- Returns:
- OK; FRAUD; POTENTIAL
- Throws:
RetryLaterExceptionjava.lang.Exception
-
-