use of org.apache.syncope.common.lib.to.BulkActionResult.Status in project syncope by apache.
the class BulkActionResultColumn method populateItem.
@Override
public void populateItem(final Item<ICellPopulator<T>> item, final String componentId, final IModel<T> rowModel) {
try {
final Object id = BeanUtils.getPropertyDescriptor(rowModel.getObject().getClass(), keyFieldName).getReadMethod().invoke(rowModel.getObject(), new Object[0]);
final Status status = results.getResults().containsKey(id.toString()) ? results.getResults().get(id.toString()) : Status.NOT_ATTEMPTED;
item.add(new Label(componentId, new StringResourceModel(status.name(), item, new Model<>(status.name()))));
} catch (BeansException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
LOG.error("Errore retrieving target id value", e);
}
}
Aggregations