use of org.activityinfo.legacy.shared.model.ReportDTO in project activityinfo by bedatadriven.
the class ShareReportDialog method show.
public void show(ReportMetadataDTO metadata) {
super.show();
dispatcher.execute(new GetReportModel(metadata.getId()), new MaskingAsyncMonitor(grid, I18N.CONSTANTS.loading()), new SuccessCallback<ReportDTO>() {
@Override
public void onSuccess(ReportDTO reportDTO) {
show(reportDTO.getReport());
}
});
}
use of org.activityinfo.legacy.shared.model.ReportDTO in project activityinfo by bedatadriven.
the class GenerateDashboardElementHandler method execute.
@Override
public CommandResult execute(GenerateDashboardElement cmd, User user) throws CommandException {
ReportDTO report = dispatcher.execute(new GetReportModel(cmd.getReportId()));
if (report.getReport().getElements().isEmpty()) {
return new TextReportElement("The report is empty");
} else {
ReportElement element = report.getReport().getElements().get(0);
element.setContent(generator.generateElement(user, element, null, new DateRange()));
return element;
}
}
use of org.activityinfo.legacy.shared.model.ReportDTO in project activityinfo by bedatadriven.
the class GetReportModelTest method selectReportOnly.
@Test
public void selectReportOnly() {
setUser(1);
ReportDTO result = execute(new GetReportModel(3));
assertNotNull(result.getReport());
assertEquals("Report 3", result.getReport().getTitle());
assertNull(result.getReportMetadataDTO());
}
use of org.activityinfo.legacy.shared.model.ReportDTO in project activityinfo by bedatadriven.
the class GetReportModelTest method selectReportOnly2.
@Test
public void selectReportOnly2() {
setUser(1);
ReportDTO result = execute(new GetReportModel(3, false));
assertNotNull(result.getReport());
assertEquals("Report 3", result.getReport().getTitle());
assertNull(result.getReportMetadataDTO());
}
Aggregations