Revision f756340a
Added by Andreas Kohlbecker about 3 years ago
src/main/java/eu/etaxonomy/cdm/service/CdmBeanItemContainerFactory.java | ||
---|---|---|
122 | 122 |
return termItemContainer; |
123 | 123 |
} |
124 | 124 |
|
125 |
public BeanItemContainer<TypeDesignationStatusBase> buildTypeDesignationStatusBaseItemItemContainer(Class<TypeDesignationStatusBase> type, |
|
126 |
List<OrderHint> orderHints, Optional<Boolean> withHasDesignationSource) { |
|
127 |
|
|
128 |
BeanItemContainer<TypeDesignationStatusBase> container = buildBeanItemContainer(type, null); |
|
129 |
List<TypeDesignationStatusBase> filteredItems = container.getItemIds().stream().filter(tsb -> |
|
130 |
!withHasDesignationSource.isPresent() |
|
131 |
|| withHasDesignationSource.get().equals(false) |
|
132 |
|| tsb.hasDesignationSource() == true |
|
133 |
) |
|
134 |
.collect(Collectors.toList()); |
|
135 |
container.removeAllItems(); |
|
136 |
container.addAll(filteredItems); |
|
137 |
return container; |
|
138 |
} |
|
139 |
|
|
140 |
|
|
125 | 141 |
@Transactional(readOnly=true) |
126 | 142 |
public <T extends CdmBase> BeanItemContainer<T> buildBeanItemContainer(Class<T> type, List<OrderHint> orderHints) { |
127 | 143 |
|
Also available in: Unified diff
ref #9290 limiting available designation status types for nom acts without a name - NameTypeDesignationEditor & improving previous code