Search in sources :

Example 1 with ReconciliationReportDto

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() {
        }
    };
}
Also used : IModel(org.apache.wicket.model.IModel) ResourceItemDto(com.evolveum.midpoint.web.page.admin.configuration.dto.ResourceItemDto) ReconciliationReportDto(com.evolveum.midpoint.web.page.admin.reports.dto.ReconciliationReportDto)

Aggregations

ResourceItemDto (com.evolveum.midpoint.web.page.admin.configuration.dto.ResourceItemDto)1 ReconciliationReportDto (com.evolveum.midpoint.web.page.admin.reports.dto.ReconciliationReportDto)1 IModel (org.apache.wicket.model.IModel)1