Package org.imixs.workflow.engine
Class TextItemValueAdapter
java.lang.Object
org.imixs.workflow.engine.TextItemValueAdapter
The TextItemValueAdapter replaces text fragments with the values of a named
Item.
- Author:
- rsoika
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionformatItemValues
(List<?> aItem, String aSeparator, String sFormat) this method formats a string object depending of an attribute type.formatItemValues
(List<?> aItem, String aSeparator, String sFormat, Locale alocale) this method formats a string object depending of an attribute type.This method returns a formated a string object.void
This method reacts on CDI events of the type TextEvent and parses a string for xml tag [<itemvalue>
.
-
Constructor Details
-
TextItemValueAdapter
public TextItemValueAdapter()
-
-
Method Details
-
onEvent
This method reacts on CDI events of the type TextEvent and parses a string for xml tag [<itemvalue>
. Those tags will be replaced with the corresponding item value:hello <itemvalue>$Creator</itemvalue>
Item values can also be formated. e.g. for date/time values:
Last access Time= <itemvalue format="mm:ss">$created</itemvalue>
If the itemValue is a multiValue object the single values can be spearated by a separator:
Phone List: <itemvalue separator="<br />">txtPhones</itemvalue>
-
formatItemValues
public String formatItemValues(List<?> aItem, String aSeparator, String sFormat, Locale locale, String sPosition) This method returns a formated a string object. In case a Separator is provided, multiValues will be separated by the provided separator. If no separator is provide, only the first value will returned. The format and locale attributes can be used to format number and date values. -
formatItemValues
this method formats a string object depending of an attribute type. MultiValues will be separated by the provided separator -
formatItemValues
this method formats a string object depending of an attribute type. MultiValues will be separated by the provided separator
-