use of com.evolveum.midpoint.xml.ns._public.report.report_3.RemoteReportParameterType in project midpoint by Evolveum.
the class ReportWebService method getParamsMap.
private Map<QName, Object> getParamsMap(RemoteReportParametersType parametersType) throws SchemaException {
prismContext.adopt(parametersType);
Map<QName, Object> parametersMap = new HashMap<>();
if (parametersType == null || parametersType.getRemoteParameter() == null || parametersType.getRemoteParameter().isEmpty()) {
return parametersMap;
}
List<RemoteReportParameterType> items = parametersType.getRemoteParameter();
for (RemoteReportParameterType item : items) {
QName paramName = new QName(SchemaConstants.NS_REPORT, item.getParameterName());
ReportParameterType param = item.getParameterValue();
if (param == null) {
parametersMap.put(paramName, null);
continue;
}
if (param.getAny().size() == 1) {
parametersMap.put(paramName, param.getAny().get(0));
} else {
parametersMap.put(paramName, param.getAny());
}
}
return parametersMap;
}
Aggregations