portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vku...@apache.org
Subject svn commit: r774386 - in /portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security: JetspeedPrincipalManagementPortlet.java PrincipaDataProvider.java
Date Wed, 13 May 2009 14:49:46 GMT
Author: vkumar
Date: Wed May 13 14:49:46 2009
New Revision: 774386

URL: http://svn.apache.org/viewvc?rev=774386&view=rev
Log:
Fixing NotSerializableException in j2-admin's PrincipalManagement portlet 
https://issues.apache.org/jira/browse/JS2-1010

Modified:
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/JetspeedPrincipalManagementPortlet.java
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/PrincipaDataProvider.java

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/JetspeedPrincipalManagementPortlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/JetspeedPrincipalManagementPortlet.java?rev=774386&r1=774385&r2=774386&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/JetspeedPrincipalManagementPortlet.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/JetspeedPrincipalManagementPortlet.java
Wed May 13 14:49:46 2009
@@ -56,8 +56,6 @@
 import org.apache.jetspeed.security.User;
 import org.apache.jetspeed.security.UserCredential;
 import org.apache.jetspeed.security.UserManager;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.form.AjaxButton;
 import org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
 import org.apache.wicket.extensions.markup.html.repeater.data.sort.OrderByLink;
 import org.apache.wicket.extensions.markup.html.repeater.data.sort.OrderByLink.VoidCssProvider;
@@ -238,7 +236,7 @@
     public void setSearchString(String searchString)
     {
         this.searchString = (searchString == null ? "" : searchString.trim());        
-        principalDataProvider.refresh(searchString);
+        principalDataProvider.refresh(getManager(),searchString);
         setPrincipal(null);
         controlPannels(false);
     }
@@ -321,7 +319,7 @@
                         getPrincipal().setEnabled(isUserEnabled());
                         getManager().updatePrincipal(principal);
                         setPrincipal(principal);
-                        principalDataProvider.refresh(getSearchString());
+                        principalDataProvider.refresh(getManager(),getSearchString());
                     }
                     catch (SecurityException jSx)
                     {
@@ -340,7 +338,7 @@
                         getManager().removePrincipal(principal.getName());
                         setPrincipal(null);
                         controlPannels(false);
-                        principalDataProvider.refresh(getSearchString());
+                        principalDataProvider.refresh(getManager(),getSearchString());
                     }
                     catch (SecurityException e)
                     {
@@ -772,7 +770,7 @@
                     {
                         log.error("Failed to update user.", jSx);
                     }
-                    principalDataProvider.refresh(getSearchString());
+                    principalDataProvider.refresh(getManager(),getSearchString());
                 }
             };
             userForm.add(newUser);
@@ -823,7 +821,7 @@
 						getManager().addPrincipal(principal, null);
 						setPrincipal(principal);
 						controlPannels(true);
-						principalDataProvider.refresh(getSearchString());
+						principalDataProvider.refresh(getManager(),getSearchString());
 					}
 				    catch (SecurityException jSx)
 	                {
@@ -913,7 +911,7 @@
                         principal.setEnabled(isUserEnabled());
                         getManager().updatePrincipal(principal);
                         setPrincipal(principal);
-                        principalDataProvider.refresh(getSearchString());
+                        principalDataProvider.refresh(getManager(),getSearchString());
                     } catch (SecurityException jSx)
                     {
                         error(jSx.getMessage());
@@ -929,7 +927,7 @@
                         getManager().removePrincipal(principal.getName());
                         setPrincipal(null);
                         controlPannels(false);
-                        principalDataProvider.refresh(getSearchString());
+                        principalDataProvider.refresh(getManager(),getSearchString());
                     }
                     catch (SecurityException e)
                     {

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/PrincipaDataProvider.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/PrincipaDataProvider.java?rev=774386&r1=774385&r2=774386&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/PrincipaDataProvider.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/PrincipaDataProvider.java
Wed May 13 14:49:46 2009
@@ -18,15 +18,11 @@
 {
     public enum OrderBy { NAME_ASC, NAME_DESC }
     private OrderBy order = OrderBy.NAME_ASC;
-    private JetspeedPrincipalManager manager;
-    private String searchString;
     private List<JetspeedPrincipal> principalList = new ArrayList<JetspeedPrincipal>();
     
     public PrincipaDataProvider(JetspeedPrincipalManager manager,String search)
     {
-        this.manager = manager;
-        searchString = search;
-        refresh(search);
+        refresh(manager,search);
     }
     
     public Iterator<? extends JetspeedPrincipal> iterator(int first, int count)
@@ -63,7 +59,7 @@
         Collections.sort(principalList, new PrincipalComparator(getOrderBy()));
     }
     
-    public void refresh(String searchString)
+    public void refresh(JetspeedPrincipalManager manager, String searchString)
     {
         principalList = (List<JetspeedPrincipal>) manager.getPrincipals(searchString);
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message