You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by md...@apache.org on 2015/11/24 16:15:53 UTC
syncope git commit: [SYNCOPE-156] Added RelationshipType tab
Repository: syncope
Updated Branches:
refs/heads/master 920e0df4b -> d34b48642
[SYNCOPE-156] Added RelationshipType tab
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/d34b4864
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/d34b4864
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/d34b4864
Branch: refs/heads/master
Commit: d34b48642a0427d27265c83fb6e95ffaea05ae7a
Parents: 920e0df
Author: Marco Di Sabatino Di Diodoro <md...@apache.org>
Authored: Tue Nov 24 16:15:37 2015 +0100
Committer: Marco Di Sabatino Di Diodoro <md...@apache.org>
Committed: Tue Nov 24 16:15:37 2015 +0100
----------------------------------------------------------------------
.../client/console/commons/Constants.java | 2 +
.../syncope/client/console/pages/Types.java | 31 +++
.../console/panels/AbstractTypesPanel.java | 105 ++++++++++
.../console/panels/AnyTypeDetailsPanel.java | 2 +-
.../console/panels/AnyTypeModalPanel.java | 2 +-
.../client/console/panels/AnyTypePanel.java | 69 +------
.../panels/RelationshipTypeDetailsPanel.java | 63 ++++++
.../panels/RelationshipTypeModalPanel.java | 69 +++++++
.../console/panels/RelationshipTypePanel.java | 203 +++++++++++++++++++
.../syncope/client/console/pages/Types.html | 6 +
.../client/console/pages/Types.properties | 1 +
.../client/console/pages/Types_it.properties | 1 +
.../client/console/pages/Types_pt_BR.properties | 1 +
.../console/panels/AbstractTypesPanel.html | 40 ++++
.../panels/AbstractTypesPanel.properties | 19 ++
.../panels/AbstractTypesPanel_it.properties | 19 ++
.../panels/AbstractTypesPanel_pt_BR.properties | 19 ++
.../client/console/panels/AnyTypePanel.html | 39 ----
.../console/panels/AnyTypePanel.properties | 18 --
.../console/panels/AnyTypePanel_it.properties | 18 --
.../panels/AnyTypePanel_pt_BR.properties | 18 --
.../panels/RelationshipTypeDetailsPanel.html | 34 ++++
.../RelationshipTypeDetailsPanel.properties | 18 ++
.../RelationshipTypeDetailsPanel_it.properties | 18 ++
...elationshipTypeDetailsPanel_pt_BR.properties | 18 ++
.../panels/RelationshipTypeModalPanel.html | 24 +++
26 files changed, 698 insertions(+), 159 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java
index 0a8a17f..9d0043c 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java
@@ -56,6 +56,8 @@ public final class Constants {
public static final String PREF_ANYTYPE_PAGINATOR_ROWS = "anytype.paginator.rows";
+ public static final String PREF_RELATIONSHIPTYPE_PAGINATOR_ROWS = "relationshiptype.painator.rows" ;
+
public static final String PREF_GROUP_DETAILS_VIEW = "group.details.view";
public static final String PREF_GROUP_ATTRIBUTES_VIEW = "group.attributes.view";
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/java/org/apache/syncope/client/console/pages/Types.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Types.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Types.java
index 9666847..95eb868 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/Types.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Types.java
@@ -29,6 +29,8 @@ import org.apache.syncope.client.console.panels.AnyTypeClassesPanel;
import org.apache.syncope.client.console.panels.AnyTypeModalPanel;
import org.apache.syncope.client.console.panels.AnyTypePanel;
import org.apache.syncope.client.console.panels.ModalPanel;
+import org.apache.syncope.client.console.panels.RelationshipTypeModalPanel;
+import org.apache.syncope.client.console.panels.RelationshipTypePanel;
import org.apache.syncope.client.console.panels.SchemasPanel;
import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
@@ -48,6 +50,7 @@ import org.apache.syncope.client.console.panels.SchemaModalPanel;
import org.apache.syncope.common.lib.to.AnyTypeClassTO;
import org.apache.syncope.common.lib.to.AnyTypeTO;
import org.apache.syncope.common.lib.to.PlainSchemaTO;
+import org.apache.syncope.common.lib.to.RelationshipTypeTO;
import org.apache.syncope.common.lib.types.StandardEntitlement;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
@@ -61,6 +64,8 @@ public class Types extends BasePage {
private final BaseModal<AnyTypeTO> anyTypeModal;
+ private final BaseModal<RelationshipTypeTO> relationshipTypeModal;
+
private final AjaxBootstrapTabbedPanel<ITab> tabbedPanel;
private enum Type {
@@ -77,6 +82,7 @@ public class Types extends BasePage {
this.schemaModal = new BaseModal<>("schemaModal");
this.anyTypeClassModal = new BaseModal<>("anyTypeClassModal");
this.anyTypeModal = new BaseModal<>("anyTypeModal");
+ this.relationshipTypeModal = new BaseModal<>("relationshipTypeModal");
final WebMarkupContainer content = new WebMarkupContainer("content");
content.add(new Label("header", "Types"));
@@ -110,19 +116,40 @@ public class Types extends BasePage {
createAnyTypeLink, ENABLE, StandardEntitlement.ANYTYPE_CREATE);
}
+ final AjaxLink<Void> createRelationshipTypeLink =
+ buildCreateLink("createRelationshipType", relationshipTypeModal, Type.RELATIONSHIPTYPE);
+ content.add(createRelationshipTypeLink);
+
+ if (SyncopeConsoleSession.get().owns(StandardEntitlement.RELATIONSHIPTYPE_CREATE)) {
+ MetaDataRoleAuthorizationStrategy.authorize(
+ createRelationshipTypeLink, ENABLE, StandardEntitlement.RELATIONSHIPTYPE_CREATE);
+ }
+
add(content);
addWindowWindowClosedCallback(schemaModal);
addWindowWindowClosedCallback(anyTypeClassModal);
addWindowWindowClosedCallback(anyTypeModal);
+ addWindowWindowClosedCallback(relationshipTypeModal);
add(schemaModal);
add(anyTypeClassModal);
add(anyTypeModal);
+ add(relationshipTypeModal);
}
private List<ITab> buildTabList() {
final List<ITab> tabs = new ArrayList<>();
+ tabs.add(new AbstractTab(new Model<>("RelationshipType")) {
+
+ private static final long serialVersionUID = -6815067322125799251L;
+
+ @Override
+ public Panel getPanel(final String panelId) {
+ return new RelationshipTypePanel(panelId, getPageReference(), relationshipTypeModal);
+ }
+ });
+
tabs.add(new AbstractTab(new Model<>("AnyTypes")) {
private static final long serialVersionUID = -6815067322125799251L;
@@ -188,6 +215,10 @@ public class Types extends BasePage {
panel = new AnyTypeModalPanel(anyTypeModal, getPageReference(), true);
break;
case RELATIONSHIPTYPE:
+ relationshipTypeModal.setFormModel(new RelationshipTypeTO());
+ relationshipTypeModal.size(Modal.Size.Medium);
+ panel = new RelationshipTypeModalPanel(relationshipTypeModal, getPageReference(), true);
+ break;
case SCHEMA:
default:
schemaModal.setFormModel(new PlainSchemaTO());
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractTypesPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractTypesPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractTypesPanel.java
new file mode 100644
index 0000000..2a9b968
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractTypesPanel.java
@@ -0,0 +1,105 @@
+/*
+ * 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 org.apache.syncope.client.console.PreferenceManager;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.pages.AbstractBasePage;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AjaxFallbackDataTable;
+import org.apache.syncope.client.console.wicket.markup.html.form.SelectChoiceRenderer;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.PropertyModel;
+
+public class AbstractTypesPanel<T extends AbstractBaseBean> extends Panel {
+
+ private static final long serialVersionUID = 7890071604330629259L;
+
+ protected final PreferenceManager prefMan = new PreferenceManager();
+
+ protected final NotificationPanel feedbackPanel;
+
+ protected final PageReference pageRef;
+
+ protected int pageRows;
+
+ public AbstractTypesPanel(final String id, final PageReference pageRef) {
+ super(id);
+
+ this.pageRef = pageRef;
+ this.feedbackPanel = ((AbstractBasePage) pageRef.getPage()).getFeedbackPanel();
+ }
+
+ protected void buildDataTable(final WebMarkupContainer container, final List<IColumn<T, String>> tableCols,
+ final SortableDataProvider<T, String> provider, final String paginatorKey) {
+
+ final WebMarkupContainer tableContainer = new WebMarkupContainer("tableContainer");
+
+ tableContainer.setOutputMarkupId(true);
+ container.add(tableContainer);
+
+ final AjaxFallbackDataTable<T, String> table =
+ new AjaxFallbackDataTable<>("datatable",
+ tableCols, provider, pageRows, tableContainer);
+
+ table.setOutputMarkupId(true);
+ tableContainer.add(table);
+ container.add(getPaginatorForm(tableContainer, table, "paginator", this, paginatorKey));
+ }
+
+ protected Form<Void> getPaginatorForm(final WebMarkupContainer webContainer,
+ final AjaxFallbackDataTable<T, String> dataTable,
+ final String formname, final Panel panel, final String rowsPerPagePrefName) {
+
+ final Form<Void> form = new Form<>(formname);
+
+ final DropDownChoice<Integer> rowChooser = new DropDownChoice<>("rowsChooser",
+ new PropertyModel<Integer>(panel, "pageRows"), prefMan.getPaginatorChoices(),
+ new SelectChoiceRenderer<Integer>());
+
+ rowChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ prefMan.set(getRequest(), getResponse(), rowsPerPagePrefName, rowChooser.getInput());
+ dataTable.setItemsPerPage(rowChooser.getModelObject());
+ target.add(webContainer);
+ }
+ });
+
+ form.add(rowChooser);
+ return form;
+ }
+
+ protected int getPageRows() {
+ return pageRows;
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeDetailsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeDetailsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeDetailsPanel.java
index 0fe75aa..f5d5a97 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeDetailsPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeDetailsPanel.java
@@ -45,7 +45,7 @@ public class AnyTypeDetailsPanel extends Panel {
private final AnyTypeTO anyTypeTO;
- public AnyTypeDetailsPanel(final String id, final BaseModal<AnyTypeTO> modal, final boolean createFlag) {
+ public AnyTypeDetailsPanel(final String id, final BaseModal<AnyTypeTO> modal) {
super(id);
this.anyTypeTO = modal.getFormModel();
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeModalPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeModalPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeModalPanel.java
index d0ef72f..4e82737 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeModalPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeModalPanel.java
@@ -38,7 +38,7 @@ public class AnyTypeModalPanel extends AbstractModalPanel {
super(modal, pageRef);
this.createFlag = createFlag;
- add(new AnyTypeDetailsPanel("anyTypeDetailsPanel", modal, createFlag));
+ add(new AnyTypeDetailsPanel("anyTypeDetailsPanel", modal));
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypePanel.java
index ab9561b..1c1067f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypePanel.java
@@ -26,22 +26,17 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.client.console.PreferenceManager;
import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
-import org.apache.syncope.client.console.pages.AbstractBasePage;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AjaxFallbackDataTable;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
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.client.console.wicket.markup.html.form.SelectChoiceRenderer;
import org.apache.syncope.common.lib.to.AnyTypeTO;
import org.apache.syncope.common.lib.types.StandardEntitlement;
import org.apache.syncope.common.rest.api.service.AnyTypeService;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
@@ -49,19 +44,15 @@ import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.html.form.DropDownChoice;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
-import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.model.ResourceModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class AnyTypePanel extends Panel {
+public class AnyTypePanel extends AbstractTypesPanel<AnyTypeTO> {
private static final long serialVersionUID = 3905038169553185171L;
@@ -69,40 +60,21 @@ public class AnyTypePanel extends Panel {
private static final String PAGINATOR_ROWS_KEYS = Constants.PREF_ANYTYPE_PAGINATOR_ROWS;
- private final PreferenceManager prefMan = new PreferenceManager();
-
- private final NotificationPanel feedbackPanel;
-
- private final int pageRows;
-
private final BaseModal<AnyTypeTO> modal;
public AnyTypePanel(final String id, final PageReference pageReference, final BaseModal<AnyTypeTO> modal) {
- super(id);
+ super(id, pageReference);
- this.feedbackPanel = ((AbstractBasePage) pageReference.getPage()).getFeedbackPanel();
this.pageRows = prefMan.getPaginatorRows(getRequest(), PAGINATOR_ROWS_KEYS);
this.modal = modal;
final WebMarkupContainer container = new WebMarkupContainer("container");
-
container.setOutputMarkupId(true);
add(container);
- final WebMarkupContainer tableContainer = new WebMarkupContainer("tableContainer");
-
- tableContainer.setOutputMarkupId(true);
- container.add(tableContainer);
-
- final List<IColumn<AnyTypeTO, String>> tableCols = getColumns(tableContainer, pageReference);
+ buildDataTable(container,
+ getColumns(container, pageReference), new AnyTypePanel.AnyTypeProvider(), PAGINATOR_ROWS_KEYS);
- final AjaxFallbackDataTable<AnyTypeTO, String> table =
- new AjaxFallbackDataTable<>("datatable",
- tableCols, new AnyTypePanel.AnyTypeProvider(), pageRows, tableContainer);
-
- table.setOutputMarkupId(true);
- tableContainer.add(table);
- container.add(getPaginatorForm(tableContainer, table, "paginator", this, PAGINATOR_ROWS_KEYS));
}
private <T extends AnyTypeModalPanel> List<IColumn<AnyTypeTO, String>> getColumns(
@@ -206,7 +178,7 @@ public class AnyTypePanel extends Panel {
}
}
- }, ActionLink.ActionType.DELETE, StandardEntitlement.SCHEMA_DELETE);
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.ANYTYPE_DELETE);
item.add(actionLinks.build(componentId));
}
@@ -216,37 +188,6 @@ public class AnyTypePanel extends Panel {
}
- private Form<Void> getPaginatorForm(final WebMarkupContainer webContainer,
- final AjaxFallbackDataTable<AnyTypeTO, String> dataTable,
- final String formname, final AnyTypePanel anyTypePanel, final String rowsPerPagePrefName) {
-
- final Form<Void> form = new Form<>(formname);
-
- final DropDownChoice<Integer> rowChooser = new DropDownChoice<>("rowsChooser",
- new PropertyModel<Integer>(anyTypePanel, "pageRows"), prefMan.getPaginatorChoices(),
- new SelectChoiceRenderer<Integer>());
-
- rowChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
-
- private static final long serialVersionUID = -1107858522700306810L;
-
- @Override
- protected void onUpdate(final AjaxRequestTarget target) {
- prefMan.set(getRequest(), getResponse(), rowsPerPagePrefName, rowChooser.getInput());
- dataTable.setItemsPerPage(rowChooser.getModelObject());
- target.add(webContainer);
- }
- });
-
- form.add(rowChooser);
- return form;
- }
-
- public int getPageRows() {
- return pageRows;
-
- }
-
private final class AnyTypeProvider extends SortableDataProvider<AnyTypeTO, String> {
private static final long serialVersionUID = -185944053385660794L;
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel.java
new file mode 100644
index 0000000..e1fd9fc
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel.java
@@ -0,0 +1,63 @@
+/*
+ * 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 org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.to.RelationshipTypeTO;
+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.CompoundPropertyModel;
+import org.apache.wicket.model.PropertyModel;
+
+public class RelationshipTypeDetailsPanel extends Panel {
+
+ private static final long serialVersionUID = -4962850669086306255L;
+
+ private final RelationshipTypeTO relationshipTypeTO;
+
+ public RelationshipTypeDetailsPanel(
+ final String id,
+ final BaseModal<RelationshipTypeTO> modal) {
+ super(id);
+
+ this.relationshipTypeTO = modal.getFormModel();
+
+ final WebMarkupContainer container = new WebMarkupContainer("container");
+ container.setOutputMarkupId(true);
+ add(container);
+
+ final Form<RelationshipTypeTO> form = new Form<>("form");
+ form.setModel(new CompoundPropertyModel<>(this.relationshipTypeTO));
+ container.add(form);
+
+ final AjaxTextFieldPanel key =
+ new AjaxTextFieldPanel("key", getString("key"), new PropertyModel<String>(relationshipTypeTO, "key"));
+ key.addRequiredLabel();
+ key.setEnabled(key.getModelObject() == null || key.getModelObject().isEmpty());
+ form.add(key);
+
+ final AjaxTextFieldPanel description =
+ new AjaxTextFieldPanel("description",
+ getString("description"), new PropertyModel<String>(relationshipTypeTO, "description"));
+ description.addRequiredLabel();
+ form.add(description);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipTypeModalPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipTypeModalPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipTypeModalPanel.java
new file mode 100644
index 0000000..a37e70c
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipTypeModalPanel.java
@@ -0,0 +1,69 @@
+/*
+ * 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 static org.apache.syncope.client.console.panels.AbstractModalPanel.LOG;
+
+import org.apache.syncope.client.console.SyncopeConsoleSession;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.pages.AbstractBasePage;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.common.lib.to.RelationshipTypeTO;
+import org.apache.syncope.common.rest.api.service.RelationshipTypeService;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.markup.html.form.Form;
+
+public class RelationshipTypeModalPanel extends AbstractModalPanel {
+
+ private static final long serialVersionUID = 1602285111803121341L;
+
+ private final boolean createFlag;
+
+ public RelationshipTypeModalPanel(
+ final BaseModal<RelationshipTypeTO> modal,
+ final PageReference pageRef, final boolean createFlag) {
+ super(modal, pageRef);
+
+ this.createFlag = createFlag;
+ add(new RelationshipTypeDetailsPanel("relationshipTypeDetails", modal));
+ }
+
+ @Override
+ public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ try {
+ final RelationshipTypeTO updateRelationshipTypeTO = RelationshipTypeTO.class.cast(form.getModelObject());
+
+ if (createFlag) {
+ SyncopeConsoleSession.get().getService(RelationshipTypeService.class).create(updateRelationshipTypeTO);
+ } else {
+ SyncopeConsoleSession.get().getService(RelationshipTypeService.class).update(updateRelationshipTypeTO);
+ }
+
+ if (pageRef.getPage() instanceof AbstractBasePage) {
+ ((AbstractBasePage) pageRef.getPage()).setModalResult(true);
+ }
+ modal.close(target);
+ } catch (Exception e) {
+ LOG.error("While creating or updating RelationshipTypeTO", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ modal.getFeedbackPanel().refresh(target);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipTypePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipTypePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipTypePanel.java
new file mode 100644
index 0000000..7ec1411
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipTypePanel.java
@@ -0,0 +1,203 @@
+/*
+ * 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.io.Serializable;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.SyncopeConsoleSession;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+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.RelationshipTypeTO;
+import org.apache.syncope.common.lib.types.StandardEntitlement;
+import org.apache.syncope.common.rest.api.service.RelationshipTypeService;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RelationshipTypePanel extends AbstractTypesPanel<RelationshipTypeTO> {
+
+ private static final long serialVersionUID = -3731778000138547357L;
+
+ private static final Logger LOG = LoggerFactory.getLogger(RelationshipTypePanel.class);
+
+ private static final String PAGINATOR_ROWS_KEYS = Constants.PREF_RELATIONSHIPTYPE_PAGINATOR_ROWS;
+
+ private final BaseModal<RelationshipTypeTO> modal;
+
+ public RelationshipTypePanel(
+ final String panelId,
+ final PageReference pageReference,
+ final BaseModal<RelationshipTypeTO> modal) {
+ super(panelId, pageReference);
+
+ this.pageRows = prefMan.getPaginatorRows(getRequest(), PAGINATOR_ROWS_KEYS);
+ this.modal = modal;
+
+ final WebMarkupContainer container = new WebMarkupContainer("container");
+ container.setOutputMarkupId(true);
+ add(container);
+
+ buildDataTable(container, getColumns(container, pageReference),
+ new RelationshipTypePanel.RelationshipTypeProvider(), PAGINATOR_ROWS_KEYS);
+ }
+
+ private List<IColumn<RelationshipTypeTO, String>> getColumns(
+ final WebMarkupContainer webContainer, final PageReference pageReference) {
+
+ final List<IColumn<RelationshipTypeTO, String>> columns = new ArrayList<>();
+
+ for (Field field : RelationshipTypeTO.class.getDeclaredFields()) {
+
+ if (field != null && !Modifier.isStatic(field.getModifiers())) {
+ final String fieldName = field.getName();
+
+ final IColumn<RelationshipTypeTO, String> column =
+ new PropertyColumn<RelationshipTypeTO, String>(
+ new ResourceModel(field.getName()), field.getName(), field.getName()) {
+
+ private static final long serialVersionUID = 3282547854226892169L;
+
+ @Override
+ public String getCssClass() {
+ String css = super.getCssClass();
+ if ("key".equals(fieldName)) {
+ css = StringUtils.isBlank(css)
+ ? "medium_fixedsize"
+ : css + " medium_fixedsize";
+ }
+ return css;
+ }
+ };
+ columns.add(column);
+
+ }
+ }
+
+ columns.add(new AbstractColumn<RelationshipTypeTO, String>(new ResourceModel("actions", "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public String getCssClass() {
+ return "action";
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<RelationshipTypeTO>> item, final String componentId,
+ final IModel<RelationshipTypeTO> model) {
+
+ final RelationshipTypeTO relationshipTypeTO = model.getObject();
+
+ final ActionLinksPanel.Builder<Serializable> actionLinks = ActionLinksPanel.builder(pageReference);
+ actionLinks.setDisableIndicator(true);
+ actionLinks.addWithRoles(new ActionLink<Serializable>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
+ modal.header(Model.of(relationshipTypeTO.getKey()));
+ modal.setFormModel(relationshipTypeTO);
+ target.add(modal.setContent(new RelationshipTypeModalPanel(modal, pageReference, false)));
+ modal.addSumbitButton();
+ modal.show(true);
+ }
+ }, ActionLink.ActionType.EDIT, StandardEntitlement.RELATIONSHIPTYPE_UPDATE).addWithRoles(
+ new ActionLink<Serializable>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
+ try {
+ SyncopeConsoleSession.get().getService(
+ RelationshipTypeService.class).delete(relationshipTypeTO.getKey());
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ feedbackPanel.refresh(target);
+ target.add(webContainer);
+ } catch (Exception e) {
+ LOG.error("While deleting RelationshipType", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.RELATIONSHIPTYPE_DELETE);
+
+ item.add(actionLinks.build(componentId));
+ }
+ });
+
+ return columns;
+
+ }
+
+ private final class RelationshipTypeProvider extends SortableDataProvider<RelationshipTypeTO, String> {
+
+ private static final long serialVersionUID = -185944053385660794L;
+
+ private final SortableDataProviderComparator<RelationshipTypeTO> comparator;
+
+ private RelationshipTypeProvider() {
+ super();
+ setSort("key", SortOrder.ASCENDING);
+ comparator = new SortableDataProviderComparator<>(this);
+ }
+
+ @Override
+ public Iterator<RelationshipTypeTO> iterator(final long first, final long count) {
+ final List<RelationshipTypeTO> list =
+ SyncopeConsoleSession.get().getService(RelationshipTypeService.class).list();
+ Collections.sort(list, comparator);
+ return list.subList((int) first, (int) first + (int) count).iterator();
+ }
+
+ @Override
+ public long size() {
+ return SyncopeConsoleSession.get().getService(RelationshipTypeService.class).list().size();
+ }
+
+ @Override
+ public IModel<RelationshipTypeTO> model(final RelationshipTypeTO object) {
+ return new CompoundPropertyModel<>(object);
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types.html
index 4796461..e04c84d 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types.html
@@ -29,6 +29,11 @@ under the License.
<div class="box-tools pull-right">
<ul class="nav navbar-nav actions">
<li>
+ <a wicket:message="title:createRelationshipType" wicket:id="createRelationshipType">
+ <i class="glyphicon glyphicon-link"></i>
+ </a>
+ </li>
+ <li>
<a wicket:message="title:createAnyType" wicket:id="createAnyType">
<i class="glyphicon glyphicon-leaf"></i>
</a>
@@ -57,5 +62,6 @@ under the License.
<div wicket:id="schemaModal"></div>
<div wicket:id="anyTypeClassModal"></div>
<div wicket:id="anyTypeModal"></div>
+ <div wicket:id="relationshipTypeModal"></div>
</wicket:extend>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types.properties
index 609c194..0b0a53b 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types.properties
@@ -17,3 +17,4 @@
createSchema=Create new schema
createAnyTypeClass=Create new AnyTypeClass
createAnyType=Create new AnyType
+createRelationshipType=Create new RelationshipType
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types_it.properties
index ccafc7e..0edc2f1 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types_it.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types_it.properties
@@ -17,3 +17,4 @@
createSchema=Crea un nuovo Schema
createAnyTypeClass=Crea un nuovo AnyTypeClass
createAnyType=Crea un nuovo AnyType
+createRelationshipType=Crea un nuovo RelationshipType
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types_pt_BR.properties
index ab8c4e0..64762c2 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types_pt_BR.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Types_pt_BR.properties
@@ -17,3 +17,4 @@
createSchema=Cria um novo Schema
createAnyTypeClass=Cria um novo AnyTypeClass
createAnyType=Cria um novo AnyType
+createRelationshipType=Cria um novo RelationshipType
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractTypesPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractTypesPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractTypesPanel.html
new file mode 100644
index 0000000..99f4b22
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractTypesPanel.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!--
+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 wicket:id="container">
+ <span wicket:id="tableContainer">
+ <table class="table table-bordered table-hover dataTable" wicket:id="datatable">[datatable]</table>
+ </span>
+ <span style="float:right">
+ <form wicket:id="paginator" style="display:inline">
+ <div class="col-sm-6">
+ <div class="dataTables_length">
+ <label>
+ <wicket:message key="displayRows"/>
+ <select class="form-control input-sm" wicket:id="rowsChooser"/>
+ </label>
+ </div>
+ </div>
+ </form>
+ </span>
+ </div>
+ </wicket:panel>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractTypesPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractTypesPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractTypesPanel.properties
new file mode 100644
index 0000000..460d0e4
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractTypesPanel.properties
@@ -0,0 +1,19 @@
+# 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.
+description=Description
+kind=Kind
+classes=AnyTypeClasses
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractTypesPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractTypesPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractTypesPanel_it.properties
new file mode 100644
index 0000000..11e9066
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractTypesPanel_it.properties
@@ -0,0 +1,19 @@
+# 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.
+description=Description
+kind=Tipo
+classes=AnyTypeClasses
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractTypesPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractTypesPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractTypesPanel_pt_BR.properties
new file mode 100644
index 0000000..11e9066
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractTypesPanel_pt_BR.properties
@@ -0,0 +1,19 @@
+# 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.
+description=Description
+kind=Tipo
+classes=AnyTypeClasses
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyTypePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyTypePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyTypePanel.html
deleted file mode 100644
index 57f1764..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyTypePanel.html
+++ /dev/null
@@ -1,39 +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>
- <div wicket:id="container">
- <span wicket:id="tableContainer">
- <table class="table table-bordered table-hover dataTable" wicket:id="datatable">[datatable]</table>
- </span>
- <span style="float:right">
- <form wicket:id="paginator" style="display:inline">
- <div class="col-sm-6">
- <div class="dataTables_length">
- <label>
- <wicket:message key="displayRows"/>
- <select class="form-control input-sm" wicket:id="rowsChooser"/>
- </label>
- </div>
- </div>
- </form>
- </span>
- </div>
- </wicket:panel>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyTypePanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyTypePanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyTypePanel.properties
deleted file mode 100644
index 6344889..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyTypePanel.properties
+++ /dev/null
@@ -1,18 +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.
-kind=Kind
-classes=AnyTypeClasses
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyTypePanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyTypePanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyTypePanel_it.properties
deleted file mode 100644
index e0d2fdc..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyTypePanel_it.properties
+++ /dev/null
@@ -1,18 +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.
-kind=Tipo
-classes=AnyTypeClasses
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyTypePanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyTypePanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyTypePanel_pt_BR.properties
deleted file mode 100644
index e0d2fdc..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyTypePanel_pt_BR.properties
+++ /dev/null
@@ -1,18 +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.
-kind=Tipo
-classes=AnyTypeClasses
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel.html
new file mode 100644
index 0000000..c0d9fc2
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel.html
@@ -0,0 +1,34 @@
+<!--
+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="container">
+ <div class="form-group">
+ <form wicket:id="form">
+ <div class="form-group">
+ <span wicket:id="key">[key]</span>
+ </div>
+ <div class="form-group">
+ <span wicket:id="description">[description]</span>
+ </div>
+ </form>
+ </div>
+ </span>
+ </wicket:panel>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel.properties
new file mode 100644
index 0000000..10a4181
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel.properties
@@ -0,0 +1,18 @@
+# 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.
+
+description=Description
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel_it.properties
new file mode 100644
index 0000000..10a4181
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel_it.properties
@@ -0,0 +1,18 @@
+# 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.
+
+description=Description
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel_pt_BR.properties
new file mode 100644
index 0000000..7dc389b
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeDetailsPanel_pt_BR.properties
@@ -0,0 +1,18 @@
+# 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.
+
+description=Descri\u00e7\u00e3o
http://git-wip-us.apache.org/repos/asf/syncope/blob/d34b4864/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeModalPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeModalPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeModalPanel.html
new file mode 100644
index 0000000..e243bbb
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RelationshipTypeModalPanel.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<!--
+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:extend>
+ <div wicket:id="relationshipTypeDetails">[relationshipTypeDetails]</div>
+ </wicket:extend>
+</html>