|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.itracker.services.util.WorkflowUtilities
public class WorkflowUtilities
Contains utilities used when displaying and processing workflow and field events
| Field Summary | |
|---|---|
static int |
EVENT_FIELD_ONPOPULATE
Fires for each field when building the form. |
static int |
EVENT_FIELD_ONPOSTSUBMIT
Fires after all data is submitted to the db for all fields. |
static int |
EVENT_FIELD_ONPRESUBMIT
Fires after validation, but before the data is committed to the database. |
static int |
EVENT_FIELD_ONSETDEFAULT
Fires to set the current value of a form field. |
static int |
EVENT_FIELD_ONSORT
NOT CURRENTLY IMPLEMENTED. |
static int |
EVENT_FIELD_ONVALIDATE
Fires on validation of the form field. |
| Constructor Summary | |
|---|---|
WorkflowUtilities()
|
|
| Method Summary | |
|---|---|
static String |
getEventName(int value,
Locale locale)
Returns a title of workflow event, according to selected locale. |
static String |
getEventName(String value,
Locale locale)
|
static NameValuePair[] |
getEvents(Locale locale)
Returns an array of pairs (eventName, eventId), where eventName is an event title, according to selected locale. |
static List<NameValuePair> |
getListOptions(Map<Integer,List<NameValuePair>> listOptions,
int fieldId)
Select a list of NameValuePair objects from provided map object according to fieldId selector. |
static List<NameValuePair> |
getListOptions(Map listOptions,
Integer fieldId)
Select a list of NameValuePair objects from provided map object according to fieldId selector. |
static List<NameValuePair> |
processFieldScript(ProjectScript projectScript,
int event,
Integer fieldId,
List<NameValuePair> currentValues,
org.apache.struts.action.ActionMessages currentErrors,
org.apache.struts.validator.ValidatorForm form)
Run provided BEANSHELL script against form instance, taking into account incoming event type, field raised an event and current values. |
static List<NameValuePair> |
processFieldScripts(List<ProjectScript> projectScripts,
int event,
Integer fieldId,
List<NameValuePair> currentValue,
org.apache.struts.action.ActionErrors currentErrors,
org.apache.struts.validator.ValidatorForm form)
Run appropriate script, selecting it from provided list by matching event and field. |
static void |
processFieldScripts(List<ProjectScript> projectScriptModels,
int event,
Map<Integer,List<NameValuePair>> currentValues,
org.apache.struts.action.ActionMessages currentErrors,
org.apache.struts.validator.ValidatorForm form)
The most general way to run scripts. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int EVENT_FIELD_ONPOPULATE
public static final int EVENT_FIELD_ONSORT
public static final int EVENT_FIELD_ONSETDEFAULT
public static final int EVENT_FIELD_ONVALIDATE
public static final int EVENT_FIELD_ONPRESUBMIT
public static final int EVENT_FIELD_ONPOSTSUBMIT
| Constructor Detail |
|---|
public WorkflowUtilities()
| Method Detail |
|---|
public static String getEventName(int value,
Locale locale)
value - is an identifier of incoming event.locale - is a selected locale.
public static String getEventName(String value,
Locale locale)
public static NameValuePair[] getEvents(Locale locale)
locale - is a selected locale.
public static List<NameValuePair> getListOptions(Map<Integer,List<NameValuePair>> listOptions,
int fieldId)
listOptions - is a map, with stored NameValuePair objects lists
associated with specific integer id.fieldId - is a selector from map.
public static List<NameValuePair> getListOptions(Map listOptions,
Integer fieldId)
listOptions - is a map, with stored NameValuePair objects lists
associated with specific integer id.fieldId - is a selector from map.
public static void processFieldScripts(List<ProjectScript> projectScriptModels,
int event,
Map<Integer,List<NameValuePair>> currentValues,
org.apache.struts.action.ActionMessages currentErrors,
org.apache.struts.validator.ValidatorForm form)
throws WorkflowException
projectScriptModels - is a list of scripts.event - is an event type.currentValues - is a map of current values to fields.currentErrors - is a container for errors.form - contains default values of fields.
WorkflowException
public static List<NameValuePair> processFieldScripts(List<ProjectScript> projectScripts,
int event,
Integer fieldId,
List<NameValuePair> currentValue,
org.apache.struts.action.ActionErrors currentErrors,
org.apache.struts.validator.ValidatorForm form)
throws WorkflowException
projectScripts - is a list of provided scripts.event - is an event type.fieldId - is a field, associated with event.currentValue - is a set of current values.currentErrors - is a container for errors.form - is a form, holder of default values.
WorkflowException
public static List<NameValuePair> processFieldScript(ProjectScript projectScript,
int event,
Integer fieldId,
List<NameValuePair> currentValues,
org.apache.struts.action.ActionMessages currentErrors,
org.apache.struts.validator.ValidatorForm form)
throws WorkflowException
projectScript - is a script to run.event - is an event type.fieldId - is a field id associated with event.currentValues - is a set of current values.currentErrors - is a container for occured errors.form - is a form instance, holding values.
WorkflowException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||