|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.core.workflow.BaseActivity<T>
public abstract class BaseActivity<T extends ProcessContext>
| Field Summary | |
|---|---|
protected boolean |
automaticallyRegisterRollbackHandler
|
protected String |
beanName
|
protected ErrorHandler |
errorHandler
|
protected int |
order
|
protected RollbackHandler |
rollbackHandler
|
protected String |
rollbackRegion
|
protected Map<String,Object> |
stateConfiguration
|
| Fields inherited from interface org.springframework.core.Ordered |
|---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
| Constructor Summary | |
|---|---|
BaseActivity()
|
|
| Method Summary | |
|---|---|
boolean |
getAutomaticallyRegisterRollbackHandler()
Whether or not this activity should automatically register a configured RollbackHandler with the ActivityStateManager. |
String |
getBeanName()
|
ErrorHandler |
getErrorHandler()
Get the fine-grained error handler wired up for this Activity |
int |
getOrder()
|
RollbackHandler |
getRollbackHandler()
Retrieve the RollbackHandler instance that should be called by the ActivityStateManager in the event of a workflow execution problem. |
String |
getRollbackRegion()
Retrieve the optional region label for the RollbackHandler. |
Map<String,Object> |
getStateConfiguration()
Retrieve any user-defined state that should accompany the RollbackHandler. |
void |
setAutomaticallyRegisterRollbackHandler(boolean automaticallyRegisterRollbackHandler)
Whether or not this activity should automatically register a configured RollbackHandler with the ActivityStateManager. |
void |
setBeanName(String beanName)
|
void |
setErrorHandler(ErrorHandler errorHandler)
|
void |
setOrder(int order)
|
void |
setRollbackHandler(RollbackHandler rollbackHandler)
Set the RollbackHandler instance that should be called by the ActivityStateManager in the event of a workflow execution problem. |
void |
setRollbackRegion(String rollbackRegion)
Set the optional region label for the RollbackHandler. |
void |
setStateConfiguration(Map<String,Object> stateConfiguration)
Set any user-defined state that should accompany the RollbackHandler. |
boolean |
shouldExecute(T context)
Determines if an activity should execute based on the current values in the ProcessContext. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.broadleafcommerce.core.workflow.Activity |
|---|
execute |
| Field Detail |
|---|
protected ErrorHandler errorHandler
protected String beanName
protected RollbackHandler rollbackHandler
protected String rollbackRegion
protected Map<String,Object> stateConfiguration
protected boolean automaticallyRegisterRollbackHandler
protected int order
| Constructor Detail |
|---|
public BaseActivity()
| Method Detail |
|---|
public boolean shouldExecute(T context)
ActivityProcessContext. For example, a
context might have both an Order as well as a String 'status' of what the order should be changed to. It is
possible that an activity in a workflow could only deal with a particular status change, and thus could return false
from this method.
shouldExecute in interface Activity<T extends ProcessContext>public ErrorHandler getErrorHandler()
Activity
getErrorHandler in interface Activity<T extends ProcessContext>public void setBeanName(String beanName)
setBeanName in interface org.springframework.beans.factory.BeanNameAwarepublic void setErrorHandler(ErrorHandler errorHandler)
setErrorHandler in interface Activity<T extends ProcessContext>public String getBeanName()
getBeanName in interface Activity<T extends ProcessContext>public RollbackHandler getRollbackHandler()
Activity
getRollbackHandler in interface Activity<T extends ProcessContext>public void setRollbackHandler(RollbackHandler rollbackHandler)
Activity
setRollbackHandler in interface Activity<T extends ProcessContext>rollbackHandler - the handler responsible for reverting state for the activitypublic String getRollbackRegion()
Activity
getRollbackRegion in interface Activity<T extends ProcessContext>public void setRollbackRegion(String rollbackRegion)
Activity
setRollbackRegion in interface Activity<T extends ProcessContext>rollbackRegion - the rollback region label for the RollbackHandler instancepublic Map<String,Object> getStateConfiguration()
Activity
getStateConfiguration in interface Activity<T extends ProcessContext>public void setStateConfiguration(Map<String,Object> stateConfiguration)
Activity
setStateConfiguration in interface Activity<T extends ProcessContext>stateConfiguration - any user-defined state configuration necessary for the execution of the RollbackHandlerpublic boolean getAutomaticallyRegisterRollbackHandler()
Activity
getAutomaticallyRegisterRollbackHandler in interface Activity<T extends ProcessContext>public void setAutomaticallyRegisterRollbackHandler(boolean automaticallyRegisterRollbackHandler)
Activity
setAutomaticallyRegisterRollbackHandler in interface Activity<T extends ProcessContext>automaticallyRegisterRollbackHandler - Whether or not to automatically register a RollbackHandler with the ActivityStateManagerpublic int getOrder()
getOrder in interface org.springframework.core.Orderedpublic void setOrder(int order)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||