public abstract class AbstractWorkflowComponent extends Object implements LogEnabled, Serviceable
Modifier and Type | Field and Description |
---|---|
protected Logger |
_logger
Logger available to subclasses.
|
protected ServiceManager |
_manager
Service manager available to subclasses.
|
static String |
CONTEXT_PARAMETERS_KEY
Constant for storing the content into the transient variables map.
|
static String |
FAIL_CONDITIONS_KEY
Constant for storing the content into the transient variables map.
|
static String |
RESULT_MAP_KEY
Constant for storing the result map into the transient variables map.
|
static String |
WORKFLOW_ERRORS_KEY
Constant for storing the workflow errors in result map.
|
static String |
WORKFLOW_WARNS_KEY
Constant for storing the workflow warnings in result map.
|
Constructor and Description |
---|
AbstractWorkflowComponent() |
Modifier and Type | Method and Description |
---|---|
void |
addWorkflowError(Map transientVars,
I18nizableText errorLabel)
Add a global workflow error such as fail condition
|
void |
addWorkflowWarning(Map transientVars,
I18nizableText warnLabel)
Add a global workflow errors that will be traited as warnings
|
void |
enableLogging(Logger logger) |
List<String> |
getConditionFailures(Map transientVars)
Retrieve the list condition failures
|
Map<String,Object> |
getContextParameters(Map transientVars)
Retrieve the workflow parameters map
|
Map<String,Object> |
getResultsMap(Map transientVars)
Retrieve the map to write return values
|
UserIdentity |
getUser(Map transientVars)
Retrieve the user responsible of the call.
|
void |
service(ServiceManager manager) |
public static final String CONTEXT_PARAMETERS_KEY
public static final String RESULT_MAP_KEY
public static final String FAIL_CONDITIONS_KEY
public static final String WORKFLOW_ERRORS_KEY
public static final String WORKFLOW_WARNS_KEY
protected ServiceManager _manager
public AbstractWorkflowComponent()
public void enableLogging(Logger logger)
enableLogging
in interface LogEnabled
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public UserIdentity getUser(Map transientVars) throws com.opensymphony.workflow.WorkflowException
transientVars
- the parameters from the call.com.opensymphony.workflow.WorkflowException
- if the user is not present.public Map<String,Object> getContextParameters(Map transientVars) throws com.opensymphony.workflow.WorkflowException
transientVars
- the parameters from the call.com.opensymphony.workflow.WorkflowException
- if the object model or the request is not present.public List<String> getConditionFailures(Map transientVars) throws com.opensymphony.workflow.WorkflowException
transientVars
- the parameters from the call.com.opensymphony.workflow.WorkflowException
- If an error occurredpublic Map<String,Object> getResultsMap(Map transientVars) throws com.opensymphony.workflow.WorkflowException
transientVars
- the parameters from the call.com.opensymphony.workflow.WorkflowException
- if the result map is not found.public void addWorkflowError(Map transientVars, I18nizableText errorLabel) throws com.opensymphony.workflow.WorkflowException
transientVars
- the parameters from the call.errorLabel
- The error labelcom.opensymphony.workflow.WorkflowException
- if the result map is not found.public void addWorkflowWarning(Map transientVars, I18nizableText warnLabel) throws com.opensymphony.workflow.WorkflowException
transientVars
- the parameters from the call.warnLabel
- The warning labelcom.opensymphony.workflow.WorkflowException
- if the result map is not found.