Merge from master

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

Branch: refs/heads/SYNCOPE-156
Commit: a95b955d82132ad8e1f6b5f88b38b23d45f00b9d
Parents: 5336431 9abd35a
Author: Marco Di Sabatino Di Diodoro <[email protected]>
Authored: Wed Aug 19 11:19:29 2015 +0200
Committer: Marco Di Sabatino Di Diodoro <[email protected]>
Committed: Wed Aug 19 11:19:29 2015 +0200

----------------------------------------------------------------------
 .../client/console/panels/ListViewPanel.java    |  68 ++++--
 .../console/panels/NotificationPanel.java       |  19 +-
 .../syncope/client/console/panels/Realm.java    |   2 +-
 .../console/panels/ResourceDetailsPanel.java    |   2 +-
 .../console/panels/ResourceMappingPanel.java    |  48 ----
 .../client/console/panels/ResourceModal.java    |  25 ++-
 .../client/console/rest/AnyTypeRestClient.java  |  20 +-
 .../client/console/topology/Topology.java       |  79 ++-----
 .../console/topology/WebSocketBehavior.java     | 209 +++++++++++++++++
 .../markup/html/form/AjaxCheckBoxPanel.java     |   7 +-
 .../html/form/AjaxDropDownChoicePanel.java      |   7 +-
 .../markup/html/form/AjaxTextFieldPanel.java    |   7 +-
 .../wicket/markup/html/form/FieldPanel.java     |   8 +-
 .../client/console/wizards/AjaxWizard.java      |  79 +++++--
 .../console/wizards/AjaxWizardBuilder.java      |  96 ++++++++
 .../console/wizards/AjaxWizardButtonBar.java    |  28 ++-
 .../client/console/wizards/ProvisionWizard.java | 123 ----------
 .../provision/ProvisionWizardBuilder.java       | 222 +++++++++++++++++++
 .../console/panels/ResourceMappingPanel.html    |  20 --
 .../wizards/ProvisionWizard$AccountLink.html    |  23 --
 .../wizards/ProvisionWizard$Mapping.html        |  23 --
 .../wizards/ProvisionWizard$ObjectType.html     |  30 ---
 .../console/wizards/ProvisionWizard.properties  |  24 --
 .../wizards/ProvisionWizard_it.properties       |  24 --
 .../wizards/ProvisionWizard_pt_BR.properties    |  24 --
 .../ProvisionWizardBuilder$ConnObjectLink.html  |  31 +++
 ...isionWizardBuilder$ConnObjectLink.properties |  20 ++
 ...onWizardBuilder$ConnObjectLink_it.properties |  20 ++
 ...izardBuilder$ConnObjectLink_pt_BR.properties |  20 ++
 .../ProvisionWizardBuilder$Mapping.html         |  23 ++
 .../ProvisionWizardBuilder$Mapping.properties   |  20 ++
 ...ProvisionWizardBuilder$Mapping_it.properties |  20 ++
 ...visionWizardBuilder$Mapping_pt_BR.properties |  20 ++
 .../ProvisionWizardBuilder$ObjectType.html      |  31 +++
 ...ProvisionWizardBuilder$ObjectType.properties |  24 ++
 ...visionWizardBuilder$ObjectType_it.properties |  23 ++
 ...ionWizardBuilder$ObjectType_pt_BR.properties |  23 ++
 37 files changed, 1011 insertions(+), 481 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/a95b955d/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
----------------------------------------------------------------------
diff --cc 
client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
index a35fc09,f31c87c..5c37e14
--- 
a/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
+++ 
b/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
@@@ -63,67 -35,15 +63,67 @@@ public class Realm extends Panel 
          super(id);
          this.realmTO = realmTO;
  
 -        add(new RealmDetails("details", realmTO));
 -        add(new Any("users"));
 -        add(new Any("groups"));
 -        add(new Any("services"));
 -        add(new Any("serviceRoles"));
 -        add(new Any("contexts"));
 -        add(new Any("enactmentEngine"));
 -        add(new AccountPolicy("accountPolicy"));
 -        add(new PasswordPolicy("passwordPolicy"));
 +        List<AnyTypeMenuItem> anyMenu = new ArrayList<>();
 +        List<AnySearchResultPanel> anyList = new ArrayList<>();
 +
-         for (AnyTypeTO anyTypeTO : anyTypeRestClient.list()) {
++        for (AnyTypeTO anyTypeTO : anyTypeRestClient.getAll()) {
 +            anyMenu.add(new AnyTypeMenuItem(anyTypeTO.getKey(), 
MARKUP_ID.toString()));
 +
 +            switch (anyTypeTO.getKind()) {
 +                case USER:
 +                    anyList.add(
 +                            new UserSearchResultPanel(anyTypeTO.getKey(), 
"anytype-contentitem", MARKUP_ID.toString(),
 +                                    false, null, pageReference, 
userRestClient, anyTypeRestClient.getAnyTypeClass(
 +                                            anyTypeTO.getClasses()), 
realmTO.getFullPath()));
 +                    break;
 +                case GROUP:
 +                    anyList.add(
 +                            new GroupSearchResultPanel(anyTypeTO.getKey(), 
"anytype-contentitem", MARKUP_ID.toString(),
 +                                    false, null, pageReference, 
groupRestClient, anyTypeRestClient.getAnyTypeClass(
 +                                            anyTypeTO.getClasses()), 
realmTO.getFullPath()));
 +                    break;
 +                case ANY_OBJECT:
 +                    anyList.add(
 +                            new AnySearchResultPanel(anyTypeTO.getKey(), 
"anytype-contentitem", MARKUP_ID.toString(),
 +                                    false, null, pageReference, 
anyObjectRestClient, anyTypeRestClient.getAnyTypeClass(
 +                                            anyTypeTO.getClasses()), 
realmTO.getFullPath()));
 +                    break;
 +                default:
 +            }
 +            MARKUP_ID++;
 +        }
 +
 +        ListView<AnyTypeMenuItem> menuListView = new 
ListView<AnyTypeMenuItem>("anytype-menu", anyMenu) {
 +
 +            private static final long serialVersionUID = 4949588177564901031L;
 +
 +            @Override
 +            protected void populateItem(final ListItem<AnyTypeMenuItem> item) 
{
 +                item.add(item.getModelObject());
 +                if (item.getIndex() == 0) {
 +                    item.add(new AttributeModifier("class", "active"));
 +                }
 +            }
 +        };
 +        add(menuListView);
 +
 +        add(new ListView<AnySearchResultPanel>("anytype-content", anyList) {
 +
 +            private static final long serialVersionUID = 4949588177564901031L;
 +
 +            @Override
 +            protected void populateItem(final ListItem<AnySearchResultPanel> 
item) {
 +                item.setMarkupId(item.getModelObject().getCustomMarkupId());
 +                item.add(item.getModelObject());
 +                if (item.getIndex() == 0) {
 +                    item.add(new AttributeModifier("class", "tab-pane 
active"));
 +                }
 +            }
 +        });
 +    }
 +
 +    public RealmTO getRealmTO() {
 +        return realmTO;
      }
  
  }

http://git-wip-us.apache.org/repos/asf/syncope/blob/a95b955d/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyTypeRestClient.java
----------------------------------------------------------------------
diff --cc 
client/console/src/main/java/org/apache/syncope/client/console/rest/AnyTypeRestClient.java
index cce0bef,7202082..113e30d
--- 
a/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyTypeRestClient.java
+++ 
b/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyTypeRestClient.java
@@@ -18,11 -18,9 +18,12 @@@
   */
  package org.apache.syncope.client.console.rest;
  
 +import java.util.ArrayList;
  import java.util.List;
+ import org.apache.syncope.common.lib.SyncopeClientException;
 +import org.apache.syncope.common.lib.to.AnyTypeClassTO;
  import org.apache.syncope.common.lib.to.AnyTypeTO;
 +import org.apache.syncope.common.rest.api.service.AnyTypeClassService;
  import org.apache.syncope.common.rest.api.service.AnyTypeService;
  import org.springframework.stereotype.Component;
  
@@@ -32,18 -30,17 +33,25 @@@
  @Component
  public class AnyTypeRestClient extends BaseRestClient {
  
-     private static final long serialVersionUID = -8874495991295283249L;
+     private static final long serialVersionUID = 1L;
  
-     public List<AnyTypeTO> list() {
-         return getService(AnyTypeService.class).list();
+     public List<AnyTypeTO> getAll() {
+         List<AnyTypeTO> types = null;
+ 
+         try {
+             types = getService(AnyTypeService.class).list();
+         } catch (SyncopeClientException e) {
+             LOG.error("While reading all any types", e);
+         }
+ 
+         return types;
      }
 +
 +    public List<AnyTypeClassTO> getAnyTypeClass(final List<String> 
anyTypeClassNames) {
-         List<AnyTypeClassTO> anyTypeClassTOs = new 
ArrayList<AnyTypeClassTO>();
++        List<AnyTypeClassTO> anyTypeClassTOs = new ArrayList<>();
 +        for (String anyTypeClass : anyTypeClassNames) {
 +            
anyTypeClassTOs.add(getService(AnyTypeClassService.class).read(anyTypeClass));
 +        }
 +        return anyTypeClassTOs;
 +    }
- 
  }

Reply via email to