use of com.evolveum.midpoint.web.page.admin.reports.dto.ReportOutputSearchDto in project midpoint by Evolveum.
the class PageCreatedReports method createQuery.
private ObjectQuery createQuery() {
ReportOutputSearchDto dto = searchModel.getObject();
S_AtomicFilterEntry q = QueryBuilder.queryFor(ReportOutputType.class, getPrismContext());
if (StringUtils.isNotEmpty(dto.getText())) {
PolyStringNormalizer normalizer = getPrismContext().getDefaultPolyStringNormalizer();
String normalizedString = normalizer.normalize(dto.getText());
q = q.item(ReportOutputType.F_NAME).containsPoly(normalizedString).matchingNorm().and();
}
String oid = dto.getReportTypeMap().get(dto.getReportType());
if (StringUtils.isNotEmpty(oid)) {
q = q.item(ReportOutputType.F_REPORT_REF).ref(oid).and();
}
return q.all().build();
}
use of com.evolveum.midpoint.web.page.admin.reports.dto.ReportOutputSearchDto in project midpoint by Evolveum.
the class PageCreatedReports method createSearchDto.
private ReportOutputSearchDto createSearchDto() {
ReportOutputSearchDto dto = new ReportOutputSearchDto();
Map<String, String> reportTypeMap = dto.getReportTypeMap();
List<PrismObject<ReportType>> reportTypes = WebModelServiceUtils.searchObjects(ReportType.class, null, null, getPageBase());
LOGGER.debug("Found {} report types.", reportTypes.size());
for (PrismObject o : reportTypes) {
ReportType reportType = (ReportType) o.asObjectable();
if (reportType.isParent()) {
String name = WebComponentUtil.getName(o);
reportTypeMap.put(name, reportType.getOid());
}
}
StringValue param = getPage().getPageParameters().get(OnePageParameterEncoder.PARAMETER);
if (param != null) {
for (String key : dto.getReportTypeMap().keySet()) {
if (reportTypeMap.get(key).equals(param.toString())) {
dto.setReportType(key);
}
}
}
return dto;
}
use of com.evolveum.midpoint.web.page.admin.reports.dto.ReportOutputSearchDto in project midpoint by Evolveum.
the class PageCreatedReports method clearSearchPerformed.
private void clearSearchPerformed(AjaxRequestTarget target) {
ReportOutputSearchDto dto = searchModel.getObject();
dto.setReportType(null);
dto.setText(null);
refreshTable(target);
}
Aggregations