syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject svn commit: r1558329 [2/2] - in /syncope/branches/1_1_X: ./ 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/console/pages/panels/
Date Wed, 15 Jan 2014 09:57:18 GMT
Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/MembershipsPanel.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/MembershipsPanel.java?rev=1558329&r1=1558328&r2=1558329&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/MembershipsPanel.java
(original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/MembershipsPanel.java
Wed Jan 15 09:57:17 2014
@@ -23,7 +23,6 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import javax.swing.tree.DefaultMutableTreeNode;
-import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.to.MembershipTO;
 import org.apache.syncope.common.to.RoleTO;
 import org.apache.syncope.common.to.UserTO;
@@ -123,7 +122,7 @@ public class MembershipsPanel extends Pa
 
                             @Override
                             public Page createPage() {
-                                PageReference pageRef = PageUtils.getPageReference(getPage());
+                                PageReference pageRef = getPage().getPageReference();
 
                                 for (MembershipTO membTO : membView.getList()) {
                                     if (membTO.getRoleId() == roleTO.getId()) {
@@ -152,68 +151,67 @@ public class MembershipsPanel extends Pa
         membView = new ListView<MembershipTO>("memberships",
                 new PropertyModel<List<? extends MembershipTO>>(userTO, "memberships"))
{
 
-                    private static final long serialVersionUID = 9101744072914090143L;
+            private static final long serialVersionUID = 9101744072914090143L;
 
-                    @Override
-                    protected void populateItem(final ListItem<MembershipTO> item)
{
-                        final MembershipTO membershipTO = (MembershipTO) item.getDefaultModelObject();
+            @Override
+            protected void populateItem(final ListItem<MembershipTO> item) {
+                final MembershipTO membershipTO = (MembershipTO) item.getDefaultModelObject();
 
-                        item.add(new Label("roleId", new Model<Long>(membershipTO.getRoleId())));
-                        item.add(new Label("roleName", new Model<String>(membershipTO.getRoleName())));
+                item.add(new Label("roleId", new Model<Long>(membershipTO.getRoleId())));
+                item.add(new Label("roleName", new Model<String>(membershipTO.getRoleName())));
 
-                        AjaxLink editLink = new ClearIndicatingAjaxLink("editLink", pageRef)
{
+                AjaxLink editLink = new ClearIndicatingAjaxLink("editLink", pageRef) {
 
-                            private static final long serialVersionUID = -7978723352517770644L;
+                    private static final long serialVersionUID = -7978723352517770644L;
 
-                            @Override
-                            protected void onClickInternal(final AjaxRequestTarget target)
{
-                                membWin.setPageCreator(new ModalWindow.PageCreator() {
+                    @Override
+                    protected void onClickInternal(final AjaxRequestTarget target) {
+                        membWin.setPageCreator(new ModalWindow.PageCreator() {
 
-                                    private static final long serialVersionUID = -7834632442532690940L;
+                            private static final long serialVersionUID = -7834632442532690940L;
 
-                                    @Override
-                                    public Page createPage() {
-                                        return new MembershipModalPage(PageUtils.getPageReference(getPage()),
membWin,
-                                                membershipTO, templateMode);
+                            @Override
+                            public Page createPage() {
+                                return new MembershipModalPage(getPage().getPageReference(),
membWin,
+                                        membershipTO, templateMode);
 
-                                    }
-                                });
-                                membWin.show(target);
                             }
-                        };
-                        item.add(editLink);
+                        });
+                        membWin.show(target);
+                    }
+                };
+                item.add(editLink);
 
-                        AjaxLink deleteLink = new IndicatingDeleteOnConfirmAjaxLink("deleteLink",
pageRef) {
+                AjaxLink deleteLink = new IndicatingDeleteOnConfirmAjaxLink("deleteLink",
pageRef) {
 
-                            private static final long serialVersionUID = -7978723352517770644L;
+                    private static final long serialVersionUID = -7978723352517770644L;
 
-                            @Override
-                            protected void onClickInternal(final AjaxRequestTarget target)
{
-                                userTO.removeMembership(membershipTO);
-                                target.add(membershipsContainer);
+                    @Override
+                    protected void onClickInternal(final AjaxRequestTarget target) {
+                        userTO.removeMembership(membershipTO);
+                        target.add(membershipsContainer);
 
-                                RoleTO roleTO = RoleUtils.findRole(roleTreeBuilder, membershipTO.getRoleId());
-                                Set<String> resourcesToRemove = roleTO == null
+                        RoleTO roleTO = RoleUtils.findRole(roleTreeBuilder, membershipTO.getRoleId());
+                        Set<String> resourcesToRemove = roleTO == null
                                 ? Collections.<String>emptySet() : roleTO.getResources();
-                                if (!resourcesToRemove.isEmpty()) {
-                                    Set<String> resourcesAssignedViaMembership = new
HashSet<String>();
-                                    for (MembershipTO membTO : userTO.getMemberships()) {
-                                        roleTO = RoleUtils.findRole(roleTreeBuilder, membTO.getRoleId());
-                                        if (roleTO != null) {
-                                            resourcesAssignedViaMembership.addAll(roleTO.getResources());
-                                        }
-                                    }
-                                    resourcesToRemove.removeAll(resourcesAssignedViaMembership);
-                                    resourcesToRemove.removeAll(userTO.getResources());
+                        if (!resourcesToRemove.isEmpty()) {
+                            Set<String> resourcesAssignedViaMembership = new HashSet<String>();
+                            for (MembershipTO membTO : userTO.getMemberships()) {
+                                roleTO = RoleUtils.findRole(roleTreeBuilder, membTO.getRoleId());
+                                if (roleTO != null) {
+                                    resourcesAssignedViaMembership.addAll(roleTO.getResources());
                                 }
-
-                                StatusUtils.update(statusPanel, target, Collections.<String>emptySet(),
-                                        resourcesToRemove);
                             }
-                        };
-                        item.add(deleteLink);
+                            resourcesToRemove.removeAll(resourcesAssignedViaMembership);
+                            resourcesToRemove.removeAll(userTO.getResources());
+                        }
+
+                        StatusUtils.update(statusPanel, target, Collections.<String>emptySet(),
resourcesToRemove);
                     }
                 };
+                item.add(deleteLink);
+            }
+        };
 
         membershipsContainer.add(membView);
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleDetailsPanel.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleDetailsPanel.java?rev=1558329&r1=1558328&r2=1558329&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleDetailsPanel.java
(original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleDetailsPanel.java
Wed Jan 15 09:57:17 2014
@@ -18,7 +18,6 @@
  */
 package org.apache.syncope.console.pages.panels;
 
-import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.to.RoleTO;
 import org.apache.syncope.common.to.UserTO;
 import org.apache.syncope.common.types.AttributableType;
@@ -102,7 +101,7 @@ public class RoleDetailsPanel extends Pa
 
                         @Override
                         public Page createPage() {
-                            return new RoleSelectModalPage(PageUtils.getPageReference(getPage()),
parentSelectWin,
+                            return new RoleSelectModalPage(getPage().getPageReference(),
parentSelectWin,
                                     ParentSelectPayload.class);
                         }
                     });
@@ -159,7 +158,7 @@ public class RoleDetailsPanel extends Pa
 
                     @Override
                     public Page createPage() {
-                        return new UserOwnerSelectModalPage(PageUtils.getPageReference(getPage()),
userOwnerSelectWin);
+                        return new UserOwnerSelectModalPage(getPage().getPageReference(),
userOwnerSelectWin);
                     }
                 });
                 userOwnerSelectWin.show(target);
@@ -195,7 +194,7 @@ public class RoleDetailsPanel extends Pa
 
                     @Override
                     public Page createPage() {
-                        return new RoleSelectModalPage(PageUtils.getPageReference(getPage()),
parentSelectWin,
+                        return new RoleSelectModalPage(getPage().getPageReference(), parentSelectWin,
                                 RoleOwnerSelectPayload.class);
                     }
                 });

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSearchResultPanel.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSearchResultPanel.java?rev=1558329&r1=1558328&r2=1558329&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSearchResultPanel.java
(original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSearchResultPanel.java
Wed Jan 15 09:57:17 2014
@@ -22,7 +22,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
-import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.search.NodeCond;
 import org.apache.syncope.common.to.AbstractAttributableTO;
 import org.apache.syncope.common.to.RoleTO;
@@ -66,7 +65,7 @@ public class RoleSearchResultPanel exten
         final List<IColumn<AbstractAttributableTO, String>> columns =
                 new ArrayList<IColumn<AbstractAttributableTO, String>>();
 
-        final String[] colnames = { "id", "name", "entitlements" };
+        final String[] colnames = {"id", "name", "entitlements"};
         for (String name : colnames) {
             columns.add(
                     new PropertyColumn<AbstractAttributableTO, String>(new ResourceModel(name,
name), name, name));
@@ -85,8 +84,7 @@ public class RoleSearchResultPanel exten
             public void populateItem(final Item<ICellPopulator<AbstractAttributableTO>>
cellItem,
                     final String componentId, final IModel<AbstractAttributableTO>
model) {
 
-                final ActionLinksPanel panel =
-                        new ActionLinksPanel(componentId, model, PageUtils.getPageReference(page));
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, page.getPageReference());
 
                 panel.add(new ActionLink() {
 
@@ -100,8 +98,7 @@ public class RoleSearchResultPanel exten
 
                             @Override
                             public Page createPage() {
-                                return new StatusModalPage(PageUtils.getPageReference(page),
-                                        statusmodal, model.getObject());
+                                return new StatusModalPage(page.getPageReference(), statusmodal,
model.getObject());
                             }
                         });
 
@@ -122,7 +119,7 @@ public class RoleSearchResultPanel exten
                             @Override
                             public Page createPage() {
                                 return new RoleModalPage(
-                                        PageUtils.getPageReference(page), editmodal, (RoleTO)
model.getObject());
+                                        page.getPageReference(), editmodal, (RoleTO) model.getObject());
                             }
                         });
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java?rev=1558329&r1=1558328&r2=1558329&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java
(original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java
Wed Jan 15 09:57:17 2014
@@ -24,7 +24,6 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Date;
 import java.util.List;
-import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.search.NodeCond;
 import org.apache.syncope.common.to.AbstractAttributableTO;
 import org.apache.syncope.common.to.UserTO;
@@ -140,8 +139,7 @@ public class UserSearchResultPanel exten
             @Override
             public ActionLinksPanel getActions(final String componentId, final IModel<AbstractAttributableTO>
model) {
 
-                final ActionLinksPanel panel =
-                        new ActionLinksPanel(componentId, model, PageUtils.getPageReference(page));
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, page.getPageReference());
 
                 panel.add(new ActionLink() {
 
@@ -155,8 +153,7 @@ public class UserSearchResultPanel exten
 
                             @Override
                             public Page createPage() {
-                                return new StatusModalPage(PageUtils.getPageReference(page),
-                                        statusmodal, model.getObject());
+                                return new StatusModalPage(page.getPageReference(), statusmodal,
model.getObject());
                             }
                         });
 
@@ -178,7 +175,7 @@ public class UserSearchResultPanel exten
                             public Page createPage() {
                                 // SYNCOPE-294: re-read userTO before edit
                                 UserTO userTO = ((UserRestClient) restClient).read(model.getObject().getId());
-                                return new EditUserModalPage(PageUtils.getPageReference(page),
editmodal, userTO);
+                                return new EditUserModalPage(page.getPageReference(), editmodal,
userTO);
                             }
                         });
 
@@ -220,8 +217,7 @@ public class UserSearchResultPanel exten
 
             @Override
             public ActionLinksPanel getHeader(final String componentId) {
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, new Model(),
-                        PageUtils.getPageReference(page));
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, new Model(),
page.getPageReference());
 
                 panel.add(new ActionLink() {
 
@@ -235,7 +231,7 @@ public class UserSearchResultPanel exten
 
                             @Override
                             public Page createPage() {
-                                return new DisplayAttributesModalPage(PageUtils.getPageReference(page),
displaymodal,
+                                return new DisplayAttributesModalPage(page.getPageReference(),
displaymodal,
                                         schemaNames, dSchemaNames, vSchemaNames);
                             }
                         });

Modified: syncope/branches/1_1_X/pom.xml
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/pom.xml?rev=1558329&r1=1558328&r2=1558329&view=diff
==============================================================================
--- syncope/branches/1_1_X/pom.xml (original)
+++ syncope/branches/1_1_X/pom.xml Wed Jan 15 09:57:17 2014
@@ -330,7 +330,7 @@ under the License.
 
     <cocoon.version>3.0.0-alpha-3</cocoon.version>
 
-    <wicket.version>6.13.0</wicket.version>
+    <wicket.version>6.14.0-SNAPSHOT</wicket.version>
 
     <groovy.version>2.2.1</groovy.version>
 



Mime
View raw message