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 type
ROWS_OF_CHARACTER_SEPARATED_VALUES.
Implementation note: We explicitly use a LinkedHashMap to represent a List 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
Modifier and TypeMethodDescriptionstatic ItemList<?> evaluate(INodeExecutionParams<?> params, ListItemSourcePropsRowsOfCharacterSeparatedValues sourceProps) Resolves an item list for the for-each loop of typeROWS_OF_CHARACTER_SEPARATED_VALUES.extractData(IHeaderTable.ITableRowEntry<String> item, int index) Lazily extracts the additional required data for an item in this list.iterator()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
extractData
Description copied from interface:ItemListLazily extracts the additional required data for an item in this list.- Specified by:
extractDatain 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
- Specified by:
iteratorin 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 stringis invalid.NodeThrewException
-