syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject svn commit: r1424538 [3/6] - in /syncope/trunk: console/src/main/java/org/apache/syncope/console/ console/src/main/java/org/apache/syncope/console/commons/ console/src/main/java/org/apache/syncope/console/pages/ console/src/main/java/org/apache/syncope...
Date Thu, 20 Dec 2012 15:45:31 GMT
Copied: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SelectOnlyUserSearchResultPanel.java (from r1423830, syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SelectOnlyResultSetPanel.java)
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SelectOnlyUserSearchResultPanel.java?p2=syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SelectOnlyUserSearchResultPanel.java&p1=syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SelectOnlyResultSetPanel.java&r1=1423830&r2=1424538&rev=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SelectOnlyResultSetPanel.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SelectOnlyUserSearchResultPanel.java Thu Dec 20 15:45:28 2012
@@ -22,8 +22,8 @@ import java.util.ArrayList;
 import java.util.List;
 import org.apache.syncope.client.search.NodeCond;
 import org.apache.syncope.client.to.AbstractAttributableTO;
-import org.apache.syncope.client.to.UserTO;
 import org.apache.syncope.console.pages.DisplayAttributesModalPage;
+import org.apache.syncope.console.rest.UserRestClient;
 import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
 import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
 import org.apache.wicket.PageReference;
@@ -38,7 +38,7 @@ import org.apache.wicket.markup.repeater
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.ResourceModel;
 
-public class SelectOnlyResultSetPanel extends ResultSetPanel {
+public class SelectOnlyUserSearchResultPanel extends UserSearchResultPanel {
 
     private static final long serialVersionUID = 2146781496050131930L;
 
@@ -46,10 +46,11 @@ public class SelectOnlyResultSetPanel ex
 
     private final ModalWindow window;
 
-    public <T extends AbstractAttributableTO> SelectOnlyResultSetPanel(final String id, final boolean filtered,
-            final NodeCond searchCond, final PageReference callerRef, final ModalWindow window) {
+    public <T extends AbstractAttributableTO> SelectOnlyUserSearchResultPanel(final String id, final boolean filtered,
+            final NodeCond searchCond, final PageReference callerRef, final ModalWindow window,
+            final UserRestClient restClient) {
 
-        super(id, filtered, searchCond, callerRef);
+        super(id, filtered, searchCond, callerRef, restClient);
 
         this.callerRef = callerRef;
         this.window = window;
@@ -61,19 +62,21 @@ public class SelectOnlyResultSetPanel ex
         container.get("displayAttrsLink").setVisible(false);
     }
 
-    protected List<IColumn<UserTO, String>> getColumns() {
-        final List<IColumn<UserTO, String>> columns = new ArrayList<IColumn<UserTO, String>>();
+    @Override
+    protected List<IColumn<AbstractAttributableTO, String>> getColumns() {
+        final List<IColumn<AbstractAttributableTO, String>> columns =
+                new ArrayList<IColumn<AbstractAttributableTO, String>>();
         for (String name : DisplayAttributesModalPage.DEFAULT_SELECTION) {
-            columns.add(new PropertyColumn<UserTO, String>(new ResourceModel(name, name), name, name));
+            columns.add(new PropertyColumn<AbstractAttributableTO, String>(new ResourceModel(name, name), name, name));
         }
 
-        columns.add(new AbstractColumn<UserTO, String>(new ResourceModel("actions", "")) {
+        columns.add(new AbstractColumn<AbstractAttributableTO, String>(new ResourceModel("actions", "")) {
 
             private static final long serialVersionUID = 8263694778917279290L;
 
             @Override
-            public void populateItem(final Item<ICellPopulator<UserTO>> cellItem, final String componentId,
-                    final IModel<UserTO> rowModel) {
+            public void populateItem(final Item<ICellPopulator<AbstractAttributableTO>> cellItem,
+                    final String componentId, final IModel<AbstractAttributableTO> rowModel) {
 
                 final ActionLinksPanel panel = new ActionLinksPanel(componentId, rowModel);
 

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/StatusPanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/StatusPanel.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/StatusPanel.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/StatusPanel.java Thu Dec 20 15:45:28 2012
@@ -23,10 +23,14 @@ import java.util.List;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.syncope.client.to.AbstractAttributableTO;
+import org.apache.syncope.client.to.RoleTO;
 import org.apache.syncope.client.to.UserTO;
 import org.apache.syncope.console.commons.StatusBean;
 import org.apache.syncope.console.commons.StatusUtils;
 import org.apache.syncope.console.commons.StatusUtils.Status;
+import org.apache.syncope.console.rest.ResourceRestClient;
+import org.apache.syncope.console.rest.RoleRestClient;
+import org.apache.syncope.console.rest.UserRestClient;
 import org.apache.wicket.Component;
 import org.apache.wicket.behavior.Behavior;
 import org.apache.wicket.markup.ComponentTag;
@@ -45,29 +49,48 @@ import org.apache.wicket.spring.injectio
 public class StatusPanel extends Panel {
 
     @SpringBean
-    private StatusUtils statusUtils;
+    private ResourceRestClient resourceRestClient;
 
-    public <T extends AbstractAttributableTO> StatusPanel(final String id, final UserTO userTO,
+    @SpringBean
+    private UserRestClient userRestClient;
+
+    @SpringBean
+    private RoleRestClient roleRestClient;
+
+    private final StatusUtils statusUtils;
+
+    public <T extends AbstractAttributableTO> StatusPanel(final String id, final AbstractAttributableTO attributable,
             final List<StatusBean> selectedResources) {
-        this(id, userTO, selectedResources, true);
+
+        this(id, attributable, selectedResources, true);
     }
 
-    public <T extends AbstractAttributableTO> StatusPanel(final String id, final UserTO userTO,
+    public <T extends AbstractAttributableTO> StatusPanel(final String id, final AbstractAttributableTO attributable,
             final List<StatusBean> selectedResources, final boolean enabled) {
 
         super(id);
+        statusUtils = new StatusUtils(resourceRestClient,
+                (attributable instanceof UserTO ? userRestClient : roleRestClient));
 
         final List<StatusBean> statuses = new ArrayList<StatusBean>();
 
         final StatusBean syncope = new StatusBean();
-        syncope.setAccountLink(userTO.getUsername());
         syncope.setResourceName("Syncope");
-        syncope.setStatus(userTO.getStatus() != null
-                ? Status.valueOf(userTO.getStatus().toUpperCase())
-                : Status.UNDEFINED);
-
+        if (attributable instanceof UserTO) {
+            UserTO userTO = (UserTO) attributable;
+            syncope.setAccountLink(userTO.getUsername());
+            syncope.setStatus(userTO.getStatus() == null
+                    ? Status.UNDEFINED
+                    : Status.valueOf(userTO.getStatus().toUpperCase()));
+        }
+        if (attributable instanceof RoleTO) {
+            RoleTO roleTO = (RoleTO) attributable;
+            syncope.setAccountLink(roleTO.getDisplayName());
+            syncope.setStatus(Status.ACTIVE);
+        }
         statuses.add(syncope);
-        statuses.addAll(statusUtils.getRemoteStatuses(userTO));
+
+        statuses.addAll(statusUtils.getRemoteStatuses(attributable));
 
         final CheckGroup group = new CheckGroup("group", selectedResources);
         add(group);
@@ -94,25 +117,29 @@ public class StatusPanel extends Panel {
                 boolean checkVisibility = true;
 
                 switch (item.getModelObject().getStatus()) {
+
                     case ACTIVE:
-                        image = new Image("icon", "statuses/active.png");
+                        image = new Image("icon", "../statuses/active.png");
                         alt = "active icon";
                         title = "Enabled";
                         break;
+
                     case UNDEFINED:
-                        image = new Image("icon", "statuses/undefined.png");
+                        image = new Image("icon", "../statuses/undefined.png");
                         checkVisibility = false;
                         alt = "undefined icon";
                         title = "Undefined status";
                         break;
-                    case USER_NOT_FOUND:
-                        image = new Image("icon", "statuses/usernotfound.png");
+
+                    case OBJECT_NOT_FOUND:
+                        image = new Image("icon", "../statuses/objectnotfound.png");
                         checkVisibility = false;
                         alt = "notfound icon";
                         title = "User not found";
                         break;
+
                     default:
-                        image = new Image("icon", "statuses/inactive.png");
+                        image = new Image("icon", "../statuses/inactive.png");
                         alt = "inactive icon";
                         title = "Disabled";
                 }
@@ -129,30 +156,25 @@ public class StatusPanel extends Panel {
                 });
 
                 final Fragment checkFrag;
-
-                if (!enabled) {
-                    checkFrag = new Fragment("rowCheck", "emptyCheckFrag", group.getParent());
-                } else {
+                if (enabled) {
                     final Check check = new Check("check", item.getModel(), group);
 
                     check.setEnabled(checkVisibility);
                     check.setVisible(checkVisibility);
 
                     checkFrag = new Fragment("rowCheck", "rowCheckFrag", getParent());
-
                     checkFrag.add(check);
+                } else {
+                    checkFrag = new Fragment("rowCheck", "emptyCheckFrag", group.getParent());
                 }
-
                 item.add(checkFrag);
 
                 item.add(new Label("resource", new ResourceModel(item.getModelObject().getResourceName(), item
                         .getModelObject().getResourceName())));
 
                 if (StringUtils.isNotBlank(item.getModelObject().getAccountLink())) {
-
-                    item.add(new Label("accountLink", new ResourceModel(item.getModelObject().getAccountLink(), item
-                            .getModelObject().getAccountLink())));
-
+                    item.add(new Label("accountLink", new ResourceModel(item.getModelObject().getAccountLink(),
+                            item.getModelObject().getAccountLink())));
                 } else {
                     item.add(new Label("accountLink", ""));
                 }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchPanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchPanel.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchPanel.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchPanel.java Thu Dec 20 15:45:28 2012
@@ -18,170 +18,24 @@
  */
 package org.apache.syncope.console.pages.panels;
 
-import java.lang.reflect.Field;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.List;
-import org.apache.syncope.client.search.AttributableCond;
-import org.apache.syncope.client.search.AttributeCond;
-import org.apache.syncope.client.search.MembershipCond;
 import org.apache.syncope.client.search.NodeCond;
-import org.apache.syncope.client.search.ResourceCond;
-import org.apache.syncope.client.to.ResourceTO;
 import org.apache.syncope.client.to.RoleTO;
-import org.apache.syncope.client.to.UserTO;
 import org.apache.syncope.console.commons.SearchCondWrapper;
-import org.apache.syncope.console.commons.SearchCondWrapper.FilterType;
-import org.apache.syncope.console.commons.SearchCondWrapper.OperationType;
-import org.apache.syncope.console.rest.ResourceRestClient;
 import org.apache.syncope.console.rest.RoleRestClient;
-import org.apache.syncope.console.rest.SchemaRestClient;
 import org.apache.syncope.types.AttributableType;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
-import org.apache.wicket.ajax.markup.html.form.AjaxButton;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
-import org.apache.wicket.feedback.FeedbackMessage;
-import org.apache.wicket.feedback.IFeedbackMessageFilter;
-import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.form.CheckBox;
-import org.apache.wicket.markup.html.form.DropDownChoice;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.markup.html.form.IChoiceRenderer;
-import org.apache.wicket.markup.html.form.TextField;
-import org.apache.wicket.markup.html.list.ListItem;
-import org.apache.wicket.markup.html.list.ListView;
-import org.apache.wicket.markup.html.panel.FeedbackPanel;
-import org.apache.wicket.markup.html.panel.Panel;
-import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.LoadableDetachableModel;
-import org.apache.wicket.model.PropertyModel;
-import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-public class UserSearchPanel extends Panel {
+public class UserSearchPanel extends AbstractSearchPanel {
 
     private static final long serialVersionUID = -1769527800450203738L;
 
-    /**
-     * Logger.
-     */
-    private static final Logger LOG = LoggerFactory.getLogger(UserSearchPanel.class);
-
-    private List<String> ATTRIBUTES_NOTINCLUDED = Arrays.asList(new String[]{
-                "attributes", "derivedAttributes", "virtualAttributes", "serialVersionUID", "memberships", "resources",
-                "password", "propagationStatusMap"});
-
-    @SpringBean
-    private SchemaRestClient schemaRestClient;
-
     @SpringBean
     private RoleRestClient roleRestClient;
 
-    @SpringBean
-    private ResourceRestClient resourceRestClient;
-
-    private final boolean required;
-
-    final private IModel<List<String>> dnames = new LoadableDetachableModel<List<String>>() {
-
-        private static final long serialVersionUID = 5275935387613157437L;
-
-        @Override
-        protected List<String> load() {
-            final List<String> details = new ArrayList<String>();
-
-            Class<?> clazz = UserTO.class;
-
-            // loop on class and all superclasses searching for field
-            while (clazz != null && clazz != Object.class) {
-                for (Field field : clazz.getDeclaredFields()) {
-                    if (!ATTRIBUTES_NOTINCLUDED.contains(field.getName())) {
-                        details.add(field.getName());
-                    }
-                }
-                clazz = clazz.getSuperclass();
-            }
-
-            Collections.reverse(details);
-            return details;
-        }
-    };
-
-    final private IModel<List<String>> unames = new LoadableDetachableModel<List<String>>() {
-
-        private static final long serialVersionUID = 5275935387613157437L;
-
-        @Override
-        protected List<String> load() {
-            return schemaRestClient.getSchemaNames(AttributableType.USER);
-        }
-    };
-
-    final private IModel<List<String>> roleNames = new LoadableDetachableModel<List<String>>() {
-
-        private static final long serialVersionUID = 5275935387613157437L;
-
-        @Override
-        protected List<String> load() {
-            List<RoleTO> roleTOs = roleRestClient.getAllRoles();
-
-            List<String> result = new ArrayList<String>(roleTOs.size());
-            for (RoleTO role : roleTOs) {
-                result.add(role.getDisplayName());
-            }
-
-            return result;
-        }
-    };
-
-    final private IModel<List<String>> resourceNames = new LoadableDetachableModel<List<String>>() {
-
-        private static final long serialVersionUID = 5275935387613157437L;
-
-        @Override
-        protected List<String> load() {
-            List<ResourceTO> resourceTOs = resourceRestClient.getAllResources();
-
-            List<String> result = new ArrayList<String>(resourceTOs.size());
-
-            for (ResourceTO resource : resourceTOs) {
-                result.add(resource.getName());
-            }
-
-            return result;
-        }
-    };
-
-    final private IModel<List<AttributeCond.Type>> attributeTypes =
-            new LoadableDetachableModel<List<AttributeCond.Type>>() {
-
-                private static final long serialVersionUID = 5275935387613157437L;
-
-                @Override
-                protected List<AttributeCond.Type> load() {
-                    return Arrays.asList(AttributeCond.Type.values());
-                }
-            };
-
-    final private IModel<List<FilterType>> filterTypes = new LoadableDetachableModel<List<FilterType>>() {
-
-        private static final long serialVersionUID = 5275935387613157437L;
-
-        @Override
-        protected List<FilterType> load() {
-            return Arrays.asList(FilterType.values());
-        }
-    };
-
-    final FeedbackPanel searchFeedback;
-
-    final List<SearchCondWrapper> searchConditionList;
-
     public UserSearchPanel(final String id) {
         this(id, null, true);
     }
@@ -190,422 +44,40 @@ public class UserSearchPanel extends Pan
         this(id, initCond, true);
     }
 
-    public UserSearchPanel(final String id, final NodeCond initNodeCond, final boolean required) {
-        super(id);
-        this.required = required;
-
-        setOutputMarkupId(true);
-
-        final WebMarkupContainer searchFormContainer = new WebMarkupContainer("searchFormContainer");
-        searchFormContainer.setOutputMarkupId(true);
-
-        searchFeedback = new FeedbackPanel("searchFeedback", new IFeedbackMessageFilter() {
-
-            private static final long serialVersionUID = 6895024863321391672L;
+    public UserSearchPanel(final String id, final NodeCond initCond, final boolean required) {
+        super(id, AttributableType.USER, initCond, required);
 
-            @Override
-            public boolean accept(final FeedbackMessage message) {
-                boolean result;
-
-                // messages reported on the session have a null reporter
-                if (message.getReporter() != null) {
-                    // only accept messages coming from the children
-                    // of the search form container
-                    result = searchFormContainer.contains(message.getReporter(), true);
-                } else {
-                    result = false;
-                }
+    }
 
-                return result;
-            }
-        });
-        searchFeedback.setOutputMarkupId(true);
-        add(searchFeedback);
-
-        if (initNodeCond == null) {
-            searchConditionList = new ArrayList<SearchCondWrapper>();
-            searchConditionList.add(new SearchCondWrapper());
-        } else {
-            searchConditionList = getSearchCondWrappers(initNodeCond, null);
-        }
-        searchFormContainer.add(new SearchView("searchView", searchConditionList, searchFormContainer));
+    @Override
+    protected void populate() {
+        super.populate();
 
-        AjaxButton addAndButton = new IndicatingAjaxButton("addAndButton", new ResourceModel("addAndButton")) {
+        this.filterTypes = new LoadableDetachableModel<List<SearchCondWrapper.FilterType>>() {
 
-            private static final long serialVersionUID = -4804368561204623354L;
+            private static final long serialVersionUID = 5275935387613157437L;
 
             @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-
-                SearchCondWrapper conditionWrapper = new SearchCondWrapper();
-                conditionWrapper.setOperationType(OperationType.AND);
-                searchConditionList.add(conditionWrapper);
-                target.add(searchFormContainer);
-            }
-
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-                target.add(searchFormContainer);
+            protected List<SearchCondWrapper.FilterType> load() {
+                return Arrays.asList(SearchCondWrapper.FilterType.values());
             }
         };
-        addAndButton.setDefaultFormProcessing(false);
-        searchFormContainer.add(addAndButton);
 
-        AjaxButton addOrButton = new IndicatingAjaxButton("addOrButton", new ResourceModel("addOrButton")) {
+        this.roleNames = new LoadableDetachableModel<List<String>>() {
 
-            private static final long serialVersionUID = -4804368561204623354L;
-
-            @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-                SearchCondWrapper conditionWrapper = new SearchCondWrapper();
-                conditionWrapper.setOperationType(OperationType.OR);
-                searchConditionList.add(conditionWrapper);
-                target.add(searchFormContainer);
-            }
+            private static final long serialVersionUID = 5275935387613157437L;
 
             @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-                target.add(searchFormContainer);
-            }
-        };
-        addOrButton.setDefaultFormProcessing(false);
-        searchFormContainer.add(addOrButton);
+            protected List<String> load() {
+                List<RoleTO> roleTOs = roleRestClient.list();
 
-        add(searchFormContainer);
-    }
-
-    public FeedbackPanel getSearchFeedback() {
-        return searchFeedback;
-    }
-
-    private List<SearchCondWrapper> getSearchCondWrappers(final NodeCond searchCond, final NodeCond.Type type) {
-        LOG.debug("Search condition: {}", searchCond);
-
-        List<SearchCondWrapper> wrappers = new ArrayList<SearchCondWrapper>();
-
-        switch (searchCond.getType()) {
-            case LEAF:
-            case NOT_LEAF:
-                final SearchCondWrapper wrapper = getSearchCondWrapper(searchCond);
-
-                if (type != null) {
-                    switch (type) {
-                        case AND:
-                            wrapper.setOperationType(OperationType.AND);
-                            break;
-                        case OR:
-                            wrapper.setOperationType(OperationType.OR);
-                            break;
-                        default:
-                        // nothing to specify
-                    }
+                List<String> result = new ArrayList<String>(roleTOs.size());
+                for (RoleTO role : roleTOs) {
+                    result.add(role.getDisplayName());
                 }
 
-                wrappers.add(wrapper);
-                break;
-
-            case AND:
-            case OR:
-                wrappers.addAll(getSearchCondWrappers(searchCond.getLeftNodeCond(), type));
-                wrappers.addAll(getSearchCondWrappers(searchCond.getRightNodeCond(), searchCond.getType()));
-                break;
-
-            default:
-        }
-
-        LOG.debug("Search condition wrappers: {}", wrappers);
-
-        return wrappers;
-    }
-
-    private SearchCondWrapper getSearchCondWrapper(final NodeCond searchCond) {
-        SearchCondWrapper wrapper = new SearchCondWrapper();
-
-        if (searchCond.getAttributableCond() != null) {
-            wrapper.setFilterType(FilterType.ATTRIBUTE);
-            wrapper.setFilterName(searchCond.getAttributableCond().getSchema());
-            wrapper.setType(searchCond.getAttributableCond().getType());
-            wrapper.setFilterValue(searchCond.getAttributableCond().getExpression());
-        }
-        if (searchCond.getAttributeCond() != null) {
-            wrapper.setFilterType(FilterType.ATTRIBUTE);
-            wrapper.setFilterName(searchCond.getAttributeCond().getSchema());
-            wrapper.setType(searchCond.getAttributeCond().getType());
-            wrapper.setFilterValue(searchCond.getAttributeCond().getExpression());
-        }
-        if (searchCond.getMembershipCond() != null) {
-            wrapper.setFilterType(FilterType.MEMBERSHIP);
-            RoleTO role = new RoleTO();
-            role.setId(searchCond.getMembershipCond().getRoleId());
-            role.setName(searchCond.getMembershipCond().getRoleName());
-            wrapper.setFilterName(role.getDisplayName());
-        }
-        if (searchCond.getResourceCond() != null) {
-            wrapper.setFilterType(FilterType.RESOURCE);
-            wrapper.setFilterName(searchCond.getResourceCond().getResourceName());
-        }
-
-        wrapper.setNotOperator(searchCond.getType() == NodeCond.Type.NOT_LEAF);
-
-        return wrapper;
-    }
-
-    public NodeCond buildSearchCond() {
-        return buildSearchCond(searchConditionList);
-    }
-
-    private NodeCond buildSearchCond(final List<SearchCondWrapper> conditions) {
-        SearchCondWrapper searchConditionWrapper = conditions.get(0);
-        if (searchConditionWrapper == null || searchConditionWrapper.getFilterType() == null) {
-            return null;
-        }
-
-        LOG.debug("Search conditions: fname {}; ftype {}; fvalue {}; OP {}; type {}; isnot {}", new Object[]{
-                    searchConditionWrapper.getFilterName(), searchConditionWrapper.getFilterType(),
-                    searchConditionWrapper.getFilterValue(), searchConditionWrapper.getOperationType(),
-                    searchConditionWrapper.getType(), searchConditionWrapper.isNotOperator()});
-
-        NodeCond nodeCond = null;
-
-        switch (searchConditionWrapper.getFilterType()) {
-            case ATTRIBUTE:
-                // AttributeCond or SyncopeUserCond
-                final String schema = searchConditionWrapper.getFilterName();
-
-                final AttributeCond attributeCond;
-                if (dnames.getObject().contains(schema)) {
-                    attributeCond = new AttributableCond();
-                    nodeCond = searchConditionWrapper.isNotOperator()
-                            ? NodeCond.getNotLeafCond((AttributableCond) attributeCond)
-                            : NodeCond.getLeafCond((AttributableCond) attributeCond);
-                } else {
-                    attributeCond = new AttributeCond();
-                    nodeCond = searchConditionWrapper.isNotOperator()
-                            ? NodeCond.getNotLeafCond(attributeCond)
-                            : NodeCond.getLeafCond(attributeCond);
-                }
-
-                attributeCond.setSchema(schema);
-                attributeCond.setType(searchConditionWrapper.getType());
-                attributeCond.setExpression(searchConditionWrapper.getFilterValue());
-
-                break;
-
-            case MEMBERSHIP:
-                final MembershipCond membershipCond = new MembershipCond();
-                membershipCond.setRoleId(RoleTO.fromDisplayName(searchConditionWrapper.getFilterName()));
-                membershipCond.setRoleName(searchConditionWrapper.getFilterName().split(" ")[1]);
-
-                if (searchConditionWrapper.isNotOperator()) {
-                    nodeCond = NodeCond.getNotLeafCond(membershipCond);
-                } else {
-                    nodeCond = NodeCond.getLeafCond(membershipCond);
-                }
-
-                break;
-
-            case RESOURCE:
-                final ResourceCond resourceCond = new ResourceCond();
-                resourceCond.setResourceName(searchConditionWrapper.getFilterName());
-
-                if (searchConditionWrapper.isNotOperator()) {
-                    nodeCond = NodeCond.getNotLeafCond(resourceCond);
-                } else {
-                    nodeCond = NodeCond.getLeafCond(resourceCond);
-                }
-
-                break;
-
-            default:
-            // nothing to do
-        }
-
-        LOG.debug("Processed condition {}", nodeCond);
-
-        if (conditions.size() > 1) {
-            List<SearchCondWrapper> subList = conditions.subList(1, conditions.size());
-
-            if (OperationType.OR.equals(subList.get(0).getOperationType())) {
-                nodeCond = NodeCond.getOrCond(nodeCond, buildSearchCond(subList));
-            } else {
-                nodeCond = NodeCond.getAndCond(nodeCond, buildSearchCond(subList));
-            }
-        }
-
-        return nodeCond;
-    }
-
-    private class SearchView extends ListView<SearchCondWrapper> {
-
-        private static final long serialVersionUID = -527351923968737757L;
-
-        final private WebMarkupContainer searchFormContainer;
-
-        public SearchView(final String id, final List<? extends SearchCondWrapper> list,
-                final WebMarkupContainer searchFormContainer) {
-
-            super(id, list);
-            this.searchFormContainer = searchFormContainer;
-        }
-
-        @Override
-        protected void populateItem(final ListItem<SearchCondWrapper> item) {
-            final SearchCondWrapper searchCondition = item.getModelObject();
-
-            if (item.getIndex() == 0) {
-                item.add(new Label("operationType", ""));
-            } else {
-                item.add(new Label("operationType", searchCondition.getOperationType().toString()));
-            }
-
-            final CheckBox notOperator = new CheckBox("notOperator", new PropertyModel(searchCondition, "notOperator"));
-            notOperator.add(new AjaxFormComponentUpdatingBehavior("onchange") {
-
-                private static final long serialVersionUID = -1107858522700306810L;
-
-                @Override
-                protected void onUpdate(final AjaxRequestTarget target) {
-                }
-            });
-            item.add(notOperator);
-
-            final DropDownChoice<AttributeCond.Type> type = new DropDownChoice<AttributeCond.Type>("type",
-                    new PropertyModel<AttributeCond.Type>(searchCondition, "type"), attributeTypes);
-            type.add(new AjaxFormComponentUpdatingBehavior("onchange") {
-
-                private static final long serialVersionUID = -1107858522700306810L;
-
-                @Override
-                protected void onUpdate(final AjaxRequestTarget target) {
-                }
-            });
-            item.add(type);
-
-            final DropDownChoice<String> filterNameChooser = new DropDownChoice<String>("filterName",
-                    new PropertyModel<String>(searchCondition, "filterName"), (IModel) null);
-            filterNameChooser.setOutputMarkupId(true);
-            filterNameChooser.setRequired(required);
-            filterNameChooser.add(new AjaxFormComponentUpdatingBehavior("onchange") {
-
-                private static final long serialVersionUID = -1107858522700306810L;
-
-                @Override
-                protected void onUpdate(final AjaxRequestTarget target) {
-                }
-            });
-            item.add(filterNameChooser);
-
-            final TextField<String> filterValue = new TextField<String>("filterValue", new PropertyModel<String>(
-                    searchCondition, "filterValue"));
-            filterValue.add(new AjaxFormComponentUpdatingBehavior("onchange") {
-
-                private static final long serialVersionUID = -1107858522700306810L;
-
-                @Override
-                protected void onUpdate(final AjaxRequestTarget target) {
-                }
-            });
-            item.add(filterValue);
-
-            final DropDownChoice<FilterType> filterTypeChooser = new DropDownChoice<FilterType>("filterType",
-                    new PropertyModel<FilterType>(searchCondition, "filterType"), filterTypes);
-            filterTypeChooser.setOutputMarkupId(true);
-            filterTypeChooser.add(new AjaxFormComponentUpdatingBehavior("onchange") {
-
-                private static final long serialVersionUID = -1107858522700306810L;
-
-                @Override
-                protected void onUpdate(final AjaxRequestTarget target) {
-                    target.add(searchFormContainer);
-                }
-            });
-            filterTypeChooser.setRequired(required);
-            item.add(filterTypeChooser);
-
-            AjaxButton dropButton = new IndicatingAjaxButton("dropButton", new ResourceModel("dropButton")) {
-
-                private static final long serialVersionUID = -4804368561204623354L;
-
-                @Override
-                protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-                    getList().remove(Integer.valueOf(getParent().getId()).intValue());
-                    target.add(searchFormContainer);
-                }
-
-                @Override
-                protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-                    target.add(searchFormContainer);
-                }
-            };
-            dropButton.setDefaultFormProcessing(false);
-            if (item.getIndex() == 0) {
-                dropButton.setVisible(false);
-            }
-            item.add(dropButton);
-
-            if (searchCondition == null || searchCondition.getFilterType() == null) {
-                filterNameChooser.setChoices(Collections.EMPTY_LIST);
-            } else {
-                switch (searchCondition.getFilterType()) {
-                    case ATTRIBUTE:
-                        final List<String> names = new ArrayList<String>(dnames.getObject());
-
-                        if (unames.getObject() != null && !unames.getObject().isEmpty()) {
-                            names.addAll(unames.getObject());
-                        }
-                        Collections.sort(names);
-
-                        filterNameChooser.setChoices(names);
-                        if (!type.isEnabled()) {
-                            type.setEnabled(true);
-                            type.setRequired(true);
-                        }
-                        if (!filterValue.isEnabled()) {
-                            filterValue.setEnabled(true);
-                        }
-
-                        break;
-
-                    case MEMBERSHIP:
-                        filterNameChooser.setChoices(roleNames);
-                        filterNameChooser.setChoiceRenderer(new IChoiceRenderer<String>() {
-
-                            private static final long serialVersionUID = -4288397951948436434L;
-
-                            @Override
-                            public Object getDisplayValue(String object) {
-                                return object;
-                            }
-
-                            @Override
-                            public String getIdValue(String object, int index) {
-                                return object;
-                            }
-                        });
-                        type.setEnabled(false);
-                        type.setRequired(false);
-                        type.setModelObject(null);
-
-                        filterValue.setEnabled(false);
-                        filterValue.setModelObject("");
-
-                        break;
-
-                    case RESOURCE:
-                        filterNameChooser.setChoices(resourceNames);
-                        type.setEnabled(false);
-                        type.setRequired(false);
-                        type.setModelObject(null);
-
-                        filterValue.setEnabled(false);
-                        filterValue.setModelObject("");
-
-                        break;
-
-                    default:
-                        filterNameChooser.setChoices(Collections.EMPTY_LIST);
-                }
+                return result;
             }
-        }
+        };
     }
 }

Added: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java?rev=1424538&view=auto
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java (added)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java Thu Dec 20 15:45:28 2012
@@ -0,0 +1,203 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.console.pages.panels;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+import org.apache.syncope.client.search.NodeCond;
+import org.apache.syncope.client.to.AbstractAttributableTO;
+import org.apache.syncope.client.to.UserTO;
+import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
+import org.apache.syncope.console.commons.Constants;
+import org.apache.syncope.console.pages.DisplayAttributesModalPage;
+import org.apache.syncope.console.pages.EditUserModalPage;
+import org.apache.syncope.console.pages.ResultStatusModalPage;
+import org.apache.syncope.console.pages.StatusModalPage;
+import org.apache.syncope.console.rest.AbstractAttributableRestClient;
+import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.AttrColumn;
+import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
+import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.TokenColumn;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.ResourceModel;
+
+public class UserSearchResultPanel extends AbstractSearchResultPanel {
+
+    private static final long serialVersionUID = -905187144506842332L;
+
+    public <T extends AbstractAttributableTO> UserSearchResultPanel(final String id, final boolean filtered,
+            final NodeCond searchCond, final PageReference callerRef, final AbstractAttributableRestClient restClient) {
+
+        super(id, filtered, searchCond, callerRef, restClient);
+    }
+
+    @Override
+    protected List<IColumn<AbstractAttributableTO, String>> getColumns() {
+        final List<IColumn<AbstractAttributableTO, String>> columns =
+                new ArrayList<IColumn<AbstractAttributableTO, String>>();
+
+        for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_DETAILS_VIEW)) {
+            Field field = null;
+            try {
+                field = UserTO.class.getDeclaredField(name);
+            } catch (Exception ue) {
+                LOG.debug("Error retrieving UserTO field {}", name, ue);
+                try {
+                    field = AbstractAttributableTO.class.getDeclaredField(name);
+                } catch (Exception aae) {
+                    LOG.error("Error retrieving AbstractAttributableTO field {}", name, aae);
+                }
+            }
+
+            if ("token".equalsIgnoreCase(name)) {
+                columns.add(new TokenColumn("token"));
+            } else if (field != null && field.getType().equals(Date.class)) {
+                columns.add(new DatePropertyColumn<AbstractAttributableTO>(new ResourceModel(name, name), name, name));
+            } else {
+                columns.add(
+                        new PropertyColumn<AbstractAttributableTO, String>(new ResourceModel(name, name), name, name));
+            }
+        }
+
+        for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_ATTRIBUTES_VIEW)) {
+            columns.add(new AttrColumn(name, AttrColumn.SchemaType.schema));
+        }
+
+        for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_DERIVED_ATTRIBUTES_VIEW)) {
+            columns.add(new AttrColumn(name, AttrColumn.SchemaType.derivedSchema));
+        }
+
+        for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_VIRTUAL_ATTRIBUTES_VIEW)) {
+            columns.add(new AttrColumn(name, AttrColumn.SchemaType.virtualSchema));
+        }
+
+        // Add defaults in case of no selection
+        if (columns.isEmpty()) {
+            for (String name : DisplayAttributesModalPage.DEFAULT_SELECTION) {
+                columns.add(
+                        new PropertyColumn<AbstractAttributableTO, String>(new ResourceModel(name, name), name, name));
+            }
+
+            prefMan.setList(getRequest(), getResponse(), Constants.PREF_USERS_DETAILS_VIEW,
+                    Arrays.asList(DisplayAttributesModalPage.DEFAULT_SELECTION));
+        }
+
+        columns.add(new AbstractColumn<AbstractAttributableTO, String>(new ResourceModel("actions", "")) {
+
+            @Override
+            public String getCssClass() {
+                return "action";
+            }
+
+            @Override
+            public void populateItem(final Item<ICellPopulator<AbstractAttributableTO>> cellItem,
+                    final String componentId, final IModel<AbstractAttributableTO> model) {
+
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);
+
+                panel.add(new ActionLink() {
+
+                    private static final long serialVersionUID = -7978723352517770644L;
+
+                    @Override
+                    public void onClick(final AjaxRequestTarget target) {
+                        statusmodal.setPageCreator(new ModalWindow.PageCreator() {
+
+                            private static final long serialVersionUID = -7834632442532690940L;
+
+                            @Override
+                            public Page createPage() {
+                                return new StatusModalPage(page.getPageReference(), statusmodal, model.getObject());
+                            }
+                        });
+
+                        statusmodal.show(target);
+                    }
+                }, ActionLink.ActionType.SEARCH, "Users", "read");
+
+                panel.add(new ActionLink() {
+
+                    private static final long serialVersionUID = -7978723352517770644L;
+
+                    @Override
+                    public void onClick(final AjaxRequestTarget target) {
+                        editmodal.setPageCreator(new ModalWindow.PageCreator() {
+
+                            private static final long serialVersionUID = -7834632442532690940L;
+
+                            @Override
+                            public Page createPage() {
+                                return new EditUserModalPage(
+                                        page.getPageReference(), editmodal, (UserTO) model.getObject());
+                            }
+                        });
+
+                        editmodal.show(target);
+                    }
+                }, ActionLink.ActionType.EDIT, "Users", "update");
+
+                panel.add(new ActionLink() {
+
+                    private static final long serialVersionUID = -7978723352517770644L;
+
+                    @Override
+                    public void onClick(final AjaxRequestTarget target) {
+                        try {
+                            final UserTO userTO = (UserTO) restClient.delete(model.getObject().getId());
+
+                            page.setModalResult(true);
+
+                            editmodal.setPageCreator(new ModalWindow.PageCreator() {
+
+                                private static final long serialVersionUID = -7834632442532690940L;
+
+                                @Override
+                                public Page createPage() {
+                                    return new ResultStatusModalPage(editmodal, userTO);
+                                }
+                            });
+
+                            editmodal.show(target);
+                        } catch (SyncopeClientCompositeErrorException scce) {
+                            error(getString("operation_error") + ": " + scce.getMessage());
+                            target.add(feedbackPanel);
+                        }
+                    }
+                }, ActionLink.ActionType.DELETE, "Users", "delete");
+
+                cellItem.add(panel);
+            }
+        });
+
+        return columns;
+    }
+}

Propchange: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractAttributableRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractAttributableRestClient.java?rev=1424538&view=auto
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractAttributableRestClient.java (added)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractAttributableRestClient.java Thu Dec 20 15:45:28 2012
@@ -0,0 +1,39 @@
+/*
+ * 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.console.rest;
+
+import java.util.List;
+import org.apache.syncope.client.search.NodeCond;
+import org.apache.syncope.client.to.AbstractAttributableTO;
+import org.apache.syncope.client.to.ConnObjectTO;
+
+public abstract class AbstractAttributableRestClient extends BaseRestClient {
+
+    public abstract Integer count();
+
+    public abstract List<? extends AbstractAttributableTO> list(int page, int size);
+
+    public abstract Integer searchCount(NodeCond searchCond);
+
+    public abstract List<? extends AbstractAttributableTO> search(NodeCond searchCond, int page, int size);
+
+    public abstract ConnObjectTO getRemoteObject(String resourceName, String objectId);
+
+    public abstract AbstractAttributableTO delete(Long id);
+}

Propchange: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractAttributableRestClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractAttributableRestClient.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractAttributableRestClient.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ApprovalRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ApprovalRestClient.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ApprovalRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ApprovalRestClient.java Thu Dec 20 15:45:28 2012
@@ -29,7 +29,7 @@ import org.springframework.stereotype.Co
  * Console client for invoking Rest Todo services.
  */
 @Component
-public class ApprovalRestClient extends AbstractBaseRestClient {
+public class ApprovalRestClient extends BaseRestClient {
 
     public List<WorkflowFormTO> getForms() {
         return Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(

Copied: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/BaseRestClient.java (from r1424355, syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractBaseRestClient.java)
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/BaseRestClient.java?p2=syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/BaseRestClient.java&p1=syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractBaseRestClient.java&r1=1424355&r2=1424538&rev=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractBaseRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/BaseRestClient.java Thu Dec 20 15:45:28 2012
@@ -18,17 +18,24 @@
  */
 package org.apache.syncope.console.rest;
 
+import java.io.Serializable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 
-public abstract class AbstractBaseRestClient {
+public class BaseRestClient implements Serializable {
 
     /**
      * Logger.
      */
-    protected static final Logger LOG = LoggerFactory.getLogger(AbstractBaseRestClient.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(BaseRestClient.class);
+
+    private static final long serialVersionUID = 1523999867826481989L;
 
     @Autowired
     protected String baseURL;
+
+    protected BaseRestClient() {
+        // Empty, only to prevent direct instantiation
+    }
 }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java Thu Dec 20 15:45:28 2012
@@ -25,7 +25,7 @@ import org.apache.syncope.client.to.Conf
 import org.apache.syncope.console.SyncopeSession;
 
 @Component
-public class ConfigurationRestClient extends AbstractBaseRestClient {
+public class ConfigurationRestClient extends BaseRestClient {
 
     /**
      * Get all stored configurations.

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConnectorRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConnectorRestClient.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConnectorRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConnectorRestClient.java Thu Dec 20 15:45:28 2012
@@ -37,7 +37,7 @@ import org.apache.syncope.types.ConnConf
  * Console client for invoking Rest Connectors services.
  */
 @Component
-public class ConnectorRestClient extends AbstractBaseRestClient {
+public class ConnectorRestClient extends BaseRestClient {
 
     /**
      * Get all connectors.

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/EntitlementRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/EntitlementRestClient.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/EntitlementRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/EntitlementRestClient.java Thu Dec 20 15:45:28 2012
@@ -28,7 +28,7 @@ import org.apache.syncope.console.Syncop
  * Console client for invoking Rest Resources services.
  */
 @Component
-public class EntitlementRestClient extends AbstractBaseRestClient {
+public class EntitlementRestClient extends BaseRestClient {
 
     /**
      * Get all Entitlements.

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/LoggerRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/LoggerRestClient.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/LoggerRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/LoggerRestClient.java Thu Dec 20 15:45:28 2012
@@ -33,7 +33,7 @@ import org.apache.syncope.types.AuditLog
 import org.apache.syncope.types.SyncopeLoggerLevel;
 
 @Component
-public class LoggerRestClient extends AbstractBaseRestClient {
+public class LoggerRestClient extends BaseRestClient {
 
     public List<LoggerTO> listLogs() {
         return Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/NotificationRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/NotificationRestClient.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/NotificationRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/NotificationRestClient.java Thu Dec 20 15:45:28 2012
@@ -26,7 +26,7 @@ import org.apache.syncope.console.Syncop
 import org.springframework.stereotype.Component;
 
 @Component
-public class NotificationRestClient extends AbstractBaseRestClient {
+public class NotificationRestClient extends BaseRestClient {
 
     public List<NotificationTO> getAllNotifications()
             throws SyncopeClientCompositeErrorException {

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/PolicyRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/PolicyRestClient.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/PolicyRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/PolicyRestClient.java Thu Dec 20 15:45:28 2012
@@ -33,7 +33,7 @@ import org.apache.syncope.types.PolicyTy
  * Console client for invoking Rest Policy services.
  */
 @Component
-public class PolicyRestClient extends AbstractBaseRestClient {
+public class PolicyRestClient extends BaseRestClient {
 
     public <T extends PolicyTO> T getGlobalPolicy(final PolicyType type) {
 

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ReportRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ReportRestClient.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ReportRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ReportRestClient.java Thu Dec 20 15:45:28 2012
@@ -27,7 +27,7 @@ import org.apache.syncope.console.Syncop
 import org.springframework.stereotype.Component;
 
 @Component
-public class ReportRestClient extends AbstractBaseRestClient implements ExecutionRestClient {
+public class ReportRestClient extends BaseRestClient implements ExecutionRestClient {
 
     public List<String> getReportletConfClasses() {
         List<String> reportletClasses = null;

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ResourceRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ResourceRestClient.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ResourceRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ResourceRestClient.java Thu Dec 20 15:45:28 2012
@@ -29,7 +29,7 @@ import org.springframework.stereotype.Co
  * Console client for invoking Rest Resources services.
  */
 @Component
-public class ResourceRestClient extends AbstractBaseRestClient {
+public class ResourceRestClient extends BaseRestClient {
 
     public List<String> getPropagationActionsClasses() {
         List<String> actions = null;

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/RoleRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/RoleRestClient.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/RoleRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/RoleRestClient.java Thu Dec 20 15:45:28 2012
@@ -21,6 +21,8 @@ package org.apache.syncope.console.rest;
 import java.util.Arrays;
 import java.util.List;
 import org.apache.syncope.client.mod.RoleMod;
+import org.apache.syncope.client.search.NodeCond;
+import org.apache.syncope.client.to.ConnObjectTO;
 import org.apache.syncope.client.to.RoleTO;
 import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
 import org.apache.syncope.console.SyncopeSession;
@@ -30,30 +32,49 @@ import org.springframework.stereotype.Co
  * Console client for invoking Rest Role's services.
  */
 @Component
-public class RoleRestClient extends AbstractBaseRestClient {
+public class RoleRestClient extends AbstractAttributableRestClient {
 
-    /**
-     * Get all Roles.
-     *
-     * @return SchemaTOs
-     */
-    public List<RoleTO> getAllRoles()
+    @Override
+    public Integer count() {
+        return SyncopeSession.get().getRestTemplate().getForObject(baseURL + "role/count.json", Integer.class);
+    }
+
+    public List<RoleTO> list() {
+        return Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(
+                baseURL + "role/list.json", RoleTO[].class));
+    }
+
+    @Override
+    public List<RoleTO> list(final int page, final int size) {
+        return Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(
+                baseURL + "role/list.json", RoleTO[].class, page, size));
+    }
+
+    @Override
+    public Integer searchCount(final NodeCond searchCond) {
+        return SyncopeSession.get().getRestTemplate().postForObject(
+                baseURL + "role/search/count.json", searchCond, Integer.class);
+    }
+
+    @Override
+    public List<RoleTO> search(final NodeCond searchCond, final int page, final int size)
             throws SyncopeClientCompositeErrorException {
 
-        List<RoleTO> roles = null;
+        return Arrays.asList(SyncopeSession.get().getRestTemplate().postForObject(
+                baseURL + "role/search/{page}/{size}", searchCond, RoleTO[].class, page, size));
+    }
 
-        try {
-            roles = Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(
-                    baseURL + "role/list.json", RoleTO[].class));
-        } catch (SyncopeClientCompositeErrorException e) {
-            LOG.error("While listing all roles", e);
-        }
+    @Override
+    public ConnObjectTO getRemoteObject(final String resourceName, final String objectId)
+            throws SyncopeClientCompositeErrorException {
 
-        return roles;
+        return SyncopeSession.get().getRestTemplate().getForObject(
+                baseURL + "/resource/{resourceName}/read/ROLE/{objectId}.json",
+                ConnObjectTO.class, resourceName, objectId);
     }
 
-    public void create(final RoleTO roleTO) {
-        SyncopeSession.get().getRestTemplate().postForObject(
+    public RoleTO create(final RoleTO roleTO) {
+        return SyncopeSession.get().getRestTemplate().postForObject(
                 baseURL + "role/create", roleTO, RoleTO.class);
     }
 
@@ -69,13 +90,13 @@ public class RoleRestClient extends Abst
         return roleTO;
     }
 
-    public void update(final RoleMod roleMod) {
-        SyncopeSession.get().getRestTemplate().postForObject(
+    public RoleTO update(final RoleMod roleMod) {
+        return SyncopeSession.get().getRestTemplate().postForObject(
                 baseURL + "role/update", roleMod, RoleTO.class);
     }
 
+    @Override
     public RoleTO delete(final Long id) {
-        return SyncopeSession.get().getRestTemplate().getForObject(
-                baseURL + "role/delete/{roleId}.json", RoleTO.class, id);
+        return SyncopeSession.get().getRestTemplate().getForObject(baseURL + "role/delete/{roleId}", RoleTO.class, id);
     }
 }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java Thu Dec 20 15:45:28 2012
@@ -33,7 +33,7 @@ import org.apache.syncope.types.Attribut
  * Console client for invoking rest schema services.
  */
 @Component
-public class SchemaRestClient extends AbstractBaseRestClient {
+public class SchemaRestClient extends BaseRestClient {
 
     /**
      * Get schemas.
@@ -62,10 +62,10 @@ public class SchemaRestClient extends Ab
         final List<String> schemaNames = new ArrayList<String>();
 
         try {
-            final List<SchemaTO> userSchemas = Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(
+            final List<SchemaTO> schemas = Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(
                     baseURL + "schema/" + type.name().toLowerCase() + "/list.json", SchemaTO[].class));
 
-            for (SchemaTO schemaTO : userSchemas) {
+            for (SchemaTO schemaTO : schemas) {
                 schemaNames.add(schemaTO.getName());
             }
         } catch (SyncopeClientCompositeErrorException e) {

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/TaskRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/TaskRestClient.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/TaskRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/TaskRestClient.java Thu Dec 20 15:45:28 2012
@@ -35,7 +35,7 @@ import org.springframework.stereotype.Co
  * Console client for invoking Rest Tasks services.
  */
 @Component
-public class TaskRestClient extends AbstractBaseRestClient implements ExecutionRestClient {
+public class TaskRestClient extends BaseRestClient implements ExecutionRestClient {
 
     /**
      * Return a list of job classes.

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRequestRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRequestRestClient.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRequestRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRequestRestClient.java Thu Dec 20 15:45:28 2012
@@ -27,7 +27,7 @@ import org.apache.syncope.console.Syncop
 import org.springframework.stereotype.Component;
 
 @Component
-public class UserRequestRestClient extends AbstractBaseRestClient {
+public class UserRequestRestClient extends BaseRestClient {
 
     public List<UserRequestTO> list() {
         return Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRestClient.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRestClient.java Thu Dec 20 15:45:28 2012
@@ -33,8 +33,9 @@ import org.springframework.stereotype.Co
  * Console client for invoking rest users services.
  */
 @Component
-public class UserRestClient extends AbstractBaseRestClient {
+public class UserRestClient extends AbstractAttributableRestClient {
 
+    @Override
     public Integer count() {
         return SyncopeSession.get().getRestTemplate().getForObject(baseURL + "user/count.json", Integer.class);
     }
@@ -46,6 +47,7 @@ public class UserRestClient extends Abst
      * @param size maximum number to fetch
      * @return list of TaskTO objects
      */
+    @Override
     public List<UserTO> list(final int page, final int size) {
         return Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(
                 baseURL + "user/list/{page}/{size}.json", UserTO[].class, page, size));
@@ -63,13 +65,12 @@ public class UserRestClient extends Abst
         return SyncopeSession.get().getRestTemplate().postForObject(baseURL + "user/update", userModTO, UserTO.class);
     }
 
-    public UserTO delete(Long id)
-            throws SyncopeClientCompositeErrorException {
-
+    @Override
+    public UserTO delete(final Long id) {
         return SyncopeSession.get().getRestTemplate().getForObject(baseURL + "user/delete/{userId}", UserTO.class, id);
     }
 
-    public UserTO read(Long id) {
+    public UserTO read(final Long id) {
         UserTO userTO = null;
         try {
             userTO = SyncopeSession.get().getRestTemplate().getForObject(
@@ -80,7 +81,7 @@ public class UserRestClient extends Abst
         return userTO;
     }
 
-    public UserTO read(String username) {
+    public UserTO read(final String username) {
         UserTO userTO = null;
         try {
             userTO = SyncopeSession.get().getRestTemplate().getForObject(
@@ -95,18 +96,13 @@ public class UserRestClient extends Abst
         return SyncopeSession.get().getRestTemplate().getForObject(baseURL + "user/read/self", UserTO.class);
     }
 
+    @Override
     public Integer searchCount(final NodeCond searchCond) {
         return SyncopeSession.get().getRestTemplate().postForObject(
                 baseURL + "user/search/count.json", searchCond, Integer.class);
     }
 
-    public List<UserTO> search(final NodeCond searchCond)
-            throws SyncopeClientCompositeErrorException {
-
-        return Arrays.asList(SyncopeSession.get().getRestTemplate().postForObject(
-                baseURL + "user/search", searchCond, UserTO[].class));
-    }
-
+    @Override
     public List<UserTO> search(final NodeCond searchCond, final int page, final int size)
             throws SyncopeClientCompositeErrorException {
 
@@ -114,10 +110,13 @@ public class UserRestClient extends Abst
                 baseURL + "user/search/{page}/{size}", searchCond, UserTO[].class, page, size));
     }
 
+    @Override
     public ConnObjectTO getRemoteObject(final String resourceName, final String objectId)
             throws SyncopeClientCompositeErrorException {
+
         return SyncopeSession.get().getRestTemplate().getForObject(
-                baseURL + "/resource/{resourceName}/read/{objectId}.json", ConnObjectTO.class, resourceName, objectId);
+                baseURL + "/resource/{resourceName}/read/USER/{objectId}.json",
+                ConnObjectTO.class, resourceName, objectId);
     }
 
     public UserTO reactivate(long userId, List<StatusBean> statuses)

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/WorkflowRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/WorkflowRestClient.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/WorkflowRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/WorkflowRestClient.java Thu Dec 20 15:45:28 2012
@@ -24,7 +24,7 @@ import org.apache.syncope.client.validat
 import org.apache.syncope.console.SyncopeSession;
 
 @Component
-public class WorkflowRestClient extends AbstractBaseRestClient {
+public class WorkflowRestClient extends BaseRestClient {
 
     public WorkflowDefinitionTO getDefinition()
             throws SyncopeClientCompositeErrorException {

Copied: syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/AttrColumn.java (from r1422934, syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/UserAttrColumn.java)
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/AttrColumn.java?p2=syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/AttrColumn.java&p1=syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/UserAttrColumn.java&r1=1422934&r2=1424538&rev=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/UserAttrColumn.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/AttrColumn.java Thu Dec 20 15:45:28 2012
@@ -19,15 +19,15 @@
 package org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table;
 
 import java.util.List;
+import org.apache.syncope.client.to.AbstractAttributableTO;
 import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.repeater.Item;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.ResourceModel;
-import org.apache.syncope.client.to.UserTO;
 
-public class UserAttrColumn extends AbstractColumn<UserTO, String> {
+public class AttrColumn extends AbstractColumn<AbstractAttributableTO, String> {
 
     private static final long serialVersionUID = 2624734332447371372L;
 
@@ -43,7 +43,7 @@ public class UserAttrColumn extends Abst
 
     private final SchemaType schemaType;
 
-    public UserAttrColumn(final String name, final SchemaType schemaType) {
+    public AttrColumn(final String name, final SchemaType schemaType) {
 
         super(new ResourceModel(name, name), name);
         this.name = name;
@@ -51,8 +51,8 @@ public class UserAttrColumn extends Abst
     }
 
     @Override
-    public void populateItem(final Item<ICellPopulator<UserTO>> cellItem, final String componentId,
-            final IModel<UserTO> rowModel) {
+    public void populateItem(final Item<ICellPopulator<AbstractAttributableTO>> cellItem, final String componentId,
+            final IModel<AbstractAttributableTO> rowModel) {
 
         List<String> values = null;
 

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/TokenColumn.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/TokenColumn.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/TokenColumn.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/TokenColumn.java Thu Dec 20 15:45:28 2012
@@ -18,6 +18,8 @@
  */
 package org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table;
 
+import org.apache.syncope.client.to.AbstractAttributableTO;
+import org.apache.syncope.client.to.UserTO;
 import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
 import org.apache.wicket.markup.html.basic.Label;
@@ -25,9 +27,8 @@ import org.apache.wicket.markup.repeater
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.ResourceModel;
 import org.springframework.util.StringUtils;
-import org.apache.syncope.client.to.UserTO;
 
-public class TokenColumn extends AbstractColumn<UserTO, String> {
+public class TokenColumn extends AbstractColumn<AbstractAttributableTO, String> {
 
     private static final long serialVersionUID = 8077865338230121496L;
 
@@ -36,13 +37,15 @@ public class TokenColumn extends Abstrac
     }
 
     @Override
-    public void populateItem(final Item<ICellPopulator<UserTO>> cellItem, final String componentId,
-            final IModel<UserTO> rowModel) {
+    public void populateItem(final Item<ICellPopulator<AbstractAttributableTO>> cellItem, final String componentId,
+            final IModel<AbstractAttributableTO> rowModel) {
 
-        if (StringUtils.hasText(rowModel.getObject().getToken())) {
-            cellItem.add(new Label(componentId, new ResourceModel("tokenValued", "tokenValued")));
-        } else {
-            cellItem.add(new Label(componentId, new ResourceModel("tokenNotValued", "tokenNotValued")));
+        if (rowModel.getObject() instanceof UserTO) {
+            if (StringUtils.hasText(((UserTO) rowModel.getObject()).getToken())) {
+                cellItem.add(new Label(componentId, new ResourceModel("tokenValued", "tokenValued")));
+            } else {
+                cellItem.add(new Label(componentId, new ResourceModel("tokenNotValued", "tokenNotValued")));
+            }
         }
     }
 }
\ No newline at end of file

Modified: syncope/trunk/console/src/main/resources/applicationContext.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/applicationContext.xml?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/applicationContext.xml (original)
+++ syncope/trunk/console/src/main/resources/applicationContext.xml Thu Dec 20 15:45:28 2012
@@ -113,8 +113,6 @@ under the License.
     </property>
   </bean>
 
-  <bean id="StatusUtils" class="org.apache.syncope.console.commons.StatusUtils"/>
-
   <bean id="preferenceManager" class="org.apache.syncope.console.commons.PreferenceManager"/>
 
   <bean id="xmlRolesReader" class="org.apache.syncope.console.commons.XMLRolesReader"/>

Propchange: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Dec 20 15:45:28 2012
@@ -0,0 +1,16 @@
+.Schema.html.swp
+.WelcomePage.html.swp
+.PropagationTaskModalPage.html.swp
+.ConnectorModalPage.html.swp
+.ExecMessageModalPage.html.swp
+.UserOwnerSelectModalPage.html.swp
+.RoleModalPage.html.swp
+.ConfigurationModalPage.html.swp
+.BasePage.html.swp
+.SchedTaskModalPage.html.swp
+.HomePage.html.swp
+.ReportModalPage.html.swp
+.Resources.html.swp
+.DisplayAttributesModalPage.html.swp
+.Login.html.swp
+.Users.html.swp

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ApprovalModalPage.html
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ApprovalModalPage.html?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ApprovalModalPage.html (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ApprovalModalPage.html Thu Dec 20 15:45:28 2012
@@ -1,57 +1,61 @@
 <!--
- Licensed 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
+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
+  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.
- under the License.
+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.
 -->
 <wicket:extend>
-    <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+  <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
 <div style="margin:10px">
-    <form wicket:id="form">
-        <div id="tabs">
-            <ul>
-                <li class="tabs-selected">
-                    <a href="#tabs-1"><span><wicket:message key="tab1"/></span></a>
-                </li>
-            </ul>
-            <div id="tabs-1">
-                <div id="formtable">
-                    <div class="tablerow" wicket:id="propView">
-                        <div class="tablecolumn_label medium_dynamicsize">
-                            <span wicket:id="key">[key]</span>
-                        </div>
-                        <div class="tablecolumn_field medium_dynamicsize">
-                            <span wicket:id="value">[value]</span>
+  <form wicket:id="form">
+    <div id="tabs">
+      <ul>
+        <li class="tabs-selected">
+          <a href="#tabs-1"><span><wicket:message key="tab1"/></span></a>
+        </li>
+      </ul>
+      <div id="tabs-1">
+        <div id="formtable">
+          <div class="tablerow" wicket:id="propView">
+            <div class="tablecolumn_label medium_dynamicsize">
+              <span wicket:id="key">[key]</span>
+            </div>
+            <div class="tablecolumn_field medium_dynamicsize">
+              <span wicket:id="value">[value]</span>
 
-                        </div>
-                    </div>
+            </div>
+          </div>
 
-                    <!-- inside the container in order to re-process javascript -->
-                    <script type="text/javascript">
-                        $(function() {
-                            $('#formtable div.tablerow:even').addClass("alt");
-                        });
-                    </script>
-                </div>
+          <!-- inside the container in order to re-process javascript -->
+          <script type="text/javascript">
+            $(function() {
+              $('#formtable div.tablerow:even').addClass("alt");
+            });
+          </script>
+        </div>
 
-                <div style="margin: 20px 10px 0">
-                    <input type="submit"
-                           class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
-                           wicket:id="apply"/>
-                    <input type="button"
-                           accept=""class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
-                           wicket:id="cancel"/>
-                </div>
-            </div>
+        <div style="margin: 20px 10px 0">
+          <input type="submit"
+                 class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+                 wicket:id="apply"/>
+          <input type="button"
+                 accept=""class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+                 wicket:id="cancel"/>
         </div>
-    </form>
+      </div>
+    </div>
+  </form>
 </div>
-</wicket:extend>
\ No newline at end of file
+</wicket:extend>

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/BaseModalPage.html
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/BaseModalPage.html?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/BaseModalPage.html (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/BaseModalPage.html Thu Dec 20 15:45:28 2012
@@ -1,16 +1,20 @@
 <!--
- Licensed 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.
- under the License.
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 -->
 <html>
   <head>

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/BasePage.html
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/BasePage.html?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/BasePage.html (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/BasePage.html Thu Dec 20 15:45:28 2012
@@ -1,19 +1,23 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <!--
- Licensed 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.
- under the License.
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 -->
-<html xmlns="http://www.w3.org/1999/xhtml" lang="it" xml:lang="it">
+<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <meta http-equiv="Content-Style-Type" content="text/css"/>
@@ -38,6 +42,7 @@
     <script type="text/javascript">
       $(document).ready(function() {
         $("#tabs").tabs();
+        $("#roletabs").tabs();
         $("#user").tabs();
         $("#role").tabs();
         $("#membership").tabs();



Mime
View raw message