use of org.hisp.dhis.dashboard.DashboardItem in project dhis2-core by dhis2.
the class DashboardController method hasDashboardItemsTypeSet.
private boolean hasDashboardItemsTypeSet(final List<DashboardItem> items) {
if (isNotEmpty(items)) {
for (final DashboardItem item : items) {
final boolean hasAssociationType = item != null && (item.getLinkItems() != null || item.getEmbeddedItem() != null || item.getText() != null || item.getMessages() != null);
final boolean hasType = item != null && item.getType() != null;
if (!hasType && !hasAssociationType) {
return false;
}
}
}
return true;
}
Aggregations