use of eu.bcvsolutions.idm.rpt.api.dto.RptReportRendererDto in project CzechIdMng by bcvsolutions.
the class DefaultReportManager method toDto.
private RptReportRendererDto toDto(ReportRenderer renderer) {
RptReportRendererDto dto = new RptReportRendererDto();
//
dto.setId(renderer.getName());
dto.setName(renderer.getName());
dto.setModule(renderer.getModule());
dto.setDescription(AutowireHelper.getBeanDescription(renderer.getClass()));
dto.setDisabled(renderer.isDisabled());
dto.setFormat(renderer.getFormat());
dto.setExtension(renderer.getExtension());
//
return dto;
}
use of eu.bcvsolutions.idm.rpt.api.dto.RptReportRendererDto in project CzechIdMng by bcvsolutions.
the class DefaultReportManager method getRenderers.
@Override
public List<RptReportRendererDto> getRenderers(String reportName) {
List<RptReportRendererDto> renderers = new ArrayList<>();
context.getBeansOfType(RendererRegistrar.class).entrySet().stream().filter(renderer -> {
return enabledEvaluator.isEnabled(renderer.getValue());
}).forEach(registrarBean -> {
String[] rendererNames = registrarBean.getValue().register(reportName);
if (rendererNames != null) {
for (String rendererName : rendererNames) {
ReportRenderer renderer = reportRendererRegistry.getPluginFor(rendererName);
if (enabledEvaluator.isEnabled(renderer)) {
renderers.add(toDto(renderer));
}
}
}
});
return renderers;
}
Aggregations