syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [29/30] syncope git commit: [SYNCOPE-740] Release process in place, now time to check if it works
Date Wed, 16 Dec 2015 13:38:48 GMT
http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/Constants.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/Constants.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/Constants.java
deleted file mode 100644
index 0b8391a..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/Constants.java
+++ /dev/null
@@ -1,110 +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.commons;
-
-public final class Constants {
-
-    public static final String ON_CLICK = "onclick";
-
-    public static final String ON_CHANGE = "onchange";
-
-    public static final String ON_BLUR = "onblur";
-
-    public static final String PNG_EXT = ".png";
-
-    public static final String FEEDBACK = "feedback";
-
-    public static final String OPERATION_SUCCEEDED = "operation_succeeded";
-
-    public static final String OPERATION_ERROR = "operation_error";
-
-    public static final String SEARCH_ERROR = "search_error";
-
-    public static final String ERROR = "error";
-
-    public static final String PARAM_PASSWORD_RESET_TOKEN = "pwdResetToken";
-
-    public static final String PREF_USERS_DETAILS_VIEW = "users.details.view";
-
-    public static final String PREF_USERS_ATTRIBUTES_VIEW = "users.attributes.view";
-
-    public static final String PREF_USERS_DERIVED_ATTRIBUTES_VIEW = "users.derived.attributes.view";
-
-    public static final String PREF_USERS_VIRTUAL_ATTRIBUTES_VIEW = "users.virtual.attributes.view";
-
-    public static final String PREF_CONF_SCHEMA_PAGINATOR_ROWS = "conf.schema.paginator.rows";
-
-    public static final String PREF_USER_PLAIN_SCHEMA_PAGINATOR_ROWS = "user.schema.paginator.rows";
-
-    public static final String PREF_USER_DER_SCHEMA_PAGINATOR_ROWS = "user.derived.schema.paginator.rows";
-
-    public static final String PREF_USER_VIR_SCHEMA_PAGINATOR_ROWS = "user.virtual.schema.paginator.rows";
-
-    public static final String PREF_GROUP_PLAIN_SCHEMA_PAGINATOR_ROWS = "group.schema.paginator.rows";
-
-    public static final String PREF_GROUP_DER_SCHEMA_PAGINATOR_ROWS = "group.derived.schema.paginator.rows";
-
-    public static final String PREF_GROUP_VIR_SCHEMA_PAGINATOR_ROWS = "group.virtual.schema.paginator.rows";
-
-    public static final String PREF_MEMBERSHIP_PLAIN_SCHEMA_PAGINATOR_ROWS = "membership.schema.paginator.rows";
-
-    public static final String PREF_MEMBERSHIP_DER_SCHEMA_PAGINATOR_ROWS = "membership.derived.aschema.paginator.rows";
-
-    public static final String PREF_MEMBERSHIP_VIR_SCHEMA_PAGINATOR_ROWS = "membership.virtual.aschema.paginator.rows";
-
-    public static final String PREF_USERS_PAGINATOR_ROWS = "users.paginator.rows";
-
-    public static final String PREF_RESOURCES_PAGINATOR_ROWS = "resources.paginator.rows";
-
-    public static final String PREF_CONNECTORS_PAGINATOR_ROWS = "connectors.paginator.rows";
-
-    public static final String PREF_NOTIFICATION_PAGINATOR_ROWS = "notification.paginator.rows";
-
-    public static final String PREF_PROPAGATION_TASKS_PAGINATOR_ROWS = "proagationtasks.paginator.rows";
-
-    public static final String PREF_NOTIFICATION_TASKS_PAGINATOR_ROWS = "notificationtasks.paginator.rows";
-
-    public static final String PREF_SCHED_TASKS_PAGINATOR_ROWS = "schedtasks.paginator.rows";
-
-    public static final String PREF_SYNC_TASKS_PAGINATOR_ROWS = "synctasks.paginator.rows";
-
-    public static final String PREF_TODO_PAGINATOR_ROWS = "todo.paginator.rows";
-
-    public static final String PREF_REPORT_PAGINATOR_ROWS = "report.paginator.rows";
-
-    public static final String PAGEPARAM_CREATE = "CREATE";
-
-    public static final String PAGEPARAM_CURRENT_PAGE = "_current_page";
-
-    public static final String PREF_POLICY_PAGINATOR_ROWS = "policy.paginator.rows";
-
-    /**
-     * ConnId's GuardedString is not in the classpath.
-     */
-    public static final String GUARDED_STRING = "org.identityconnectors.common.security.GuardedString";
-
-    /**
-     * ConnId's GuardedByteArray is not in the classpath.
-     */
-    public static final String GUARDED_BYTE_ARRAY = "org.identityconnectors.common.security.GuardedByteArray";
-
-    private Constants() {
-        // private constructor for static utility class
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/DateFormatROModel.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/DateFormatROModel.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/DateFormatROModel.java
deleted file mode 100644
index e72b7d0..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/DateFormatROModel.java
+++ /dev/null
@@ -1,50 +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.commons;
-
-import java.util.Date;
-import org.apache.syncope.client.console.SyncopeSession;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.PropertyModel;
-
-public class DateFormatROModel implements IModel<String> {
-
-    private static final long serialVersionUID = 6677274580927636121L;
-
-    private final PropertyModel model;
-
-    public DateFormatROModel(final PropertyModel model) {
-        this.model = model;
-    }
-
-    @Override
-    public String getObject() {
-        return model.getObject() == null
-                ? ""
-                : SyncopeSession.get().getDateFormat().format((Date) model.getObject());
-    }
-
-    @Override
-    public void setObject(final String object) {
-    }
-
-    @Override
-    public void detach() {
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/GroupTreeBuilder.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/GroupTreeBuilder.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/GroupTreeBuilder.java
deleted file mode 100644
index bc7d21b..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/GroupTreeBuilder.java
+++ /dev/null
@@ -1,128 +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.commons;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.TreeModel;
-import org.apache.syncope.client.console.rest.GroupRestClient;
-import org.apache.syncope.common.lib.to.GroupTO;
-import org.springframework.beans.factory.annotation.Autowired;
-
-public class GroupTreeBuilder {
-
-    @Autowired
-    private GroupRestClient restClient;
-
-    private final GroupTOComparator comparator = new GroupTOComparator();
-
-    private List<GroupTO> allGroups;
-
-    private List<GroupTO> getChildGroups(final long parentGroupId, final List<GroupTO> groups) {
-        List<GroupTO> result = new ArrayList<>();
-        for (GroupTO group : groups) {
-            if (group.getParent() == parentGroupId) {
-                result.add(group);
-            }
-        }
-
-        Collections.sort(result, comparator);
-        return result;
-    }
-
-    private void populateSubtree(final DefaultMutableTreeNode subRoot, final List<GroupTO> groups) {
-        GroupTO group = (GroupTO) subRoot.getUserObject();
-
-        DefaultMutableTreeNode child;
-        for (GroupTO subGroupTO : getChildGroups(group.getKey(), groups)) {
-            child = new DefaultMutableTreeNode(subGroupTO);
-            subRoot.add(child);
-            populateSubtree(child, groups);
-        }
-    }
-
-    public List<GroupTO> getAllGroups() {
-        return this.allGroups;
-    }
-
-    public TreeModel build() {
-        this.allGroups = this.restClient.list();
-        return build(this.allGroups);
-    }
-
-    public TreeModel build(final List<GroupTO> groups) {
-        DefaultMutableTreeNode fakeroot = new DefaultMutableTreeNode(new FakeRootGroupTO());
-
-        populateSubtree(fakeroot, groups);
-
-        return new DefaultTreeModel(fakeroot);
-    }
-
-    public GroupTO findGroup(final long groupKey) {
-        GroupTO found = null;
-        if (getAllGroups() != null) {
-            for (GroupTO groupTO : getAllGroups()) {
-                if (groupTO.getKey() == groupKey) {
-                    found = groupTO;
-                }
-            }
-        }
-        return found;
-    }
-
-    private static class GroupTOComparator implements Comparator<GroupTO>, Serializable {
-
-        private static final long serialVersionUID = 7085057398406518811L;
-
-        @Override
-        public int compare(final GroupTO r1, final GroupTO r2) {
-            if (r1.getKey() < r2.getKey()) {
-                return -1;
-            }
-            if (r1.getKey() == r2.getKey()) {
-                return 0;
-            }
-
-            return 1;
-        }
-    }
-
-    private static class FakeRootGroupTO extends GroupTO {
-
-        private static final long serialVersionUID = 4839183625773925488L;
-
-        public FakeRootGroupTO() {
-            super();
-
-            setKey(0);
-            setName("");
-            setParent(-1);
-        }
-
-        @Override
-        public String getDisplayName() {
-            return "";
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/HttpResourceStream.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/HttpResourceStream.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/HttpResourceStream.java
deleted file mode 100644
index feeba85..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/HttpResourceStream.java
+++ /dev/null
@@ -1,101 +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.commons;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.wicket.util.lang.Bytes;
-import org.apache.wicket.util.resource.AbstractResourceStream;
-import org.apache.wicket.util.resource.IFixedLocationResourceStream;
-import org.apache.wicket.util.resource.ResourceStreamNotFoundException;
-
-public class HttpResourceStream extends AbstractResourceStream implements IFixedLocationResourceStream {
-
-    private static final long serialVersionUID = 5811207817876330189L;
-
-    private transient InputStream inputStream;
-
-    private String contentType;
-
-    private String location;
-
-    private String filename;
-
-    public HttpResourceStream(final Response response) {
-        super();
-
-        Object entity = response.getEntity();
-        if (response.getStatusInfo().getStatusCode() == Response.Status.OK.getStatusCode()
-                && (entity instanceof InputStream)) {
-
-            this.inputStream = (InputStream) entity;
-            this.contentType = response.getHeaderString(HttpHeaders.CONTENT_TYPE);
-            this.location = response.getLocation() == null ? null : response.getLocation().toASCIIString();
-            String contentDisposition = response.getHeaderString(HttpHeaders.CONTENT_DISPOSITION);
-            if (StringUtils.isNotBlank(contentDisposition)) {
-                String[] splitted = contentDisposition.split("=");
-                if (splitted != null && splitted.length > 1) {
-                    this.filename = splitted[1].trim();
-                }
-            }
-        }
-    }
-
-    @Override
-    public InputStream getInputStream()
-            throws ResourceStreamNotFoundException {
-
-        return inputStream == null
-                ? new ByteArrayInputStream(new byte[0])
-                : inputStream;
-    }
-
-    @Override
-    public Bytes length() {
-        return inputStream == null
-                ? Bytes.bytes(0)
-                : null;
-    }
-
-    @Override
-    public void close() throws IOException {
-        // No need for explict closing
-    }
-
-    @Override
-    public String locationAsString() {
-        return location;
-    }
-
-    @Override
-    public String getContentType() {
-        return contentType == null
-                ? MediaType.APPLICATION_OCTET_STREAM
-                : contentType;
-    }
-
-    public String getFilename() {
-        return filename;
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/JexlHelpUtils.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/JexlHelpUtils.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/JexlHelpUtils.java
deleted file mode 100644
index ab8dcfb..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/JexlHelpUtils.java
+++ /dev/null
@@ -1,59 +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.commons;
-
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.AjaxLink;
-import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.html.link.ExternalLink;
-
-public final class JexlHelpUtils {
-
-    private static final String JEXL_SYNTAX_URL = "http://commons.apache.org/jexl/reference/syntax.html";
-
-    private JexlHelpUtils() {
-        // private constructor for static utility class
-    }
-
-    public static WebMarkupContainer getJexlHelpWebContainer(final String wicketId) {
-        final WebMarkupContainer jexlHelp = new WebMarkupContainer(wicketId);
-        jexlHelp.setVisible(false);
-        jexlHelp.setOutputMarkupPlaceholderTag(true);
-        jexlHelp.setOutputMarkupId(true);
-        jexlHelp.add(new ExternalLink("jexlLink", JEXL_SYNTAX_URL));
-        return jexlHelp;
-    }
-
-    public static AjaxLink<Void> getAjaxLink(final WebMarkupContainer wmc, final String wicketId) {
-        AjaxLink<Void> questionMarkJexlHelp = new AjaxLink<Void>(wicketId) {
-
-            private static final long serialVersionUID = -1838017408000591382L;
-
-            private boolean toogle = false;
-
-            @Override
-            public void onClick(final AjaxRequestTarget target) {
-                toogle ^= true;
-                wmc.setVisible(toogle);
-                target.add(wmc);
-            }
-        };
-        return questionMarkJexlHelp;
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/MapChoiceRenderer.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/MapChoiceRenderer.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/MapChoiceRenderer.java
deleted file mode 100644
index 118db6d..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/MapChoiceRenderer.java
+++ /dev/null
@@ -1,43 +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.commons;
-
-import java.util.Map;
-import org.apache.wicket.markup.html.form.IChoiceRenderer;
-
-public class MapChoiceRenderer<T, K> implements IChoiceRenderer<T> {
-
-    private static final long serialVersionUID = -7452881117778186644L;
-
-    private final Map<T, K> map;
-
-    public MapChoiceRenderer(final Map<T, K> map) {
-        this.map = map;
-    }
-
-    @Override
-    public Object getDisplayValue(final T key) {
-        return map.get(key);
-    }
-
-    @Override
-    public String getIdValue(final T key, final int index) {
-        return key.toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/Mode.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/Mode.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/Mode.java
deleted file mode 100644
index 27dad64..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/Mode.java
+++ /dev/null
@@ -1,27 +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.commons;
-
-public enum Mode {
-
-    ADMIN,
-    SELF,
-    TEMPLATE;
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/PreferenceManager.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/PreferenceManager.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/PreferenceManager.java
deleted file mode 100644
index a4e246e..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/PreferenceManager.java
+++ /dev/null
@@ -1,176 +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.commons;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.core.type.TypeReference;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.apache.commons.lang3.math.NumberUtils;
-import org.apache.wicket.request.Request;
-import org.apache.wicket.request.Response;
-import org.apache.wicket.util.cookies.CookieDefaults;
-import org.apache.wicket.util.cookies.CookieUtils;
-import org.apache.wicket.util.crypt.Base64;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.util.StringUtils;
-
-public class PreferenceManager {
-
-    /**
-     * Logger.
-     */
-    private static final Logger LOG = LoggerFactory.getLogger(PreferenceManager.class);
-
-    private static final String PREFMAN_KEY = "prefMan";
-
-    private static final int ONE_YEAR_TIME = 60 * 60 * 24 * 365;
-
-    private static final TypeReference<Map<String, String>> MAP_TYPE_REF = new TypeReference<Map<String, String>>() {
-    };
-
-    private static final List<Integer> PAGINATOR_CHOICES = Arrays.asList(new Integer[] { 10, 25, 50 });
-
-    private final ObjectMapper mapper;
-
-    private final CookieUtils cookieUtils;
-
-    public PreferenceManager() {
-        this.mapper = new ObjectMapper();
-
-        CookieDefaults cookieDefaults = new CookieDefaults();
-        cookieDefaults.setMaxAge(ONE_YEAR_TIME);
-        this.cookieUtils = new CookieUtils(cookieDefaults);
-    }
-
-    public List<Integer> getPaginatorChoices() {
-        return PAGINATOR_CHOICES;
-    }
-
-    private Map<String, String> getPrefs(final String value) {
-        Map<String, String> prefs;
-        try {
-            if (StringUtils.hasText(value)) {
-                prefs = mapper.readValue(value, MAP_TYPE_REF);
-            } else {
-                throw new Exception("Invalid cookie value '" + value + "'");
-            }
-        } catch (Exception e) {
-            LOG.debug("No preferences found", e);
-            prefs = new HashMap<String, String>();
-        }
-
-        return prefs;
-    }
-
-    private String setPrefs(final Map<String, String> prefs) throws IOException {
-        StringWriter writer = new StringWriter();
-        mapper.writeValue(writer, prefs);
-
-        return writer.toString();
-    }
-
-    public String get(final Request request, final String key) {
-        String result = null;
-
-        String prefString = cookieUtils.load(PREFMAN_KEY);
-        if (prefString != null) {
-            final Map<String, String> prefs = getPrefs(new String(Base64.decodeBase64(prefString.getBytes())));
-            result = prefs.get(key);
-        }
-
-        return result;
-    }
-
-    public Integer getPaginatorRows(final Request request, final String key) {
-        Integer result = getPaginatorChoices().get(0);
-
-        String value = get(request, key);
-        if (value != null) {
-            result = NumberUtils.toInt(value, 10);
-        }
-
-        return result;
-    }
-
-    public List<String> getList(final Request request, final String key) {
-        final List<String> result = new ArrayList<String>();
-
-        final String compound = get(request, key);
-
-        if (StringUtils.hasText(compound)) {
-            String[] items = compound.split(";");
-            result.addAll(Arrays.asList(items));
-        }
-
-        return result;
-    }
-
-    public void set(final Request request, final Response response, final Map<String, List<String>> prefs) {
-        Map<String, String> current = new HashMap<>();
-
-        String prefString = cookieUtils.load(PREFMAN_KEY);
-        if (prefString != null) {
-            current.putAll(getPrefs(new String(Base64.decodeBase64(prefString.getBytes()))));
-        }
-
-        // after retrieved previous setting in order to overwrite the key ...
-        for (Map.Entry<String, List<String>> entry : prefs.entrySet()) {
-            current.put(entry.getKey(), StringUtils.collectionToDelimitedString(entry.getValue(), ";"));
-        }
-
-        try {
-            cookieUtils.save(PREFMAN_KEY, new String(Base64.encodeBase64(setPrefs(current).getBytes())));
-        } catch (IOException e) {
-            LOG.error("Could not save {} info: {}", getClass().getSimpleName(), current, e);
-        }
-    }
-
-    public void set(final Request request, final Response response, final String key, final String value) {
-        String prefString = cookieUtils.load(PREFMAN_KEY);
-
-        final Map<String, String> current = new HashMap<>();
-        if (prefString != null) {
-            current.putAll(getPrefs(new String(Base64.decodeBase64(prefString.getBytes()))));
-        }
-
-        // after retrieved previous setting in order to overwrite the key ...
-        current.put(key, value);
-
-        try {
-            cookieUtils.save(PREFMAN_KEY, new String(Base64.encodeBase64(setPrefs(current).getBytes())));
-        } catch (IOException e) {
-            LOG.error("Could not save {} info: {}", getClass().getSimpleName(), current, e);
-        }
-    }
-
-    public void setList(final Request request, final Response response, final String key, final List<String> values) {
-        set(request, response, key, StringUtils.collectionToDelimitedString(values, ";"));
-    }
-
-    public void setList(final Request request, final Response response, final Map<String, List<String>> prefs) {
-        set(request, response, prefs);
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/PreviewUtils.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/PreviewUtils.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/PreviewUtils.java
deleted file mode 100644
index 12c93d4..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/PreviewUtils.java
+++ /dev/null
@@ -1,62 +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.commons;
-
-import java.lang.reflect.InvocationTargetException;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.client.console.init.ImplementationClassNamesLoader;
-import org.apache.syncope.client.console.wicket.markup.html.form.preview.AbstractBinaryPreviewer;
-import org.apache.wicket.Component;
-import org.apache.wicket.util.crypt.Base64;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.util.ClassUtils;
-
-@org.springframework.stereotype.Component
-public class PreviewUtils {
-
-    @Autowired
-    private ImplementationClassNamesLoader implementationClassNamesLoader;
-
-    public Component getPreviewer(final String mimeType, final String file)
-            throws InstantiationException, IllegalAccessException, InvocationTargetException {
-
-        final Class<? extends AbstractBinaryPreviewer> previewer = StringUtils.isBlank(file)
-                ? null
-                : implementationClassNamesLoader.getPreviewerClass(mimeType);
-
-        return previewer == null
-                ? null
-                : ClassUtils.getConstructorIfAvailable(previewer, String.class, String.class, byte[].class).
-                newInstance(new Object[] { "previewer", mimeType, Base64.decodeBase64(file) }).
-                preview();
-    }
-
-    public Component getPreviewer(final String mimeType, final byte[] file)
-            throws InstantiationException, IllegalAccessException, InvocationTargetException {
-
-        final Class<? extends AbstractBinaryPreviewer> previewer =
-                implementationClassNamesLoader.getPreviewerClass(mimeType);
-
-        return previewer == null
-                ? null
-                : ClassUtils.getConstructorIfAvailable(previewer, String.class, String.class, byte[].class).
-                newInstance(new Object[] { "previewer", mimeType, file }).
-                preview();
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SchemaModalPageFactory.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SchemaModalPageFactory.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SchemaModalPageFactory.java
deleted file mode 100644
index 38a60fa..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SchemaModalPageFactory.java
+++ /dev/null
@@ -1,58 +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.commons;
-
-import org.apache.syncope.client.console.pages.AbstractSchemaModalPage;
-import org.apache.syncope.client.console.pages.DerSchemaModalPage;
-import org.apache.syncope.client.console.pages.PlainSchemaModalPage;
-import org.apache.syncope.client.console.pages.VirSchemaModalPage;
-import org.apache.syncope.common.lib.types.AttributableType;
-import org.apache.syncope.common.lib.types.SchemaType;
-
-public final class SchemaModalPageFactory {
-
-    private static final long serialVersionUID = -3533177688264693505L;
-
-    private SchemaModalPageFactory() {
-        // empty constructor for static utility class
-    }
-
-    @SuppressWarnings("unchecked")
-    public static <T extends AbstractSchemaModalPage> T getSchemaModalPage(
-            final AttributableType entity, final SchemaType schemaType) {
-
-        T page;
-
-        switch (schemaType) {
-            case DERIVED:
-                page = (T) new DerSchemaModalPage(entity);
-                break;
-
-            case VIRTUAL:
-                page = (T) new VirSchemaModalPage(entity);
-                break;
-
-            default:
-                page = (T) new PlainSchemaModalPage(entity);
-                break;
-        }
-
-        return page;
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SelectChoiceRenderer.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SelectChoiceRenderer.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SelectChoiceRenderer.java
deleted file mode 100644
index 7b9164d..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SelectChoiceRenderer.java
+++ /dev/null
@@ -1,40 +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.commons;
-
-import org.apache.wicket.markup.html.form.IChoiceRenderer;
-
-public class SelectChoiceRenderer<T> implements IChoiceRenderer<T> {
-
-    private static final long serialVersionUID = -3242441544405909243L;
-
-    @Override
-    public Object getDisplayValue(T obj) {
-        if (obj instanceof SelectOption) {
-            return ((SelectOption) obj).getDisplayValue();
-        } else {
-            return obj.toString();
-        }
-    }
-
-    @Override
-    public String getIdValue(T obj, int i) {
-        return obj.toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SelectOption.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SelectOption.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SelectOption.java
deleted file mode 100644
index 839df70..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SelectOption.java
+++ /dev/null
@@ -1,72 +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.commons;
-
-import java.io.Serializable;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-
-public class SelectOption implements Serializable {
-
-    private static final long serialVersionUID = 2961127533930849828L;
-
-    private String displayValue;
-
-    private String keyValue;
-
-    public SelectOption(final String displayValue, final String keyValue) {
-        this.displayValue = displayValue;
-        this.keyValue = keyValue;
-    }
-
-    public String getDisplayValue() {
-        return displayValue;
-    }
-
-    public void setDisplayValue(final String displayValue) {
-        this.displayValue = displayValue;
-    }
-
-    public String getKeyValue() {
-        return keyValue;
-    }
-
-    public void setKeyValue(final String keyValue) {
-        this.keyValue = keyValue;
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (obj == null || !(obj instanceof SelectOption)) {
-            return false;
-        }
-
-        return (keyValue == null && ((SelectOption) obj).keyValue == null) || keyValue != null
-                && keyValue.equals(((SelectOption) obj).keyValue);
-    }
-
-    @Override
-    public int hashCode() {
-        return HashCodeBuilder.reflectionHashCode(this);
-    }
-
-    @Override
-    public String toString() {
-        return keyValue;
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SortableAttributableProviderComparator.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SortableAttributableProviderComparator.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SortableAttributableProviderComparator.java
deleted file mode 100644
index e82b9bb..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SortableAttributableProviderComparator.java
+++ /dev/null
@@ -1,122 +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.commons;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import org.apache.syncope.common.lib.to.AbstractAttributableTO;
-import org.apache.syncope.common.lib.to.AttrTO;
-import org.apache.syncope.common.lib.types.SchemaType;
-import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
-import org.apache.wicket.model.AbstractReadOnlyModel;
-
-public class SortableAttributableProviderComparator extends SortableDataProviderComparator<AbstractAttributableTO> {
-
-    private static final long serialVersionUID = 1775967163571699258L;
-
-    private static final Set<String> INLINE_PROPS = new HashSet<>(Arrays.asList(
-            new String[] { "key", "status", "token", "username" }));
-
-    public SortableAttributableProviderComparator(final SortableDataProvider<AbstractAttributableTO, String> provider) {
-        super(provider);
-    }
-
-    @Override
-    public int compare(final AbstractAttributableTO attributable1, AbstractAttributableTO attributable2) {
-        if (INLINE_PROPS.contains(provider.getSort().getProperty())) {
-            return super.compare(attributable1, attributable2);
-        }
-
-        return super.compare(new AttrModel(attributable1), new AttrModel(attributable2));
-    }
-
-    @SuppressWarnings("rawtypes")
-    private class AttrModel extends AbstractReadOnlyModel<Comparable> {
-
-        private static final long serialVersionUID = -7856686374020091808L;
-
-        private final Map<String, AttrTO> attrs;
-
-        private final Map<String, AttrTO> derAttrs;
-
-        private final Map<String, AttrTO> virAttrs;
-
-        public AttrModel(final AbstractAttributableTO attributableTO) {
-            super();
-
-            this.attrs = attributableTO.getPlainAttrMap();
-            this.derAttrs = attributableTO.getDerAttrMap();
-            this.virAttrs = attributableTO.getVirAttrMap();
-        }
-
-        /**
-         * @see UserAttrColumn constructor
-         */
-        @Override
-        public Comparable getObject() {
-            int hashPos = provider.getSort().getProperty().indexOf('#');
-
-            SchemaType schemaType = null;
-            final String schema;
-            if (hashPos == -1) {
-                schema = provider.getSort().getProperty();
-            } else {
-                String[] splitted = provider.getSort().getProperty().split("#");
-                try {
-                    schemaType = SchemaType.valueOf(splitted[0]);
-                } catch (IllegalArgumentException e) {
-                    // this should never happen
-                }
-                schema = provider.getSort().getProperty().substring(hashPos + 1);
-            }
-
-            final AttrTO attr;
-            if (schemaType == null) {
-                attr = this.attrs.get(schema);
-            } else {
-                switch (schemaType) {
-                    case PLAIN:
-                    default:
-                        attr = this.attrs.get(schema);
-                        break;
-
-                    case DERIVED:
-                        attr = this.derAttrs.get(schema);
-                        break;
-
-                    case VIRTUAL:
-                        attr = this.virAttrs.get(schema);
-                        break;
-                }
-            }
-
-            Comparable result = null;
-
-            List<String> values = attr == null ? null : attr.getValues();
-            if (values != null && !values.isEmpty()) {
-                result = values.iterator().next();
-            }
-
-            return result;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SortableDataProviderComparator.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SortableDataProviderComparator.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SortableDataProviderComparator.java
deleted file mode 100644
index bc4357d..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/SortableDataProviderComparator.java
+++ /dev/null
@@ -1,66 +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.commons;
-
-import java.io.Serializable;
-import java.util.Comparator;
-import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.PropertyModel;
-
-public class SortableDataProviderComparator<T> implements Comparator<T>, Serializable {
-
-    private static final long serialVersionUID = -8897687699977460543L;
-
-    protected final SortableDataProvider<T, String> provider;
-
-    public SortableDataProviderComparator(final SortableDataProvider<T, String> provider) {
-        this.provider = provider;
-    }
-
-    @SuppressWarnings({ "unchecked", "rawtypes" })
-    protected int compare(final IModel<Comparable> model1, final IModel<Comparable> model2) {
-        int result;
-
-        if (model1.getObject() == null && model2.getObject() == null) {
-            result = 0;
-        } else if (model1.getObject() == null) {
-            result = 1;
-        } else if (model2.getObject() == null) {
-            result = -1;
-        } else {
-            result = model1.getObject().compareTo(model2.getObject());
-        }
-
-        result = provider.getSort().isAscending()
-                ? result
-                : -result;
-
-        return result;
-    }
-
-    @SuppressWarnings("rawtypes")
-    @Override
-    public int compare(final T object1, final T object2) {
-        IModel<Comparable> model1 = new PropertyModel<>(object1, provider.getSort().getProperty());
-        IModel<Comparable> model2 = new PropertyModel<>(object2, provider.getSort().getProperty());
-
-        return compare(model1, model2);
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/XMLRolesReader.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/XMLRolesReader.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/XMLRolesReader.java
deleted file mode 100644
index 3a0b446..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/XMLRolesReader.java
+++ /dev/null
@@ -1,118 +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.commons;
-
-import java.util.HashMap;
-import java.util.Map;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.tuple.ImmutablePair;
-import org.apache.commons.lang3.tuple.Pair;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * XMLRolesReader singleton class.
- */
-public class XMLRolesReader {
-
-    /**
-     * Logger.
-     */
-    private static final Logger LOG = LoggerFactory.getLogger(XMLRolesReader.class);
-
-    private String authorizations;
-
-    private Map<Pair<String, String>, String> authMap;
-
-    public void setAuthorizations(final String authorizations) {
-        this.authorizations = authorizations;
-    }
-
-    private void init() {
-        authMap = new HashMap<Pair<String, String>, String>();
-
-        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-        dbf.setNamespaceAware(true);
-        try {
-            DocumentBuilder db = dbf.newDocumentBuilder();
-            Document doc = db.parse(getClass().getResource("/" + authorizations).openStream());
-            doc.getDocumentElement().normalize();
-
-            Node authNode = null;
-            NodeList root = doc.getChildNodes();
-            for (int i = 0; i < root.getLength() && authNode == null; i++) {
-                if ("auth".equals(root.item(i).getNodeName())) {
-                    authNode = root.item(i);
-                }
-            }
-            if (authNode == null) {
-                throw new IllegalArgumentException("Could not find root <auth> node");
-            }
-
-            NodeList pages = authNode.getChildNodes();
-            for (int i = 0; i < pages.getLength(); i++) {
-                if ("page".equals(pages.item(i).getNodeName())) {
-                    String page = pages.item(i).getAttributes().getNamedItem("id").getTextContent();
-
-                    NodeList actions = pages.item(i).getChildNodes();
-                    for (int j = 0; j < actions.getLength(); j++) {
-                        if ("action".equals(actions.item(j).getNodeName())) {
-                            String action = actions.item(j).getAttributes().getNamedItem("id").getTextContent();
-
-                            NodeList entitlements = actions.item(j).getChildNodes();
-                            for (int k = 0; k < entitlements.getLength(); k++) {
-                                if ("entitlement".equals(entitlements.item(k).getNodeName())) {
-                                    String entitlement = entitlements.item(k).getTextContent();
-                                    authMap.put(new ImmutablePair<String, String>(page, action), entitlement);
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        } catch (Exception e) {
-            LOG.error("While initializing parsing of {}", authorizations, e);
-        }
-    }
-
-    /**
-     * Get entitlement required for page / action.
-     *
-     * @param pageId page
-     * @param actionId action
-     * @return entitlement required
-     */
-    public String getEntitlement(final String pageId, final String actionId) {
-        synchronized (this) {
-            if (authMap == null) {
-                init();
-            }
-        }
-
-        Pair<String, String> key = new ImmutablePair<String, String>(pageId, actionId);
-        return authMap.containsKey(key)
-                ? authMap.get(key)
-                : StringUtils.EMPTY;
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/AbstractStatusBeanProvider.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/AbstractStatusBeanProvider.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/AbstractStatusBeanProvider.java
deleted file mode 100644
index c10f55c..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/AbstractStatusBeanProvider.java
+++ /dev/null
@@ -1,69 +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.commons.status;
-
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
-import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
-import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
-import org.apache.wicket.model.AbstractReadOnlyModel;
-import org.apache.wicket.model.IModel;
-
-public abstract class AbstractStatusBeanProvider extends SortableDataProvider<StatusBean, String> {
-
-    private static final long serialVersionUID = 4287357360778016173L;
-
-    private SortableDataProviderComparator<StatusBean> comparator;
-
-    public AbstractStatusBeanProvider(final String sort) {
-        //Default sorting
-        setSort(sort, SortOrder.ASCENDING);
-        comparator = new SortableDataProviderComparator<StatusBean>(this);
-    }
-
-    @Override
-    public Iterator<StatusBean> iterator(final long first, final long count) {
-        List<StatusBean> list = getStatusBeans();
-        Collections.sort(list, comparator);
-        return list.subList((int) first, (int) first + (int) count).iterator();
-    }
-
-    @Override
-    public long size() {
-        return getStatusBeans().size();
-    }
-
-    @Override
-    public IModel<StatusBean> model(final StatusBean resource) {
-        return new AbstractReadOnlyModel<StatusBean>() {
-
-            private static final long serialVersionUID = -7802635613997243712L;
-
-            @Override
-            public StatusBean getObject() {
-                return resource;
-            }
-        };
-    }
-
-    public abstract List<StatusBean> getStatusBeans();
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/ConnObjectWrapper.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/ConnObjectWrapper.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/ConnObjectWrapper.java
deleted file mode 100644
index be038db..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/ConnObjectWrapper.java
+++ /dev/null
@@ -1,55 +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.commons.status;
-
-import java.io.Serializable;
-import org.apache.syncope.common.lib.to.AbstractAttributableTO;
-import org.apache.syncope.common.lib.to.ConnObjectTO;
-
-public class ConnObjectWrapper implements Serializable {
-
-    private static final long serialVersionUID = 9083721948999924299L;
-
-    private final AbstractAttributableTO attributable;
-
-    private final String resourceName;
-
-    private final ConnObjectTO connObjectTO;
-
-    public ConnObjectWrapper(final AbstractAttributableTO attributable, final String resourceName,
-            final ConnObjectTO connObjectTO) {
-
-        this.attributable = attributable;
-        this.resourceName = resourceName;
-        this.connObjectTO = connObjectTO;
-    }
-
-    public AbstractAttributableTO getAttributable() {
-        return attributable;
-    }
-
-    public String getResourceName() {
-        return resourceName;
-    }
-
-    public ConnObjectTO getConnObjectTO() {
-        return connObjectTO;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/Status.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/Status.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/Status.java
deleted file mode 100644
index 7198c2c..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/Status.java
+++ /dev/null
@@ -1,45 +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.commons.status;
-
-public enum Status {
-
-    NOT_YET_SUBMITTED(""),
-    CREATED("created"),
-    ACTIVE("active"),
-    SUSPENDED("inactive"),
-    UNDEFINED("undefined"),
-    OBJECT_NOT_FOUND("objectnotfound");
-
-    public boolean isActive() {
-        return this == ACTIVE;
-    }
-
-    private Status(final String name) {
-        this.name = name;
-    }
-
-    private final String name;
-
-    @Override
-    public String toString() {
-        return name;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/StatusBean.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/StatusBean.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/StatusBean.java
deleted file mode 100644
index 47d0086..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/StatusBean.java
+++ /dev/null
@@ -1,103 +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.commons.status;
-
-import java.io.Serializable;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import org.apache.syncope.common.lib.to.AbstractAttributableTO;
-import org.apache.syncope.common.lib.to.GroupTO;
-import org.apache.syncope.common.lib.to.UserTO;
-
-public class StatusBean implements Serializable {
-
-    private static final long serialVersionUID = -5207260204921071129L;
-
-    private final Long attributableKey;
-
-    private final String attributableName;
-
-    private final String resourceName;
-
-    private String accountLink = null;
-
-    private Status status = Status.OBJECT_NOT_FOUND;
-
-    private boolean linked = true;
-
-    public StatusBean(final AbstractAttributableTO attributable, String resourceName) {
-        this.attributableKey = attributable.getKey();
-        this.attributableName = attributable instanceof UserTO
-                ? ((UserTO) attributable).getUsername() : ((GroupTO) attributable).getName();
-        this.resourceName = resourceName;
-    }
-
-    public String getAccountLink() {
-        return accountLink;
-    }
-
-    public void setAccountLink(final String accountLink) {
-        this.accountLink = accountLink;
-    }
-
-    public String getResourceName() {
-        return resourceName;
-    }
-
-    public Status getStatus() {
-        return status;
-    }
-
-    public void setStatus(final Status status) {
-        this.status = status;
-    }
-
-    public Long getAttributableId() {
-        return attributableKey;
-    }
-
-    public String getAttributableName() {
-        return attributableName;
-    }
-
-    public boolean isLinked() {
-        return linked;
-    }
-
-    public void setLinked(boolean linked) {
-        this.linked = linked;
-    }
-
-    @Override
-    public String toString() {
-        return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        return EqualsBuilder.reflectionEquals(this, obj);
-    }
-
-    @Override
-    public int hashCode() {
-        return HashCodeBuilder.reflectionHashCode(this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/StatusUtils.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/StatusUtils.java b/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/StatusUtils.java
deleted file mode 100644
index 391d202..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/commons/status/StatusUtils.java
+++ /dev/null
@@ -1,324 +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.commons.status;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import org.apache.syncope.client.console.commons.ConnIdSpecialAttributeName;
-import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.panels.ImagePanel;
-import org.apache.syncope.client.console.panels.StatusPanel;
-import org.apache.syncope.client.console.rest.AbstractSubjectRestClient;
-import org.apache.syncope.common.lib.mod.StatusMod;
-import org.apache.syncope.common.lib.to.AbstractAttributableTO;
-import org.apache.syncope.common.lib.to.AbstractSubjectTO;
-import org.apache.syncope.common.lib.to.AttrTO;
-import org.apache.syncope.common.lib.to.ConnObjectTO;
-import org.apache.wicket.Component;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.behavior.Behavior;
-import org.apache.wicket.markup.ComponentTag;
-import org.apache.wicket.markup.html.image.Image;
-import org.apache.wicket.request.resource.ContextRelativeResource;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class StatusUtils implements Serializable {
-
-    private static final long serialVersionUID = 7238009174387184309L;
-
-    /**
-     * Logger.
-     */
-    private static final Logger LOG = LoggerFactory.getLogger(StatusUtils.class);
-
-    private static final String IMG_PREFIX = "/img/statuses/";
-
-    private final AbstractSubjectRestClient restClient;
-
-    public StatusUtils(final AbstractSubjectRestClient restClient) {
-        this.restClient = restClient;
-    }
-
-    public List<ConnObjectWrapper> getConnectorObjects(final AbstractSubjectTO subject) {
-        final List<ConnObjectWrapper> objects = new ArrayList<>();
-        objects.addAll(getConnectorObjects(subject, subject.getResources()));
-        return objects;
-    }
-
-    public List<ConnObjectWrapper> getConnectorObjects(
-            final Collection<AbstractSubjectTO> subjects, final Collection<String> resources) {
-
-        final List<ConnObjectWrapper> objects = new ArrayList<>();
-
-        for (AbstractSubjectTO subject : subjects) {
-            objects.addAll(getConnectorObjects(subject, resources));
-        }
-
-        return objects;
-    }
-
-    private List<ConnObjectWrapper> getConnectorObjects(
-            final AbstractSubjectTO subject, final Collection<String> resources) {
-
-        final List<ConnObjectWrapper> objects = new ArrayList<>();
-
-        for (String resourceName : resources) {
-            ConnObjectTO objectTO = null;
-            try {
-                objectTO = restClient.getConnectorObject(resourceName, subject.getKey());
-            } catch (Exception e) {
-                LOG.warn("ConnObject '{}' not found on resource '{}'", subject.getKey(), resourceName);
-            }
-
-            objects.add(new ConnObjectWrapper(subject, resourceName, objectTO));
-        }
-
-        return objects;
-    }
-
-    public StatusBean getStatusBean(
-            final AbstractAttributableTO attributable,
-            final String resourceName,
-            final ConnObjectTO objectTO,
-            final boolean isGroup) {
-
-        final StatusBean statusBean = new StatusBean(attributable, resourceName);
-
-        if (objectTO != null) {
-            final Boolean enabled = isEnabled(objectTO);
-
-            final Status status = enabled == null
-                    ? (isGroup ? Status.ACTIVE : Status.UNDEFINED)
-                    : enabled
-                            ? Status.ACTIVE
-                            : Status.SUSPENDED;
-
-            final String accountLink = getAccountLink(objectTO);
-
-            statusBean.setStatus(status);
-            statusBean.setAccountLink(accountLink);
-        }
-
-        return statusBean;
-    }
-
-    private Boolean isEnabled(final ConnObjectTO objectTO) {
-        final Map<String, AttrTO> attributeTOs = objectTO.getPlainAttrMap();
-
-        final AttrTO status = attributeTOs.get(ConnIdSpecialAttributeName.ENABLE);
-
-        return status != null && status.getValues() != null && !status.getValues().isEmpty()
-                ? Boolean.parseBoolean(status.getValues().get(0))
-                : null;
-    }
-
-    private String getAccountLink(final ConnObjectTO objectTO) {
-        final Map<String, AttrTO> attributeTOs = objectTO == null
-                ? Collections.<String, AttrTO>emptyMap()
-                : objectTO.getPlainAttrMap();
-
-        final AttrTO name = attributeTOs.get(ConnIdSpecialAttributeName.NAME);
-
-        return name != null && name.getValues() != null && !name.getValues().isEmpty()
-                ? name.getValues().get(0)
-                : null;
-    }
-
-    public static StatusMod buildStatusMod(final Collection<StatusBean> statuses) {
-        return buildStatusMod(statuses, null);
-    }
-
-    public static StatusMod buildStatusMod(final Collection<StatusBean> statuses, final Boolean enable) {
-        StatusMod statusMod = new StatusMod();
-        statusMod.setOnSyncope(false);
-
-        for (StatusBean status : statuses) {
-            if (enable == null
-                    || (enable && !status.getStatus().isActive()) || (!enable && status.getStatus().isActive())) {
-
-                if ("syncope".equalsIgnoreCase(status.getResourceName())) {
-                    statusMod.setOnSyncope(true);
-                } else {
-                    statusMod.getResourceNames().add(status.getResourceName());
-                }
-
-            }
-        }
-
-        return statusMod;
-    }
-
-    public static void update(
-            final AbstractAttributableTO attributable,
-            final StatusPanel statusPanel,
-            final AjaxRequestTarget target,
-            final Collection<String> resourcesToAdd,
-            final Collection<String> resourcesToRemove) {
-
-        if (statusPanel != null) {
-            Map<String, StatusBean> statusMap = new LinkedHashMap<>();
-            for (StatusBean statusBean : statusPanel.getStatusBeans()) {
-                statusMap.put(statusBean.getResourceName(), statusBean);
-            }
-
-            for (String resourceName : resourcesToAdd) {
-                if (!statusMap.keySet().contains(resourceName)) {
-                    StatusBean statusBean;
-                    if (statusPanel.getInitialStatusBeanMap().containsKey(resourceName)) {
-                        statusBean = statusPanel.getInitialStatusBeanMap().get(resourceName);
-                    } else {
-                        statusBean = new StatusBean(attributable, resourceName);
-                        statusBean.setStatus(Status.NOT_YET_SUBMITTED);
-                    }
-
-                    statusMap.put(statusBean.getResourceName(), statusBean);
-                }
-            }
-
-            for (String resource : resourcesToRemove) {
-                statusMap.remove(resource);
-            }
-
-            statusPanel.updateStatusBeans(new ArrayList<>(statusMap.values()));
-            target.add(statusPanel);
-        }
-    }
-
-    public ConnObjectTO getConnObjectTO(
-            final Long attributableId, final String resourceName, final List<ConnObjectWrapper> objects) {
-
-        for (ConnObjectWrapper object : objects) {
-            if (attributableId.equals(object.getAttributable().getKey())
-                    && resourceName.equalsIgnoreCase(object.getResourceName())) {
-
-                return object.getConnObjectTO();
-            }
-        }
-
-        return null;
-    }
-
-    public Image getStatusImage(final String componentId, final Status status) {
-        final String alt, title, statusName;
-
-        switch (status) {
-
-            case NOT_YET_SUBMITTED:
-                statusName = Status.UNDEFINED.toString();
-                alt = "undefined icon";
-                title = "Not yet submitted";
-                break;
-
-            case ACTIVE:
-                statusName = Status.ACTIVE.toString();
-                alt = "active icon";
-                title = "Enabled";
-                break;
-
-            case UNDEFINED:
-                statusName = Status.UNDEFINED.toString();
-                alt = "undefined icon";
-                title = "Undefined status";
-                break;
-
-            case OBJECT_NOT_FOUND:
-                statusName = Status.OBJECT_NOT_FOUND.toString();
-                alt = "notfound icon";
-                title = "Not found";
-                break;
-
-            default:
-                statusName = Status.SUSPENDED.toString();
-                alt = "inactive icon";
-                title = "Disabled";
-        }
-
-        final Image img = new Image(componentId,
-                new ContextRelativeResource(IMG_PREFIX + statusName + Constants.PNG_EXT));
-        img.add(new Behavior() {
-
-            private static final long serialVersionUID = 1469628524240283489L;
-
-            @Override
-            public void onComponentTag(final Component component, final ComponentTag tag) {
-                tag.put("alt", alt);
-                tag.put("title", title);
-            }
-        });
-
-        return img;
-    }
-
-    public ImagePanel getStatusImagePanel(final String componentId, final Status status) {
-        final String alt, title, statusName;
-
-        switch (status) {
-
-            case NOT_YET_SUBMITTED:
-                statusName = Status.UNDEFINED.toString();
-                alt = "undefined icon";
-                title = "Not yet submitted";
-                break;
-
-            case ACTIVE:
-                statusName = Status.ACTIVE.toString();
-                alt = "active icon";
-                title = "Enabled";
-                break;
-
-            case UNDEFINED:
-                statusName = Status.UNDEFINED.toString();
-                alt = "undefined icon";
-                title = "Undefined status";
-                break;
-
-            case OBJECT_NOT_FOUND:
-                statusName = Status.OBJECT_NOT_FOUND.toString();
-                alt = "notfound icon";
-                title = "Not found";
-                break;
-
-            default:
-                statusName = Status.SUSPENDED.toString();
-                alt = "inactive icon";
-                title = "Disabled";
-        }
-
-        final ImagePanel imagePanel = new ImagePanel(componentId,
-                new ContextRelativeResource(IMG_PREFIX + statusName + Constants.PNG_EXT));
-        imagePanel.add(new Behavior() {
-
-            private static final long serialVersionUID = 1469628524240283489L;
-
-            @Override
-            public void onComponentTag(final Component component, final ComponentTag tag) {
-                tag.put("alt", alt);
-                tag.put("title", title);
-            }
-        });
-
-        return imagePanel;
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/init/ConsoleInitializer.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/init/ConsoleInitializer.java b/client/old_console/src/main/java/org/apache/syncope/client/console/init/ConsoleInitializer.java
deleted file mode 100644
index ec51d3e..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/init/ConsoleInitializer.java
+++ /dev/null
@@ -1,72 +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.init;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.aop.support.AopUtils;
-import org.springframework.beans.BeansException;
-import org.springframework.beans.factory.BeanFactory;
-import org.springframework.beans.factory.BeanFactoryAware;
-import org.springframework.beans.factory.InitializingBean;
-import org.springframework.beans.factory.support.DefaultListableBeanFactory;
-import org.springframework.stereotype.Component;
-
-/**
- * Take care of all initializations needed by Syncope Console to run up and safe.
- */
-@Component
-public class ConsoleInitializer implements InitializingBean, BeanFactoryAware {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ConsoleInitializer.class);
-
-    private DefaultListableBeanFactory beanFactory;
-
-    @Override
-    public void setBeanFactory(final BeanFactory beanFactory) throws BeansException {
-        this.beanFactory = (DefaultListableBeanFactory) beanFactory;
-    }
-
-    @Override
-    public void afterPropertiesSet() {
-        Map<String, SyncopeConsoleLoader> loaderMap = beanFactory.getBeansOfType(SyncopeConsoleLoader.class);
-
-        List<SyncopeConsoleLoader> loaders = new ArrayList<>(loaderMap.values());
-        Collections.sort(loaders, new Comparator<SyncopeConsoleLoader>() {
-
-            @Override
-            public int compare(final SyncopeConsoleLoader o1, final SyncopeConsoleLoader o2) {
-                return o1.getPriority().compareTo(o2.getPriority());
-            }
-        });
-
-        LOG.debug("Starting initialization...");
-        for (SyncopeConsoleLoader loader : loaders) {
-            LOG.debug("Invoking {} with priority {}", AopUtils.getTargetClass(loader).getName(), loader.getPriority());
-            loader.load();
-        }
-        LOG.debug("Initialization completed");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b7f88690/client/old_console/src/main/java/org/apache/syncope/client/console/init/ImplementationClassNamesLoader.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/init/ImplementationClassNamesLoader.java b/client/old_console/src/main/java/org/apache/syncope/client/console/init/ImplementationClassNamesLoader.java
deleted file mode 100644
index 0ff7282..0000000
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/init/ImplementationClassNamesLoader.java
+++ /dev/null
@@ -1,109 +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.init;
-
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import org.apache.commons.lang3.ArrayUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.client.console.panels.AbstractExtensionPanel;
-import org.apache.syncope.client.console.BinaryPreview;
-import org.apache.syncope.client.console.wicket.markup.html.form.preview.AbstractBinaryPreviewer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.config.BeanDefinition;
-import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
-import org.springframework.core.type.filter.AssignableTypeFilter;
-import org.springframework.stereotype.Component;
-import org.springframework.util.ClassUtils;
-
-@Component
-public class ImplementationClassNamesLoader implements SyncopeConsoleLoader {
-
-    /**
-     * Logger.
-     */
-    private static final Logger LOG = LoggerFactory.getLogger(ImplementationClassNamesLoader.class);
-
-    private List<Class<? extends AbstractBinaryPreviewer>> previewers;
-
-    private List<Class<? extends AbstractExtensionPanel>> extPanels;
-
-    @Override
-    public Integer getPriority() {
-        return 0;
-    }
-
-    @Override
-    @SuppressWarnings("unchecked")
-    public void load() {
-        previewers = new ArrayList<>();
-        extPanels = new ArrayList<>();
-
-        ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(false);
-        scanner.addIncludeFilter(new AssignableTypeFilter(AbstractBinaryPreviewer.class));
-        scanner.addIncludeFilter(new AssignableTypeFilter(AbstractExtensionPanel.class));
-
-        for (BeanDefinition bd : scanner.findCandidateComponents(StringUtils.EMPTY)) {
-            try {
-                Class<?> clazz = ClassUtils.resolveClassName(
-                        bd.getBeanClassName(), ClassUtils.getDefaultClassLoader());
-                boolean isAbsractClazz = Modifier.isAbstract(clazz.getModifiers());
-
-                if (AbstractBinaryPreviewer.class.isAssignableFrom(clazz) && !isAbsractClazz) {
-                    previewers.add((Class<? extends AbstractBinaryPreviewer>) clazz);
-                } else if (AbstractExtensionPanel.class.isAssignableFrom(clazz) && !isAbsractClazz) {
-                    extPanels.add((Class<? extends AbstractExtensionPanel>) clazz);
-                }
-
-            } catch (Throwable t) {
-                LOG.warn("Could not inspect class {}", bd.getBeanClassName(), t);
-            }
-        }
-        previewers = Collections.unmodifiableList(previewers);
-        extPanels = Collections.unmodifiableList(extPanels);
-
-        LOG.debug("Binary previewers found: {}", previewers);
-        LOG.debug("Extension panels found: {}", extPanels);
-    }
-
-    public Class<? extends AbstractBinaryPreviewer> getPreviewerClass(final String mimeType) {
-        LOG.debug("Searching for previewer class for MIME type: {}", mimeType);
-        Class<? extends AbstractBinaryPreviewer> previewer = null;
-        for (Class<? extends AbstractBinaryPreviewer> candidate : previewers) {
-            LOG.debug("Evaluating previewer class {} for MIME type {}", candidate.getName(), mimeType);
-            if (ArrayUtils.contains(candidate.getAnnotation(BinaryPreview.class).mimeTypes(), mimeType)) {
-                LOG.debug("Found existing previewer for MIME type {}: {}", mimeType, candidate.getName());
-                previewer = candidate;
-            }
-        }
-        return previewer;
-    }
-
-    public List<Class<? extends AbstractBinaryPreviewer>> getPreviewerClasses() {
-        return previewers;
-    }
-
-    public List<Class<? extends AbstractExtensionPanel>> getExtPanelClasses() {
-        return extPanels;
-    }
-
-}


Mime
View raw message