|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.core.workflow.BaseProcessor
public abstract class BaseProcessor
Base class for all Workflow Processors. Responsible of keeping track of an ordered collection
of Activities
Activity| Field Summary | |
|---|---|
protected List<Activity<ProcessContext>> |
activities
|
protected boolean |
allowEmptyActivities
If set to true, this will allow an empty set of activities, thus creating a 'do-nothing' workflow |
protected org.springframework.beans.factory.BeanFactory |
beanFactory
|
protected String |
beanName
|
protected ErrorHandler |
defaultErrorHandler
|
protected List<ModuleActivity> |
moduleActivities
|
protected SupportLogger |
supportLogger
|
| Constructor Summary | |
|---|---|
BaseProcessor()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
Called after the properties have been set, Ensures the list of activities is not empty and each activity is supported by this Workflow Processor |
List<Activity<ProcessContext>> |
getActivities()
|
boolean |
getAutoRollbackOnError()
Whether or not the ActivityStateManager should automatically attempt to rollback any RollbackHandlers registered. |
protected String |
getBeanDesc()
Returns the bean description if the current bean factory allows it. |
org.springframework.beans.factory.BeanFactory |
getBeanFactory()
|
String |
getBeanName()
|
ErrorHandler |
getDefaultErrorHandler()
|
List<ModuleActivity> |
getModuleActivities()
Returns a filtered set of getActivities() that have implemented the ModuleActivity interface. |
boolean |
isAllowEmptyActivities()
Defaults to 'false'. |
void |
setActivities(List<Activity<ProcessContext>> activities)
Sets the collection of Activities to be executed by the Workflow Process |
void |
setAllowEmptyActivities(boolean allowEmptyActivities)
|
void |
setAutoRollbackOnError(boolean autoRollbackOnError)
Set whether or not the ActivityStateManager should automatically attempt to rollback any RollbackHandlers registered. |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Sets the spring bean factroy bean that is responsible for this processor. |
void |
setBeanName(String beanName)
Sets name of the spring bean in the application context that this processor is configured under |
void |
setDefaultErrorHandler(ErrorHandler defaultErrorHandler)
|
| 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.Processor |
|---|
doActivities, doActivities, setProcessContextFactory, supports |
| Field Detail |
|---|
protected org.springframework.beans.factory.BeanFactory beanFactory
protected String beanName
protected List<Activity<ProcessContext>> activities
protected List<ModuleActivity> moduleActivities
protected ErrorHandler defaultErrorHandler
protected boolean allowEmptyActivities
protected SupportLogger supportLogger
| Constructor Detail |
|---|
public BaseProcessor()
| Method Detail |
|---|
public void setBeanName(String beanName)
setBeanName in interface org.springframework.beans.factory.BeanNameAwareBeanNameAware.setBeanName(java.lang.String)
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
throws org.springframework.beans.BeansException
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwareorg.springframework.beans.BeansExceptionBeanFactoryAware.setBeanFactory(org.springframework.beans.factory.BeanFactory)public boolean getAutoRollbackOnError()
public void setAutoRollbackOnError(boolean autoRollbackOnError)
autoRollbackOnError - Whether or not the ActivityStateManager should automatically attempt to rollbackpublic boolean isAllowEmptyActivities()
public void setAllowEmptyActivities(boolean allowEmptyActivities)
allowEmptyActivities - the allowEmptyActivities to set
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionInitializingBean.afterPropertiesSet()protected String getBeanDesc()
public void setActivities(List<Activity<ProcessContext>> activities)
setActivities in interface Processoractivities - ordered collection (List) of activities to be executed by the processorpublic void setDefaultErrorHandler(ErrorHandler defaultErrorHandler)
setDefaultErrorHandler in interface Processorpublic List<Activity<ProcessContext>> getActivities()
public List<ModuleActivity> getModuleActivities()
getActivities() that have implemented the ModuleActivity interface. This
set of module activities is only set once during afterPropertiesSet(), so if you invoke
setActivities(List) after the bean has been initialized you will need to manually reset the list of module
activities as well (which could be achieved by manually invoking afterPropertiesSet()).
public String getBeanName()
public ErrorHandler getDefaultErrorHandler()
public org.springframework.beans.factory.BeanFactory getBeanFactory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||