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 2016/01/21 16:13:46 UTC
syncope git commit: [SYNCOPE-156] Removed configuration parameters
from AnyTypeClassDetailsPanel
Repository: syncope
Updated Branches:
refs/heads/master e4373b321 -> 0f8dbd498
[SYNCOPE-156] Removed configuration parameters from AnyTypeClassDetailsPanel
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/0f8dbd49
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/0f8dbd49
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/0f8dbd49
Branch: refs/heads/master
Commit: 0f8dbd498792dd4988c9ead0ea357b9f4aaa24fc
Parents: e4373b3
Author: Marco Di Sabatino Di Diodoro <md...@apache.org>
Authored: Thu Jan 21 16:13:07 2016 +0100
Committer: Marco Di Sabatino Di Diodoro <md...@apache.org>
Committed: Thu Jan 21 16:13:07 2016 +0100
----------------------------------------------------------------------
.../panels/AnyTypeClassDetailsPanel.java | 24 ++++++++++++++++++++
1 file changed, 24 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/0f8dbd49/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassDetailsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassDetailsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassDetailsPanel.java
index 622ce5a..620afab 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassDetailsPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassDetailsPanel.java
@@ -18,13 +18,19 @@
*/
package org.apache.syncope.client.console.panels;
+import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.Transformer;
import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.rest.SchemaRestClient;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPalettePanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.common.lib.to.AnyTypeClassTO;
+import org.apache.syncope.common.lib.to.AttrTO;
import org.apache.syncope.common.rest.api.service.AnyTypeClassService;
+import org.apache.syncope.common.rest.api.service.ConfigurationService;
import org.apache.wicket.markup.html.TransparentWebMarkupContainer;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.panel.Panel;
@@ -46,6 +52,10 @@ public class AnyTypeClassDetailsPanel extends Panel {
private final List<String> availableVirSchemas = schemaRestClient.getVirSchemaNames();
+ private static final List<String> LAYOUT_PARAMETERS =
+ Arrays.asList(new String[] { "admin.user.layout", "self.user.layout",
+ "admin.group.layout", "self.group.layout", "admin.membership.layout", "self.membership.layout" });
+
public AnyTypeClassDetailsPanel(final String id, final AnyTypeClassTO anyTypeClassTO) {
super(id);
@@ -106,6 +116,17 @@ public class AnyTypeClassDetailsPanel extends Panel {
private void buildAvailableSchemas(final String key) {
+ List<String> configurationSchemas = new ArrayList<>();
+ CollectionUtils.collect(SyncopeConsoleSession.get().
+ getService(ConfigurationService.class).list(),
+ new Transformer<AttrTO, String>() {
+
+ @Override
+ public String transform(final AttrTO attrTO) {
+ return attrTO.getSchema();
+ }
+ }, configurationSchemas);
+
for (AnyTypeClassTO item : SyncopeConsoleSession.get().getService(AnyTypeClassService.class).list()) {
if (key == null || !item.getKey().equals(key)) {
availablePlainSchemas.removeAll(item.getPlainSchemas());
@@ -113,5 +134,8 @@ public class AnyTypeClassDetailsPanel extends Panel {
availableVirSchemas.removeAll(item.getVirSchemas());
}
}
+
+ availablePlainSchemas.removeAll(configurationSchemas);
+ availablePlainSchemas.removeAll(LAYOUT_PARAMETERS);
}
}