use of com.evolveum.midpoint.web.page.admin.reports.dto.ReconciliationReportDto in project midpoint by Evolveum.
the class ReconciliationPopupPanel method createModel.
private IModel<ResourceItemDto> createModel(final List<ResourceItemDto> resources) {
return new IModel<ResourceItemDto>() {
@Override
public ResourceItemDto getObject() {
ReconciliationReportDto dto = getModel().getObject();
if (dto.getResourceOid() == null) {
return null;
}
for (ResourceItemDto item : resources) {
if (StringUtils.equals(item.getOid(), dto.getResourceOid())) {
return item;
}
}
return null;
}
@Override
public void setObject(ResourceItemDto object) {
ReconciliationReportDto dto = getModel().getObject();
dto.setResourceOid(object != null ? object.getOid() : null);
dto.setResourceName(object != null ? object.getName() : null);
}
@Override
public void detach() {
}
};
}
Aggregations