syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmarte...@apache.org
Subject syncope git commit: [SYNCOPE-745] provides full implementation of report features
Date Thu, 05 May 2016 15:48:24 GMT
Repository: syncope
Updated Branches:
  refs/heads/master 1bebcdad6 -> 44346bb66


[SYNCOPE-745] provides full implementation of report features


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/44346bb6
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/44346bb6
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/44346bb6

Branch: refs/heads/master
Commit: 44346bb66485632b9858ce9e0e7defc49541a37f
Parents: 1bebcda
Author: fmartelli <fabio.martelli@gmail.com>
Authored: Thu May 5 17:47:47 2016 +0200
Committer: fmartelli <fabio.martelli@gmail.com>
Committed: Thu May 5 17:47:47 2016 +0200

----------------------------------------------------------------------
 .../console/reports/ExportTogglePanel.java      | 113 ---------------
 .../console/reports/ReportExecutionDetails.java | 140 +++++++++++++++++--
 .../console/tasks/ExecutionsDirectoryPanel.java |  21 +--
 .../ajax/form/AbstractAjaxDownloadBehavior.java |  13 +-
 .../wicket/markup/html/form/ActionLink.java     |   5 +
 .../markup/html/form/ActionLinksPanel.java      | 119 ++++++++++++++++
 .../console/reports/ExportTogglePanel.html      |  46 ------
 .../markup/html/form/ActionLinksPanel.html      |  25 ++++
 .../syncope/fit/console/ReportsITCase.java      |   9 --
 pom.xml                                         |   4 +-
 10 files changed, 298 insertions(+), 197 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/44346bb6/client/console/src/main/java/org/apache/syncope/client/console/reports/ExportTogglePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/reports/ExportTogglePanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/reports/ExportTogglePanel.java
deleted file mode 100644
index 0e5f631..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/reports/ExportTogglePanel.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.reports;
-
-import java.io.Serializable;
-import java.util.Arrays;
-import org.apache.syncope.client.console.SyncopeConsoleSession;
-import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.commons.HttpResourceStream;
-import org.apache.syncope.client.console.panels.TogglePanel;
-import org.apache.syncope.client.console.rest.ReportRestClient;
-import org.apache.syncope.client.console.wicket.ajax.form.AbstractAjaxDownloadBehavior;
-import org.apache.syncope.client.console.wicket.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
-import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
-import org.apache.syncope.common.lib.types.ReportExecExportFormat;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.Model;
-import org.apache.wicket.util.resource.IResourceStream;
-
-public class ExportTogglePanel extends TogglePanel<Serializable> {
-
-    private static final long serialVersionUID = -3195479265440591519L;
-
-    private String execution;
-
-    private IModel<ReportExecExportFormat> model = Model.of(ReportExecExportFormat.CSV);
-
-    public ExportTogglePanel(final String id) {
-        super(id);
-
-        final AjaxDropDownChoicePanel<ReportExecExportFormat> format = new AjaxDropDownChoicePanel<>(
-                "format",
-                "format",
-                model,
-                false);
-
-        format.setChoices(Arrays.asList(ReportExecExportFormat.values())).setOutputMarkupId(true);
-
-        final AjaxExportDownloadBehavior downloadBehavior = new AjaxExportDownloadBehavior();
-        format.getField().add(new IndicatorAjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE)
{
-
-            private static final long serialVersionUID = -1107858522700306810L;
-
-            @Override
-            protected void onUpdate(final AjaxRequestTarget target) {
-                try {
-                    LOG.info("Downloding report execution {} [{}]", execution, format.getModelObject());
-                    downloadBehavior.setExportFormat(format.getModelObject()).initiate(target);
-                    toggle(target, false);
-                } catch (Exception e) {
-                    error(getString(Constants.ERROR) + ":" + e.getMessage());
-                    SyncopeConsoleSession.get().getNotificationPanel().refresh(target);
-                }
-            }
-        }).add(downloadBehavior);
-
-        addInnerObject(format.hideLabel());
-    }
-
-    public void setExecution(final String execution) {
-        this.execution = execution;
-    }
-
-    private class AjaxExportDownloadBehavior extends AbstractAjaxDownloadBehavior {
-
-        private static final long serialVersionUID = 3109256773218160485L;
-
-        private ReportExecExportFormat exportFormat;
-
-        private HttpResourceStream stream;
-
-        public AjaxExportDownloadBehavior setExportFormat(final ReportExecExportFormat exportFormat)
{
-            this.exportFormat = exportFormat;
-            return this;
-        }
-
-        private void createResourceStream() {
-            if (stream == null) {
-                stream = new HttpResourceStream(new ReportRestClient().exportExecutionResult(execution,
exportFormat));
-            }
-        }
-
-        @Override
-        protected String getFileName() {
-            createResourceStream();
-            return stream == null ? null : stream.getFilename();
-        }
-
-        @Override
-        protected IResourceStream getResourceStream() {
-            createResourceStream();
-            return stream;
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/44346bb6/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportExecutionDetails.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportExecutionDetails.java
b/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportExecutionDetails.java
index 7866000..475deff 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportExecutionDetails.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportExecutionDetails.java
@@ -18,12 +18,22 @@
  */
 package org.apache.syncope.client.console.reports;
 
+import org.apache.syncope.client.console.commons.HttpResourceStream;
 import org.apache.syncope.client.console.panels.MultilevelPanel;
+import org.apache.syncope.client.console.rest.ExecutionRestClient;
 import org.apache.syncope.client.console.rest.ReportRestClient;
 import org.apache.syncope.client.console.tasks.ExecutionsDirectoryPanel;
+import org.apache.syncope.client.console.wicket.ajax.form.AbstractAjaxDownloadBehavior;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.common.lib.to.ExecTO;
 import org.apache.syncope.common.lib.to.ReportTO;
+import org.apache.syncope.common.lib.types.ReportExecExportFormat;
+import org.apache.syncope.common.lib.types.StandardEntitlement;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.util.resource.IResourceStream;
 
 /**
  * Modal window with report executions.
@@ -38,17 +48,129 @@ public class ReportExecutionDetails extends MultilevelPanel.SecondLevel
{
         final MultilevelPanel mlp = new MultilevelPanel("executions");
         add(mlp);
 
-        mlp.setFirstLevel(new ExecutionsDirectoryPanel(mlp, reportTO.getKey(), new ReportRestClient(),
pageRef) {
+        mlp.setFirstLevel(new ReportExecutionDirectoryPanel(mlp, reportTO.getKey(), new ReportRestClient(),
pageRef));
+    }
+
+    private static class ReportExecutionDirectoryPanel extends ExecutionsDirectoryPanel {
+
+        private static final long serialVersionUID = 5691719817252887541L;
+
+        private final MultilevelPanel mlp;
+
+        private final AjaxExportDownloadBehavior downloadBehavior;
+
+        ReportExecutionDirectoryPanel(
+                final MultilevelPanel multiLevelPanelRef,
+                final String key,
+                final ExecutionRestClient executionRestClient,
+                final PageReference pageRef) {
+            super(multiLevelPanelRef, key, executionRestClient, pageRef);
+            this.mlp = multiLevelPanelRef;
+
+            this.downloadBehavior = new AjaxExportDownloadBehavior();
+            this.add(downloadBehavior);
+        }
+
+        @Override
+        protected void next(
+                final String title,
+                final MultilevelPanel.SecondLevel slevel,
+                final AjaxRequestTarget target) {
+            mlp.next(title, slevel, target);
+        }
+
+        @Override
+        protected void addFurtherAcions(final ActionLinksPanel.Builder<ExecTO> panel,
final IModel<ExecTO> model) {
+            panel.add(new ActionLink<ExecTO>() {
+
+                private static final long serialVersionUID = -3722207913631435501L;
+
+                @Override
+                public void onClick(final AjaxRequestTarget target, final ExecTO ignore)
{
+                    downloadBehavior.setDetails(model.getObject().getKey(), ReportExecExportFormat.CSV);
+                    downloadBehavior.initiate(target);
+                }
+            }, ActionLink.ActionType.EXPORT_CSV, StandardEntitlement.REPORT_READ);
+
+            panel.add(new ActionLink<ExecTO>() {
+
+                private static final long serialVersionUID = -3722207913631435501L;
+
+                @Override
+                public void onClick(final AjaxRequestTarget target, final ExecTO ignore)
{
+                    downloadBehavior.setDetails(model.getObject().getKey(), ReportExecExportFormat.HTML);
+                    downloadBehavior.initiate(target);
+                }
+            }, ActionLink.ActionType.EXPORT_HTML, StandardEntitlement.REPORT_READ);
+
+            panel.add(new ActionLink<ExecTO>() {
+
+                private static final long serialVersionUID = -3722207913631435501L;
 
-            private static final long serialVersionUID = 5691719817252887541L;
+                @Override
+                public void onClick(final AjaxRequestTarget target, final ExecTO ignore)
{
+                    downloadBehavior.setDetails(model.getObject().getKey(), ReportExecExportFormat.PDF);
+                    downloadBehavior.initiate(target);
+                }
+            }, ActionLink.ActionType.EXPORT_PDF, StandardEntitlement.REPORT_READ);
 
-            @Override
-            protected void next(
-                    final String title,
-                    final MultilevelPanel.SecondLevel slevel,
-                    final AjaxRequestTarget target) {
-                mlp.next(title, slevel, target);
+            panel.add(new ActionLink<ExecTO>() {
+
+                private static final long serialVersionUID = -3722207913631435501L;
+
+                @Override
+                public void onClick(final AjaxRequestTarget target, final ExecTO ignore)
{
+                    downloadBehavior.setDetails(model.getObject().getKey(), ReportExecExportFormat.RTF);
+                    downloadBehavior.initiate(target);
+                }
+            }, ActionLink.ActionType.EXPORT_RTF, StandardEntitlement.REPORT_READ);
+
+            panel.add(new ActionLink<ExecTO>() {
+
+                private static final long serialVersionUID = -3722207913631435501L;
+
+                @Override
+                public void onClick(final AjaxRequestTarget target, final ExecTO ignore)
{
+                    downloadBehavior.setDetails(model.getObject().getKey(), ReportExecExportFormat.XML);
+                    downloadBehavior.initiate(target);
+                }
+            }, ActionLink.ActionType.EXPORT_XML, StandardEntitlement.REPORT_READ);
+        }
+    }
+
+    private static class AjaxExportDownloadBehavior extends AbstractAjaxDownloadBehavior
{
+
+        private static final long serialVersionUID = 3109256773218160485L;
+
+        private String execution;
+
+        private ReportExecExportFormat exportFormat;
+
+        private HttpResourceStream stream;
+
+        public AjaxExportDownloadBehavior setDetails(
+                final String execution, final ReportExecExportFormat exportFormat) {
+            this.execution = execution;
+            this.exportFormat = exportFormat;
+            return this;
+        }
+
+        private void createResourceStream() {
+            if (stream == null) {
+                stream = new HttpResourceStream(new ReportRestClient().exportExecutionResult(execution,
exportFormat));
             }
-        });
+        }
+
+        @Override
+        protected String getFileName() {
+            createResourceStream();
+            return stream == null ? null : stream.getFilename();
+        }
+
+        @Override
+        protected IResourceStream getResourceStream() {
+            createResourceStream();
+            return stream;
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/44346bb6/client/console/src/main/java/org/apache/syncope/client/console/tasks/ExecutionsDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/ExecutionsDirectoryPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/tasks/ExecutionsDirectoryPanel.java
index 872faf0..0d36759 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/ExecutionsDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/ExecutionsDirectoryPanel.java
@@ -32,7 +32,6 @@ import org.apache.syncope.client.console.panels.DirectoryPanel;
 import org.apache.syncope.client.console.panels.AjaxDataTablePanel;
 import org.apache.syncope.client.console.panels.MultilevelPanel;
 import org.apache.syncope.client.console.panels.MultilevelPanel.SecondLevel;
-import org.apache.syncope.client.console.reports.ExportTogglePanel;
 import org.apache.syncope.client.console.rest.ExecutionRestClient;
 import org.apache.syncope.client.console.tasks.ExecutionsDirectoryPanel.ExecProvider;
 import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
@@ -58,8 +57,6 @@ public abstract class ExecutionsDirectoryPanel
 
     private static final long serialVersionUID = 2039393934721149162L;
 
-    private final ExportTogglePanel export;
-
     private final BaseModal<?> baseModal;
 
     private final MultilevelPanel multiLevelPanelRef;
@@ -82,9 +79,6 @@ public abstract class ExecutionsDirectoryPanel
             final PageReference pageRef) {
         super(MultilevelPanel.FIRST_LEVEL_ID, pageRef, false);
 
-        this.export = new ExportTogglePanel("outer");
-        addOuterObject(this.export);
-
         this.baseModal = baseModal;
         this.multiLevelPanelRef = multiLevelPanelRef;
         restClient = executionRestClient;
@@ -139,16 +133,6 @@ public abstract class ExecutionsDirectoryPanel
 
                             @Override
                             public void onClick(final AjaxRequestTarget target, final ExecTO
ignore) {
-                                export.setExecution(model.getObject().getKey());
-                                export.toggle(target, true);
-                            }
-                        }, ActionLink.ActionType.EXPORT, StandardEntitlement.REPORT_READ).
-                        add(new ActionLink<ExecTO>() {
-
-                            private static final long serialVersionUID = -3722207913631435501L;
-
-                            @Override
-                            public void onClick(final AjaxRequestTarget target, final ExecTO
ignore) {
                                 try {
                                     restClient.deleteExecution(taskExecutionTO.getKey());
                                     info(getString(Constants.OPERATION_SUCCEEDED));
@@ -160,6 +144,8 @@ public abstract class ExecutionsDirectoryPanel
                             }
                         }, ActionLink.ActionType.DELETE, StandardEntitlement.TASK_DELETE);
 
+                addFurtherAcions(panel, model);
+
                 return panel.build(componentId, model.getObject());
             }
 
@@ -184,6 +170,9 @@ public abstract class ExecutionsDirectoryPanel
         return columns;
     }
 
+    protected void addFurtherAcions(final ActionLinksPanel.Builder<ExecTO> panel, final
IModel<ExecTO> model) {
+    }
+
     @Override
     protected ExecProvider dataProvider() {
         return new ExecProvider(key, rows);

http://git-wip-us.apache.org/repos/asf/syncope/blob/44346bb6/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java
b/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java
index b6db880..9342c7d 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java
@@ -22,11 +22,15 @@ import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.behavior.AbstractAjaxBehavior;
 import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler;
 import org.apache.wicket.util.resource.IResourceStream;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public abstract class AbstractAjaxDownloadBehavior extends AbstractAjaxBehavior {
 
     private static final long serialVersionUID = 6833760760338614245L;
 
+    protected static final Logger LOG = LoggerFactory.getLogger(AbstractAjaxDownloadBehavior.class);
+
     /**
      * Call this method to initiate the download.
      *
@@ -39,8 +43,13 @@ public abstract class AbstractAjaxDownloadBehavior extends AbstractAjaxBehavior
 
     @Override
     public void onRequest() {
-        getComponent().getRequestCycle().scheduleRequestHandlerAfterCurrent(
-                new ResourceStreamRequestHandler(getResourceStream(), getFileName()));
+        try {
+            getComponent().getRequestCycle().scheduleRequestHandlerAfterCurrent(
+                    new ResourceStreamRequestHandler(getResourceStream(), getFileName()));
+        } catch (Exception e) {
+            // cannot be notifies beacause the use of scheduleRequestHandlerAfterCurrent
+            LOG.error("Error downloading file", e);
+        }
     }
 
     protected abstract String getFileName();

http://git-wip-us.apache.org/repos/asf/syncope/blob/44346bb6/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java
b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java
index a79e4a7..fad561c 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java
@@ -64,6 +64,11 @@ public abstract class ActionLink<T extends Serializable> implements
Serializable
         SELECT("read"),
         CLOSE("read"),
         EXPORT("read"),
+        EXPORT_CSV("read"),
+        EXPORT_HTML("read"),
+        EXPORT_PDF("read"),
+        EXPORT_RTF("read"),
+        EXPORT_XML("read"),
         SUSPEND("update"),
         REACTIVATE("update"),
         RELOAD("reload"),

http://git-wip-us.apache.org/repos/asf/syncope/blob/44346bb6/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.java
index 85bfb20..e9b7b1f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.java
@@ -78,6 +78,11 @@ public final class ActionLinksPanel<T extends Serializable> extends
Panel {
         super.add(new Fragment("panelSelect", "emptyFragment", this));
         super.add(new Fragment("panelClose", "emptyFragment", this));
         super.add(new Fragment("panelExport", "emptyFragment", this));
+        super.add(new Fragment("panelExportCSV", "emptyFragment", this));
+        super.add(new Fragment("panelExportHTML", "emptyFragment", this));
+        super.add(new Fragment("panelExportPDF", "emptyFragment", this));
+        super.add(new Fragment("panelExportRTF", "emptyFragment", this));
+        super.add(new Fragment("panelExportXML", "emptyFragment", this));
         super.add(new Fragment("panelSuspend", "emptyFragment", this));
         super.add(new Fragment("panelReactivate", "emptyFragment", this));
         super.add(new Fragment("panelReload", "emptyFragment", this));
@@ -603,6 +608,101 @@ public final class ActionLinksPanel<T extends Serializable> extends
Panel {
                 }.setVisible(link.isEnabled(model.getObject())));
                 break;
 
+            case EXPORT_CSV:
+                fragment = new Fragment("panelExportCSV", "fragmentExportCSV", this);
+
+                fragment.addOrReplace(new IndicatingAjaxLink<Void>("exportCSVLink")
{
+
+                    private static final long serialVersionUID = -7978723352517770644L;
+
+                    @Override
+                    public void onClick(final AjaxRequestTarget target) {
+                        link.onClick(target, model.getObject());
+                    }
+
+                    @Override
+                    public String getAjaxIndicatorMarkupId() {
+                        return disableIndicator ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
+                    }
+                }.setVisible(link.isEnabled(model.getObject())));
+                break;
+
+            case EXPORT_HTML:
+                fragment = new Fragment("panelExportHTML", "fragmentExportHTML", this);
+
+                fragment.addOrReplace(new IndicatingAjaxLink<Void>("exportHTMLLink")
{
+
+                    private static final long serialVersionUID = -7978723352517770644L;
+
+                    @Override
+                    public void onClick(final AjaxRequestTarget target) {
+                        link.onClick(target, model.getObject());
+                    }
+
+                    @Override
+                    public String getAjaxIndicatorMarkupId() {
+                        return disableIndicator ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
+                    }
+                }.setVisible(link.isEnabled(model.getObject())));
+                break;
+
+            case EXPORT_PDF:
+                fragment = new Fragment("panelExportPDF", "fragmentExportPDF", this);
+
+                fragment.addOrReplace(new IndicatingAjaxLink<Void>("exportPDFLink")
{
+
+                    private static final long serialVersionUID = -7978723352517770644L;
+
+                    @Override
+                    public void onClick(final AjaxRequestTarget target) {
+                        link.onClick(target, model.getObject());
+                    }
+
+                    @Override
+                    public String getAjaxIndicatorMarkupId() {
+                        return disableIndicator ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
+                    }
+                }.setVisible(link.isEnabled(model.getObject())));
+                break;
+
+            case EXPORT_RTF:
+                fragment = new Fragment("panelExportRTF", "fragmentExportRTF", this);
+
+                fragment.addOrReplace(new IndicatingAjaxLink<Void>("exportRTFLink")
{
+
+                    private static final long serialVersionUID = -7978723352517770644L;
+
+                    @Override
+                    public void onClick(final AjaxRequestTarget target) {
+                        link.onClick(target, model.getObject());
+                    }
+
+                    @Override
+                    public String getAjaxIndicatorMarkupId() {
+                        return disableIndicator ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
+                    }
+                }.setVisible(link.isEnabled(model.getObject())));
+                break;
+
+            case EXPORT_XML:
+                fragment = new Fragment("panelExportXML", "fragmentExportXML", this);
+
+                fragment.addOrReplace(new IndicatingAjaxLink<Void>("exportXMLLink")
{
+
+                    private static final long serialVersionUID = -7978723352517770644L;
+
+                    @Override
+                    public void onClick(final AjaxRequestTarget target) {
+                        link.onClick(target, model.getObject());
+                    }
+
+                    @Override
+                    public String getAjaxIndicatorMarkupId() {
+                        return disableIndicator ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
+                    }
+                }.setVisible(link.isEnabled(model.getObject())));
+                break;
+
             case SUSPEND:
                 fragment = new Fragment("panelSuspend", "fragmentSuspend", this);
 
@@ -976,6 +1076,25 @@ public final class ActionLinksPanel<T extends Serializable> extends
Panel {
                 super.addOrReplace(new Fragment("panelExport", "emptyFragment", this));
                 break;
 
+            case EXPORT_CSV:
+                super.addOrReplace(new Fragment("panelExportCSV", "emptyFragment", this));
+                break;
+
+            case EXPORT_HTML:
+                super.addOrReplace(new Fragment("panelExportHTML", "emptyFragment", this));
+                break;
+
+            case EXPORT_PDF:
+                super.addOrReplace(new Fragment("panelExportPDF", "emptyFragment", this));
+                break;
+
+            case EXPORT_RTF:
+                super.addOrReplace(new Fragment("panelExportRTF", "emptyFragment", this));
+                break;
+            case EXPORT_XML:
+                super.addOrReplace(new Fragment("panelExportXML", "emptyFragment", this));
+                break;
+
             case SUSPEND:
                 super.addOrReplace(new Fragment("panelSuspend", "emptyFragment", this));
                 break;

http://git-wip-us.apache.org/repos/asf/syncope/blob/44346bb6/client/console/src/main/resources/org/apache/syncope/client/console/reports/ExportTogglePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/reports/ExportTogglePanel.html
b/client/console/src/main/resources/org/apache/syncope/client/console/reports/ExportTogglePanel.html
deleted file mode 100644
index da3c7f8..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/reports/ExportTogglePanel.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
-  <wicket:head>
-    <style type="text/css">
-      div#startAt {
-        background-color: rgba(98, 98, 98, 0.98) !important;
-        color: #CCC;
-        right: 5px !important;
-        top: 100px !important;
-        min-width: 300px;
-        min-height: 130px !important;
-        z-index: 6000 !important;
-      }
-
-      div#startAtContainer {
-        padding: 15px;
-      }
-
-      div#startAtContainer input {
-        background-color: rgba(200, 200, 200, 0.60) !important;
-      }
-    </style>
-  </wicket:head>
-  <wicket:extend>
-    <div id="startAtContainer" class="form-group">
-      <span wicket:id="format"></span>
-    </div>
-  </wicket:extend>
-</html>

http://git-wip-us.apache.org/repos/asf/syncope/blob/44346bb6/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.html
b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.html
index c8d2e96..e0202fd 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.html
@@ -50,6 +50,11 @@ under the License.
     <span wicket:id="panelCompose">[plus]</span>
     <span wicket:id="panelLayoutEdit">[plus]</span>
     <span wicket:id="panelExport">[plus]</span>
+    <span wicket:id="panelExportCSV">[plus]</span>
+    <span wicket:id="panelExportHTML">[plus]</span>
+    <span wicket:id="panelExportPDF">[plus]</span>
+    <span wicket:id="panelExportRTF">[plus]</span>
+    <span wicket:id="panelExportXML">[plus]</span>
     <span wicket:id="panelPropagationTasks">[plus]</span>
     <span wicket:id="panelNotificationTasks">[plus]</span>
     <span wicket:id="panelDelete">[plus]</span>
@@ -184,6 +189,26 @@ under the License.
       <a href="#" wicket:id="exportLink" class="btn"><i class="fa fa-floppy-o" alt="export
icon" title="Export"></i></a>
     </wicket:fragment>
 
+    <wicket:fragment wicket:id="fragmentExportCSV">
+      <a href="#" wicket:id="exportCSVLink" class="btn"><i class="fa fa-file-text-o"
alt="export icon" title="Export CSV"></i></a>
+    </wicket:fragment>
+
+    <wicket:fragment wicket:id="fragmentExportHTML">
+      <a href="#" wicket:id="exportHTMLLink" class="btn"><i class="fa fa-file-code-o"
alt="export icon" title="Export HTML"></i></a>
+    </wicket:fragment>
+
+    <wicket:fragment wicket:id="fragmentExportPDF">
+      <a href="#" wicket:id="exportPDFLink" class="btn"><i class="fa fa-file-pdf-o"
alt="export icon" title="Export PDF"></i></a>
+    </wicket:fragment>
+
+    <wicket:fragment wicket:id="fragmentExportRTF">
+      <a href="#" wicket:id="exportRTFLink" class="btn"><i class="fa fa-file-word-o"
alt="export icon" title="Export RTF"></i></a>
+    </wicket:fragment>
+
+    <wicket:fragment wicket:id="fragmentExportXML">
+      <a href="#" wicket:id="exportXMLLink" class="btn"><i class="fa fa-file-excel-o"
alt="export icon" title="Export XML"></i></a>
+    </wicket:fragment>
+
     <wicket:fragment wicket:id="fragmentSuspend">
       <a href="#" wicket:id="suspendLink" class="btn"><i class="glyphicon glyphicon-ban-circle"
alt="suspend icon" title="Suspend"></i></a>
     </wicket:fragment>

http://git-wip-us.apache.org/repos/asf/syncope/blob/44346bb6/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ReportsITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ReportsITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ReportsITCase.java
index 1a5407c..79b681e 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ReportsITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ReportsITCase.java
@@ -137,15 +137,6 @@ public class ReportsITCase extends AbstractConsoleITCase {
 
         assertNotNull(result);
 
-        wicketTester.clickLink(result.getPageRelativePath() + ":cells:6:cell:panelExport:exportLink");
-        wicketTester.assertComponent("body:content:tabbedPanel:panel:secondLevelContainer:second:executions:"
-                + "firstLevelContainer:first:outerObjectsRepeater:3:outer:container:content:togglePanelContainer:close",
-                AjaxLink.class);
-
-        wicketTester.clickLink(
-                "body:content:tabbedPanel:panel:secondLevelContainer:second:executions:firstLevelContainer:first:"
-                + "outerObjectsRepeater:3:outer:container:content:togglePanelContainer:close");
-
         wicketTester.clickLink(result.getPageRelativePath() + ":cells:6:cell:panelView:viewLink");
         wicketTester.clickLink(
                 "body:content:tabbedPanel:panel:secondLevelContainer:second:executions:secondLevelContainer:back");

http://git-wip-us.apache.org/repos/asf/syncope/blob/44346bb6/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 241cc6b..43074da 100644
--- a/pom.xml
+++ b/pom.xml
@@ -339,7 +339,7 @@ under the License.
     <jackson.version>2.7.4</jackson.version>
 
     <spring.version>4.2.5.RELEASE</spring.version>
-    <spring-security.version>4.0.4.RELEASE</spring-security.version>
+    <spring-security.version>4.1.0.RELEASE</spring-security.version>
 
     <openjpa.version>2.4.1</openjpa.version>
     <commons-dbcp.version>2.1.1</commons-dbcp.version>
@@ -394,7 +394,7 @@ under the License.
     <codemirror.version>5.13.2</codemirror.version>
     <jsplumb.version>2.0.7</jsplumb.version>
     
-    <wicket.version>7.2.0</wicket.version>
+    <wicket.version>7.3.0</wicket.version>
     <wicket-jqueryui.version>7.2.1</wicket-jqueryui.version>
     <wicket-bootstrap.version>0.10.6</wicket-bootstrap.version>
     <wicket-chartjs.version>7.0.1</wicket-chartjs.version>


Mime
View raw message