Package org.imixs.workflow.office.forms
Class AnalyticController
java.lang.Object
org.imixs.workflow.office.forms.AnalyticController
- All Implemented Interfaces:
Serializable
The AnalyticController is a conversationScoped controller that provides
values for the analytic-custom parts.
A custom implementation can react on AnalyticEvent to compute values and datasets.
The controller implements a caching mechanism to avoid repeated calls for new analytic values. If the analytic value is already stored in the current workitem, no new value will be fired.
- Author:
- rsoika
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.imixs.workflow.ItemCollectioncomputeValue(org.imixs.workflow.ItemCollection workitem, String key, String options) Computes an analytic value.getDescription(org.imixs.workflow.ItemCollection workitem, String key) getDescription(org.imixs.workflow.ItemCollection workitem, String key, String options) Returns the analytic description for a given keyReturns the analytic label for a given keyReturns the analytic optional link for a given keyThis helper method returns an optional JSON value from the 'options' attriubtedoublegetValueAsDouble(org.imixs.workflow.ItemCollection workitem, String key) doublegetValueAsDouble(org.imixs.workflow.ItemCollection workitem, String key, String options) Returns a analytic value as a Double for a given key.getValueAsJson(org.imixs.workflow.ItemCollection workitem, String key) getValueAsJson(org.imixs.workflow.ItemCollection workitem, String key, String options) Returns a analytic value as a Json String for a given key.getValueAsString(org.imixs.workflow.ItemCollection workitem, String key) getValueAsString(org.imixs.workflow.ItemCollection workitem, String key, String options) Returns a analytic value as a String for a given key.
-
Field Details
-
analyticEvents
-
-
Constructor Details
-
AnalyticController
public AnalyticController()
-
-
Method Details
-
getValueAsString
public String getValueAsString(org.imixs.workflow.ItemCollection workitem, String key, String options) Returns a analytic value as a String for a given key.- Parameters:
key-- Returns:
-
getValueAsString
-
getValueAsJson
public String getValueAsJson(org.imixs.workflow.ItemCollection workitem, String key, String options) Returns a analytic value as a Json String for a given key.- Parameters:
key-- Returns:
-
getValueAsJson
-
getValueAsDouble
public double getValueAsDouble(org.imixs.workflow.ItemCollection workitem, String key, String options) Returns a analytic value as a Double for a given key.- Parameters:
key-- Returns:
-
getValueAsDouble
-
getLabel
Returns the analytic label for a given key- Parameters:
key-- Returns:
-
getLabel
-
getLink
Returns the analytic optional link for a given key- Parameters:
key-- Returns:
-
getLink
-
getDescription
public String getDescription(org.imixs.workflow.ItemCollection workitem, String key, String options) Returns the analytic description for a given key- Parameters:
key-- Returns:
-
getDescription
-
computeValue
protected org.imixs.workflow.ItemCollection computeValue(org.imixs.workflow.ItemCollection workitem, String key, String options) Computes an analytic value. Note: An observer controller is responsible to cache or reset the cached values if needed.- Parameters:
key-- Returns:
-
getOption
This helper method returns an optional JSON value from the 'options' attriubte- Parameters:
key-optionName-jsonOptions-defaultValue-- Returns:
-