Search in sources :

Example 6 with ReportOutputType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.ReportOutputType in project midpoint by Evolveum.

the class PageCreatedReports method deleteSelectedConfirmedPerformed.

private void deleteSelectedConfirmedPerformed(AjaxRequestTarget target, List<ReportOutputType> objects) {
    OperationResult result = new OperationResult(OPERATION_DELETE);
    for (ReportOutputType output : objects) {
        WebModelServiceUtils.deleteObject(ReportOutputType.class, output.getOid(), result, this);
    }
    result.computeStatusIfUnknown();
    ObjectDataProvider provider = getTableDataProvider();
    provider.clearCache();
    showResult(result);
    target.add((Component) getReportOutputTable());
    target.add(getFeedbackPanel());
}
Also used : OperationResult(com.evolveum.midpoint.schema.result.OperationResult) ObjectDataProvider(com.evolveum.midpoint.web.component.data.ObjectDataProvider) ReportOutputType(com.evolveum.midpoint.xml.ns._public.common.common_3.ReportOutputType)

Example 7 with ReportOutputType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.ReportOutputType in project midpoint by Evolveum.

the class PageCreatedReports method getReportFileName.

private String getReportFileName() {
    try {
        OperationResult result = new OperationResult(OPERATION_GET_REPORT_FILENAME);
        ReportOutputType reportOutput = WebModelServiceUtils.loadObject(ReportOutputType.class, currentReport.getOid(), getPageBase(), null, result).asObjectable();
        String fileName = reportOutput.getFilePath();
        if (fileName.contains("/")) {
            fileName = fileName.substring(fileName.lastIndexOf("/") + 1);
        }
        return fileName;
    } catch (Exception ex) {
    //nothing to do
    }
    return null;
}
Also used : OperationResult(com.evolveum.midpoint.schema.result.OperationResult) ReportOutputType(com.evolveum.midpoint.xml.ns._public.common.common_3.ReportOutputType)

Aggregations

ReportOutputType (com.evolveum.midpoint.xml.ns._public.common.common_3.ReportOutputType)7 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)3 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)2 LoadableModel (com.evolveum.midpoint.gui.api.model.LoadableModel)1 PrismObject (com.evolveum.midpoint.prism.PrismObject)1 ObjectDelta (com.evolveum.midpoint.prism.delta.ObjectDelta)1 Task (com.evolveum.midpoint.task.api.Task)1 AjaxButton (com.evolveum.midpoint.web.component.AjaxButton)1 AjaxDownloadBehaviorFromStream (com.evolveum.midpoint.web.component.AjaxDownloadBehaviorFromStream)1 DateLabelComponent (com.evolveum.midpoint.web.component.DateLabelComponent)1 ObjectDataProvider (com.evolveum.midpoint.web.component.data.ObjectDataProvider)1 CheckBoxHeaderColumn (com.evolveum.midpoint.web.component.data.column.CheckBoxHeaderColumn)1 InlineMenuable (com.evolveum.midpoint.web.component.data.column.InlineMenuable)1 SelectableBean (com.evolveum.midpoint.web.component.util.SelectableBean)1 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)1 DownloadButtonPanel (com.evolveum.midpoint.web.page.admin.reports.component.DownloadButtonPanel)1 ReportDeleteDialogDto (com.evolveum.midpoint.web.page.admin.reports.dto.ReportDeleteDialogDto)1 MetadataType (com.evolveum.midpoint.xml.ns._public.common.common_3.MetadataType)1 ObjectType (com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType)1 PolyStringType (com.evolveum.prism.xml.ns._public.types_3.PolyStringType)1