syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject syncope git commit: [SYNCOPE-821] Implemented
Date Mon, 04 Apr 2016 14:39:24 GMT
Repository: syncope
Updated Branches:
  refs/heads/master 323b22cd6 -> bef072646


[SYNCOPE-821] Implemented


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

Branch: refs/heads/master
Commit: bef0726464d8981c8263b29efb89b4d93b173f74
Parents: 323b22c
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Mon Apr 4 16:39:05 2016 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Mon Apr 4 16:39:05 2016 +0200

----------------------------------------------------------------------
 .../console/panels/AbstractConnConfPanel.java   | 102 +++++++++++++++++++
 .../panels/AbstractConnectorConfPanel.java      | 102 -------------------
 .../console/panels/ConnCapabilitiesPanel.java   |  47 +++++++++
 .../panels/ConnectorCapabilitiesPanel.java      |  49 ---------
 .../console/panels/ConnectorConfPanel.java      |   2 +-
 .../client/console/panels/ConnectorModal.java   |   5 +-
 .../panels/ResourceConnCapabilitiesPanel.java   |  71 +++++++++++++
 .../console/panels/ResourceConnConfPanel.java   |   2 +-
 .../console/panels/ResourceDetailsPanel.java    |   2 +-
 .../client/console/panels/ResourceModal.java    |  19 ++++
 .../markup/html/form/AjaxCheckBoxPanel.java     |   2 +-
 .../console/panels/AbstractConnConfPanel.html   |  33 ++++++
 .../panels/AbstractConnectorConfPanel.html      |  33 ------
 .../console/panels/ConnCapabilitiesPanel.html   |  23 +++++
 .../panels/ConnectorCapabilitiesPanel.html      |  23 -----
 .../console/panels/ConnectorModal_it.properties |   2 +-
 .../panels/ResourceConnCapabilitiesPanel.html   |  29 ++++++
 .../ResourceConnCapabilitiesPanel.properties    |  17 ++++
 .../ResourceConnCapabilitiesPanel_it.properties |  17 ++++
 ...sourceConnCapabilitiesPanel_pt_BR.properties |  17 ++++
 .../console/panels/ResourceModal.properties     |   3 +-
 .../console/panels/ResourceModal_it.properties  |   3 +-
 .../panels/ResourceModal_pt_BR.properties       |   3 +-
 23 files changed, 390 insertions(+), 216 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractConnConfPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractConnConfPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractConnConfPanel.java
new file mode 100644
index 0000000..e726642
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractConnConfPanel.java
@@ -0,0 +1,102 @@
+/*
+ * 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.panels;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Set;
+import org.apache.syncope.client.console.wicket.markup.html.list.ConnConfPropertyListView;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.syncope.common.lib.types.ConnConfProperty;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+
+public abstract class AbstractConnConfPanel<T extends AbstractBaseBean> extends Panel
{
+
+    private static final long serialVersionUID = -2025535531121434050L;
+
+    protected final WebMarkupContainer propertiesContainer;
+
+    protected final AjaxButton check;
+
+    protected final IModel<T> model;
+
+    public AbstractConnConfPanel(final String id, final IModel<T> model) {
+        super(id, model);
+        this.model = model;
+        setOutputMarkupId(true);
+
+        propertiesContainer = new WebMarkupContainer("connectorPropertiesContainer");
+        propertiesContainer.setOutputMarkupId(true);
+        add(propertiesContainer);
+
+        check = new IndicatingAjaxButton("check", new ResourceModel("check")) {
+
+            private static final long serialVersionUID = -7978723352517770644L;
+
+            @Override
+            public void onSubmit(final AjaxRequestTarget target, final Form<?> form)
{
+                check(target);
+            }
+        };
+        propertiesContainer.add(check);
+    }
+
+    protected void setConfPropertyListView(final String modelExpression, final boolean withOverridable)
{
+        propertiesContainer.add(new ConnConfPropertyListView(
+                "connectorProperties",
+                new PropertyModel<List<ConnConfProperty>>(model.getObject(),
modelExpression) {
+
+            private static final long serialVersionUID = -7809699384012595307L;
+
+            @Override
+            public List<ConnConfProperty> getObject() {
+                final List<ConnConfProperty> res = new ArrayList<>((Set<ConnConfProperty>)
super.getObject());
+
+                // re-order properties
+                Collections.sort(res, new Comparator<ConnConfProperty>() {
+
+                    @Override
+                    public int compare(final ConnConfProperty left, final ConnConfProperty
right) {
+                        if (left == null) {
+                            return -1;
+                        } else {
+                            return left.compareTo(right);
+                        }
+                    }
+                });
+
+                return res;
+            }
+        }, withOverridable).setOutputMarkupId(true));
+    }
+
+    protected abstract void check(final AjaxRequestTarget taget);
+
+    protected abstract List<ConnConfProperty> getConnProperties(final T instance);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.java
deleted file mode 100644
index ef32372..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.java
+++ /dev/null
@@ -1,102 +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.panels;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Set;
-import org.apache.syncope.client.console.wicket.markup.html.list.ConnConfPropertyListView;
-import org.apache.syncope.common.lib.AbstractBaseBean;
-import org.apache.syncope.common.lib.types.ConnConfProperty;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.form.AjaxButton;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
-import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.markup.html.panel.Panel;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.PropertyModel;
-import org.apache.wicket.model.ResourceModel;
-
-public abstract class AbstractConnectorConfPanel<T extends AbstractBaseBean> extends
Panel {
-
-    private static final long serialVersionUID = -2025535531121434050L;
-
-    protected final WebMarkupContainer propertiesContainer;
-
-    protected final AjaxButton check;
-
-    protected final IModel<T> model;
-
-    public AbstractConnectorConfPanel(final String id, final IModel<T> model) {
-        super(id, model);
-        this.model = model;
-        setOutputMarkupId(true);
-
-        propertiesContainer = new WebMarkupContainer("connectorPropertiesContainer");
-        propertiesContainer.setOutputMarkupId(true);
-        add(propertiesContainer);
-
-        check = new IndicatingAjaxButton("check", new ResourceModel("check")) {
-
-            private static final long serialVersionUID = -7978723352517770644L;
-
-            @Override
-            public void onSubmit(final AjaxRequestTarget target, final Form<?> form)
{
-                check(target);
-            }
-        };
-        propertiesContainer.add(check);
-    }
-
-    protected void setConfPropertyListView(final String modelExpression, final boolean withOverridable)
{
-        propertiesContainer.add(new ConnConfPropertyListView(
-                "connectorProperties",
-                new PropertyModel<List<ConnConfProperty>>(model.getObject(),
modelExpression) {
-
-            private static final long serialVersionUID = -7809699384012595307L;
-
-            @Override
-            public List<ConnConfProperty> getObject() {
-                final List<ConnConfProperty> res = new ArrayList<>((Set<ConnConfProperty>)
super.getObject());
-
-                // re-order properties
-                Collections.sort(res, new Comparator<ConnConfProperty>() {
-
-                    @Override
-                    public int compare(final ConnConfProperty left, final ConnConfProperty
right) {
-                        if (left == null) {
-                            return -1;
-                        } else {
-                            return left.compareTo(right);
-                        }
-                    }
-                });
-
-                return res;
-            }
-        }, withOverridable).setOutputMarkupId(true));
-    }
-
-    protected abstract void check(final AjaxRequestTarget taget);
-
-    protected abstract List<ConnConfProperty> getConnProperties(final T instance);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnCapabilitiesPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnCapabilitiesPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnCapabilitiesPanel.java
new file mode 100644
index 0000000..3fa735b
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnCapabilitiesPanel.java
@@ -0,0 +1,47 @@
+/*
+ * 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.panels;
+
+import java.util.Arrays;
+import java.util.List;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPalettePanel;
+import org.apache.syncope.common.lib.types.ConnectorCapability;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.util.ListModel;
+
+public class ConnCapabilitiesPanel extends Panel {
+
+    private static final long serialVersionUID = -2025535531121434050L;
+
+    public ConnCapabilitiesPanel(final String id, final PropertyModel<List<ConnectorCapability>>
model) {
+        super(id, model);
+        setOutputMarkupId(true);
+
+        AjaxPalettePanel<ConnectorCapability> capabilitiesPalette =
+                new AjaxPalettePanel.Builder<ConnectorCapability>().
+                setAllowMoveAll(true).
+                build("capabilitiesPalette",
+                        model,
+                        new ListModel<>(Arrays.asList(ConnectorCapability.values())));
+        capabilitiesPalette.hideLabel();
+        capabilitiesPalette.setOutputMarkupId(true);
+        add(capabilitiesPalette);
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorCapabilitiesPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorCapabilitiesPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorCapabilitiesPanel.java
deleted file mode 100644
index ffcf163..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorCapabilitiesPanel.java
+++ /dev/null
@@ -1,49 +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.panels;
-
-import java.util.Arrays;
-import java.util.List;
-import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPalettePanel;
-import org.apache.syncope.common.lib.to.ConnInstanceTO;
-import org.apache.syncope.common.lib.types.ConnectorCapability;
-import org.apache.wicket.markup.html.panel.Panel;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.PropertyModel;
-import org.apache.wicket.model.util.ListModel;
-
-public class ConnectorCapabilitiesPanel extends Panel {
-
-    private static final long serialVersionUID = -2025535531121434050L;
-
-    public ConnectorCapabilitiesPanel(final String id, final IModel<ConnInstanceTO>
model) {
-        super(id, model);
-        setOutputMarkupId(true);
-
-        AjaxPalettePanel<ConnectorCapability> capabilitiesPalette =
-                new AjaxPalettePanel.Builder<ConnectorCapability>().
-                setAllowMoveAll(true).
-                build("capabilitiesPalette",
-                        new PropertyModel<List<ConnectorCapability>>(model.getObject(),
"capabilities"),
-                        new ListModel<>(Arrays.asList(ConnectorCapability.values())));
-        capabilitiesPalette.hideLabel();
-        capabilitiesPalette.setOutputMarkupId(true);
-        add(capabilitiesPalette);
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorConfPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorConfPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorConfPanel.java
index f142e0f..a443cd6 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorConfPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorConfPanel.java
@@ -28,7 +28,7 @@ import org.apache.syncope.common.lib.types.ConnConfPropSchema;
 import org.apache.syncope.common.lib.types.ConnConfProperty;
 import org.apache.wicket.model.IModel;
 
-public abstract class ConnectorConfPanel extends AbstractConnectorConfPanel<ConnInstanceTO>
{
+public abstract class ConnectorConfPanel extends AbstractConnConfPanel<ConnInstanceTO>
{
 
     private static final long serialVersionUID = -2025535531121434050L;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
index 15d1b88..4ebfdc0 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
@@ -33,6 +33,7 @@ import org.apache.syncope.client.console.topology.TopologyNode;
 import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
 import org.apache.syncope.common.lib.to.ConnBundleTO;
 import org.apache.syncope.common.lib.to.ConnInstanceTO;
+import org.apache.syncope.common.lib.types.ConnectorCapability;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.event.Broadcast;
@@ -41,6 +42,7 @@ import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.model.ResourceModel;
 
 /**
@@ -125,7 +127,8 @@ public class ConnectorModal extends AbstractResourceModal<Serializable>
{
 
             @Override
             public Panel getPanel(final String panelId) {
-                return new ConnectorCapabilitiesPanel(panelId, model);
+                return new ConnCapabilitiesPanel(
+                        panelId, new PropertyModel<List<ConnectorCapability>>(model.getObject(),
"capabilities"));
             }
         });
         //--------------------------------

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel.java
new file mode 100644
index 0000000..0f73261
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel.java
@@ -0,0 +1,71 @@
+/*
+ * 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.panels;
+
+import java.util.List;
+import java.util.Set;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.wicket.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.types.ConnectorCapability;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+
+public class ResourceConnCapabilitiesPanel extends Panel {
+
+    private static final long serialVersionUID = -114632577031611754L;
+
+    public ResourceConnCapabilitiesPanel(
+            final String id, final IModel<ResourceTO> model, final Set<ConnectorCapability>
connectorCapabilities) {
+
+        super(id, model);
+        setOutputMarkupId(true);
+
+        if (!model.getObject().isOverrideCapabilities() && model.getObject().getCapabilitiesOverride().isEmpty())
{
+            model.getObject().getCapabilitiesOverride().addAll(connectorCapabilities);
+        }
+
+        final ConnCapabilitiesPanel connCapabilitiesPanel = new ConnCapabilitiesPanel(
+                "capabilitiesOverride",
+                new PropertyModel<List<ConnectorCapability>>(model.getObject(),
"capabilitiesOverride"));
+        connCapabilitiesPanel.setEnabled(model.getObject().isOverrideCapabilities());
+        add(connCapabilitiesPanel);
+
+        final AjaxCheckBoxPanel overrideCapabilities = new AjaxCheckBoxPanel(
+                "overrideCapabilities",
+                new ResourceModel("overrideCapabilities", "overrideCapabilities").getObject(),
+                new PropertyModel<Boolean>(model, "overrideCapabilities"));
+        overrideCapabilities.getField().add(new IndicatorAjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE)
{
+
+            private static final long serialVersionUID = -1107858522700306810L;
+
+            @Override
+            protected void onUpdate(final AjaxRequestTarget target) {
+                connCapabilitiesPanel.setEnabled(overrideCapabilities.getField().getModelObject());
+                target.add(ResourceConnCapabilitiesPanel.this);
+            }
+        });
+        add(overrideCapabilities);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
index fb58ddc..50a9ff3 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
@@ -27,7 +27,7 @@ import org.apache.syncope.common.lib.to.ResourceTO;
 import org.apache.syncope.common.lib.types.ConnConfProperty;
 import org.apache.wicket.model.IModel;
 
-public abstract class ResourceConnConfPanel extends AbstractConnectorConfPanel<ResourceTO>
{
+public abstract class ResourceConnConfPanel extends AbstractConnConfPanel<ResourceTO>
{
 
     private static final long serialVersionUID = -7982691107029848579L;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
index b044ed0..1c4a266 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
@@ -115,7 +115,7 @@ public class ResourceDetailsPanel extends Panel {
         container.add(new AjaxTextFieldPanel(
                 "connector",
                 new ResourceModel("connector", "connector").getObject(),
-                new Model<String>(model.getObject().getConnectorDisplayName()),
+                new Model<>(model.getObject().getConnectorDisplayName()),
                 false).addRequiredLabel().setEnabled(false));
 
         add(new AnnotatedBeanPanel("systeminformation", model.getObject()).setRenderBodyOnly(true));

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
index 3249860..c0df4ac 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
@@ -222,6 +222,25 @@ public class ResourceModal<T extends Serializable> extends AbstractResourceModal
         //--------------------------------
 
         //--------------------------------
+        // Resource connector capabilities panel
+        //--------------------------------
+        tabs.add(new AbstractTab(new ResourceModel("connectorCapabilities")) {
+
+            private static final long serialVersionUID = -6815067322125799251L;
+
+            @Override
+            public Panel getPanel(final String panelId) {
+                ResourceConnCapabilitiesPanel panel = new ResourceConnCapabilitiesPanel(
+                        panelId,
+                        model,
+                        connectorRestClient.read(model.getObject().getConnector()).getCapabilities());
+                MetaDataRoleAuthorizationStrategy.authorize(panel, ENABLE, StandardEntitlement.CONNECTOR_READ);
+                return panel;
+            }
+        });
+        //--------------------------------
+
+        //--------------------------------
         // Resource security panel
         //--------------------------------
         tabs.add(new AbstractTab(new ResourceModel("security")) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java
index 524f424..2a2d6e9 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java
@@ -41,7 +41,7 @@ public class AjaxCheckBoxPanel extends FieldPanel<Boolean> {
         super(id, name, model);
 
         field = new CheckBox("checkboxField", model);
-        add(field.setLabel(new Model<String>(name)).setOutputMarkupId(true));
+        add(field.setLabel(new Model<>(name)).setOutputMarkupId(true));
 
         if (enableOnChange && !isReadOnly()) {
             field.add(new IndicatorAjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE)
{

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractConnConfPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractConnConfPanel.html
b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractConnConfPanel.html
new file mode 100644
index 0000000..974c9aa
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractConnConfPanel.html
@@ -0,0 +1,33 @@
+<!--
+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:panel>
+    <span wicket:id="connectorPropertiesContainer">
+      <div class="form-group" wicket:id="connectorProperties">
+        <span wicket:id="panel">[panel]</span>
+      </div>
+
+      <div>
+        <a style="position: fixed; top: 70px; right:60px;" wicket:id="check"  href="#">
+          <i class="fa fa-heartbeat fa-2x"></i>
+        </a>
+      </div>
+    </span>
+  </wicket:panel>
+</html>

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.html
b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.html
deleted file mode 100644
index 974c9aa..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.html
+++ /dev/null
@@ -1,33 +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:panel>
-    <span wicket:id="connectorPropertiesContainer">
-      <div class="form-group" wicket:id="connectorProperties">
-        <span wicket:id="panel">[panel]</span>
-      </div>
-
-      <div>
-        <a style="position: fixed; top: 70px; right:60px;" wicket:id="check"  href="#">
-          <i class="fa fa-heartbeat fa-2x"></i>
-        </a>
-      </div>
-    </span>
-  </wicket:panel>
-</html>

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnCapabilitiesPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnCapabilitiesPanel.html
b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnCapabilitiesPanel.html
new file mode 100644
index 0000000..ed50fa5
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnCapabilitiesPanel.html
@@ -0,0 +1,23 @@
+<!--
+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:panel>
+    <span wicket:id="capabilitiesPalette"/> 
+  </wicket:panel>
+</html>

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorCapabilitiesPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorCapabilitiesPanel.html
b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorCapabilitiesPanel.html
deleted file mode 100644
index ed50fa5..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorCapabilitiesPanel.html
+++ /dev/null
@@ -1,23 +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:panel>
-    <span wicket:id="capabilitiesPalette"/> 
-  </wicket:panel>
-</html>

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal_it.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal_it.properties
index 16126ba..50336ec 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal_it.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal_it.properties
@@ -16,7 +16,7 @@
 # under the License.
 general=Generale
 configuration=Configurazione
-capabilities=Capabilities
+capabilities=Capability
 
 bundleName=Bundle name
 version=Versione

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel.html
b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel.html
new file mode 100644
index 0000000..a37390e
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel.html
@@ -0,0 +1,29 @@
+<!--
+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:panel>
+    <div class="form-group">
+      <span wicket:id="overrideCapabilities">[overrideCapabilities]</span>
+    </div>
+
+    <div class="form-group">
+      <span wicket:id="capabilitiesOverride">[capabilitiesOverride]</span>
+    </div>
+  </wicket:panel>
+</html>

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel.properties
new file mode 100644
index 0000000..7e36b0c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel.properties
@@ -0,0 +1,17 @@
+# 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.
+overrideCapabilities=Override Capabilities?

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel_it.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel_it.properties
new file mode 100644
index 0000000..7e36b0c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel_it.properties
@@ -0,0 +1,17 @@
+# 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.
+overrideCapabilities=Override Capabilities?

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel_pt_BR.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel_pt_BR.properties
new file mode 100644
index 0000000..7e36b0c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnCapabilitiesPanel_pt_BR.properties
@@ -0,0 +1,17 @@
+# 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.
+overrideCapabilities=Override Capabilities?

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.properties
index fd3fdce..38500a7 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.properties
@@ -16,7 +16,7 @@
 # under the License.
 general=Resource details
 provisions=Provisioning
-connectorProperties=Connector properties
+connectorProperties=Connector Properties
 security=Security
 
 umapping=User mapping
@@ -65,3 +65,4 @@ objectClass= Object Class
 __ACCOUNT__=ACCOUNT
 __GROUP__=GROUP
 listview.caption=Provisioning configuration instances
+connectorCapabilities=Connector Capabilities

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_it.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_it.properties
index 6c219f3..afb7798 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_it.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_it.properties
@@ -17,7 +17,7 @@
 general=Dettagli Risorsa
 provisions=Provisioning
 umapping=Mapping utenti
-connectorProperties=Propriet\u00e0\u00a0 Connettore
+connectorProperties=Propriet\u00e0\u00a0Connettore
 security=Sicurezza
 required_alert=Tutti i campi sono richiesti
 connector=Connettore
@@ -64,3 +64,4 @@ objectClass=Classe
 __ACCOUNT__=ACCOUNT
 __GROUP__=GROUP
 listview.caption=Istanze di configurazione del provisioning
+connectorCapabilities=Capabilitiey Connettore

http://git-wip-us.apache.org/repos/asf/syncope/blob/bef07264/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_pt_BR.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_pt_BR.properties
index 4b2f0a0..31989cd 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_pt_BR.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_pt_BR.properties
@@ -17,7 +17,7 @@
 general=Detalhes de Recursos
 provisions=Provisioning
 umapping=Mapeamento de usu\u00e1rios
-connectorProperties=Propriedades de Conectores
+connectorProperties=Propriedades do Conector
 security=Seguran\u00e7a
 required_alert=Todos os campos deste formul\u00e1rio s\u00e3o obrigat\u00f3rios
 connector=Conector
@@ -64,3 +64,4 @@ objectClass=Classe
 __ACCOUNT__=ACCOUNT
 __GROUP__=GROUP
 listview.caption=Inst\u00e2ncias de provisionamento de recursos
+connectorCapabilities=Capacidades do Conector


Mime
View raw message