Package de.xima.fc.workflow.itemlist
Class FcForEachLoopItemListCsvRows
- java.lang.Object
-
- de.xima.fc.workflow.itemlist.FcForEachLoopItemListCsvRows
-
- All Implemented Interfaces:
ItemList<IHeaderTable.ITableRowEntry<String>>
,Iterable<IHeaderTable.ITableRowEntry<String>>
public final class FcForEachLoopItemListCsvRows extends Object implements ItemList<IHeaderTable.ITableRowEntry<String>>
Utility class for resolving an item list for the for-each loop of typeROWS_OF_CHARACTER_SEPARATED_VALUES
.Implementation note: We explicitly use a
LinkedHashMap
to represent aList
of elements with an index. It important to preserve the order. The entries are the columns of each row, which must be ordered as they appear in the source CSV string. We do not use a list of string as we also want to provide the user with the ability to access columns by name when the first row contains the header names.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ItemList<?>
evaluate(INodeExecutionParams<?> params, ListItemSourcePropsRowsOfCharacterSeparatedValues sourceProps)
Resolves an item list for the for-each loop of typeROWS_OF_CHARACTER_SEPARATED_VALUES
.ItemData
extractData(IHeaderTable.ITableRowEntry<String> item, int index)
Lazily extracts the additional required data for an item in this list.Iterator<IHeaderTable.ITableRowEntry<String>>
iterator()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
extractData
public ItemData extractData(IHeaderTable.ITableRowEntry<String> item, int index)
Description copied from interface:ItemList
Lazily extracts the additional required data for an item in this list.- Specified by:
extractData
in interfaceItemList<IHeaderTable.ITableRowEntry<String>>
- Parameters:
item
- An item as returned byIterable.iterator()
.index
- 0-based index of the item returned byIterable.iterator()
.- Returns:
- The extracted item data for the given item of this list.
-
iterator
public Iterator<IHeaderTable.ITableRowEntry<String>> iterator()
- Specified by:
iterator
in interfaceIterable<IHeaderTable.ITableRowEntry<String>>
-
evaluate
public static ItemList<?> evaluate(INodeExecutionParams<?> params, ListItemSourcePropsRowsOfCharacterSeparatedValues sourceProps) throws InvalidCsvValueException, NodeThrewException
Resolves an item list for the for-each loop of typeROWS_OF_CHARACTER_SEPARATED_VALUES
.- Parameters:
params
- Workflow execution parameters as provided the workflow engine.sourceProps
- Configured properties.- Returns:
- An item list with all resolved form field repetition items.
- Throws:
InvalidCsvValueException
- When the configuredCSV rows string
is invalid.NodeThrewException
-
-