public interface CommerceEntryGroupUtils
EntryGroupData.EntryGroupService| Modifier and Type | Method and Description |
|---|---|
int |
findMaxGroupNumber(java.util.List<EntryGroupData> roots)
Returns max value of
EntryGroupData#groupNumber. |
EntryGroupData |
getGroup(AbstractOrderData order,
java.util.Collection<java.lang.Integer> groupNumbers,
GroupType groupType)
Searches for entry group which is a type of
groupType and which number belongs to the groupNumbers. |
EntryGroupData |
getGroup(AbstractOrderData order,
java.lang.Integer groupNumber)
Returns
EntryGroupData by groupNumber from given order |
java.util.List<EntryGroupData> |
getLeaves(EntryGroupData root)
Returns all leaf nodes of group tree, preventing their natural order.
|
java.util.List<EntryGroupData> |
getNestedGroups(EntryGroupData root)
Flatten group tree and return it as a plain list of groups.
|
java.util.List<EntryGroupData> getNestedGroups(EntryGroupData root)
The method keeps item order unchanged: first goes root item, then its first child, then the children of that child and so forth.
root - node to start collecting fromjava.lang.IllegalArgumentException - is root is nulljava.util.List<EntryGroupData> getLeaves(EntryGroupData root)
root - root node of group treejava.lang.IllegalArgumentException - if root is nullEntryGroupData getGroup(AbstractOrderData order, java.lang.Integer groupNumber)
EntryGroupData by groupNumber from given ordergroupNumber - number of the group to search fororder - order containing entry group treesEntryGroupData with given groupNumber from the orderjava.lang.IllegalArgumentException - if no group with given groupNumber in the orderjava.lang.IllegalArgumentException - if order is nulljava.lang.IllegalArgumentException - if order.rootGroups is nulljava.lang.IllegalArgumentException - if groupNumber is nullEntryGroupData getGroup(AbstractOrderData order, java.util.Collection<java.lang.Integer> groupNumbers, GroupType groupType)
groupType and which number belongs to the groupNumbers.order - order what is expected to contain the desired groupgroupNumbers - possible group numbers. Usually are taken from
OrderEntryData.getEntryGroupNumbers()groupType - desired group typejava.lang.IllegalArgumentException - if group was not found or any of the args is invalidint findMaxGroupNumber(java.util.List<EntryGroupData> roots)
EntryGroupData#groupNumber.roots - root groupsCopyright © 2018 SAP SE. All Rights Reserved.