portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vku...@apache.org
Subject svn commit: r728051 - /portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/JetspeedPrincipalManagementPortlet.java
Date Fri, 19 Dec 2008 15:54:44 GMT
Author: vkumar
Date: Fri Dec 19 07:54:43 2008
New Revision: 728051

URL: http://svn.apache.org/viewvc?rev=728051&view=rev
Log:
Updating Generic JetspeedPrincipalWicket portlet

Modified:
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/JetspeedPrincipalManagementPortlet.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=728051&r1=728050&r2=728051&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
Fri Dec 19 07:54:43 2008
@@ -85,37 +85,20 @@
 public class JetspeedPrincipalManagementPortlet extends WicketUserAdmin
 {
     private Log log;
+    
     private static final String principalParamName = "principalParam";
-    private String principalParam;
-    private JetspeedPrincipalManager manager;
+    private static final java.sql.Date MAX_DATE = java.sql.Date.valueOf("8099-01-01");
+    
+    private String principalParam;    
     private JetspeedPrincipalType principalType;
-    protected List userNameList;
     protected String searchString;
     protected boolean filtered;
     protected JetspeedPrincipal principal;
     protected String selectedUserName;
-    protected List tabs;
+    
     protected List principalList;
-    // String tabNames[][] = new String[5][2];
-    private static final java.sql.Date MAX_DATE = java.sql.Date.valueOf("8099-01-01");
-    protected boolean detailMode;
-
-    /**
-     * @return the detailMode
-     */
-    public boolean isDetailMode()
-    {
-        return detailMode;
-    }
-
-    /**
-     * @param detailMode
-     *            the detailMode to set
-     */
-    public void setDetailMode(boolean detailMode)
-    {
-        this.detailMode = detailMode;
-    }
+    
+    
 
     /**
      * @return the principalList
@@ -136,7 +119,9 @@
 
     public JetspeedPrincipalManagementPortlet()
     {
-        super();
+        super();       
+        List tabs;
+                
         principalParam = getPreference(principalParamName);
         if(principalParam == null)
         {
@@ -241,18 +226,13 @@
         this.principal = principal;
     }
 
-    public void setUserNameList(List userNameList)
-    {
-        this.userNameList = userNameList;
-    }
-
     protected class UserPrincipalProfilePanel extends Panel
     {
         protected String locatorName;
         protected String ruleName;
         protected List fullRules;
         protected List userRules;
-        boolean userEnabled;
+        protected boolean userEnabled;
 
         /**
          * @param userEnabled
@@ -526,8 +506,8 @@
 
     protected class PrincipalProfilePanel extends Panel
     {
-        boolean userEnabled = false;
-        String name;
+    	protected boolean userEnabled = false;
+        protected String name;
         protected String locatorName;
         protected String ruleName;
         protected List fullRules;
@@ -1041,14 +1021,12 @@
 
     protected class AssociationTypePanel extends Panel
     {
-        private JetspeedPrincipalManager localManager;
-        private JetspeedPrincipalType type;
-        private List names = new ArrayList();
-        private List associations = new ArrayList();
-        private String associationName;
-        private JetspeedPrincipal associationPrincipal;
-        private JetspeedPrincipalAssociationType assoicationType;
-        boolean associationsFrom;
+    	protected List names = new ArrayList();
+    	protected List associations = new ArrayList();
+    	protected String associationName;
+        protected JetspeedPrincipal associationPrincipal;
+        protected JetspeedPrincipalAssociationType assoicationType;
+        protected boolean associationsFrom;
 
         /**
          * @return the associations
@@ -1116,7 +1094,6 @@
                 public void populateItem(final ListItem listItem)
                 {
                     final JetspeedPrincipal principal = (JetspeedPrincipal) listItem.getModelObject();
-                    final JetspeedPrincipalManager manager = getManager();
                     listItem.add(new Label("Name", principal.getName()));
                     listItem.add(new Link("delete")
                     {
@@ -1127,11 +1104,11 @@
                             {
                                 if (!associationsFrom)
                                 {
-                                    manager.removeAssociation(principal, getPrincipal(),
assoctionName);
+                                	getManager().removeAssociation(principal, getPrincipal(),
assoctionName);
                                 }
                                 else
                                 {
-                                    manager.removeAssociation(getPrincipal(), principal,
assoctionName);
+                                	getManager().removeAssociation(getPrincipal(), principal,
assoctionName);
                                 }
                                 refreshList();
                             }
@@ -1195,7 +1172,6 @@
                 {
                     names.add(tempNames.get(index));
                 }
-                type = assoicationType.getFromPrincipalType();
                 associationsFrom = false;
             }
             else
@@ -1207,7 +1183,6 @@
                 {
                     names.add(tempNames.get(index));
                 }
-                type = assoicationType.getToPrincipalType();
                 associationsFrom = true;
             }
             for (int count = 0; count < associations.size(); count++)
@@ -1228,7 +1203,7 @@
 
     protected class PrincipalAssociationsPanel extends Panel
     {
-        private List tabs;
+    	protected List tabs;
 
         /**
          * @return the selectedAssociationType
@@ -1330,11 +1305,7 @@
 
     private JetspeedPrincipalManager getManager()
     {
-        if (manager == null)
-        {
-            manager = getJetspeedPrincipalManagerProvider().getManager(principalType);
-        }
-        return manager;
+        return getJetspeedPrincipalManagerProvider().getManager(principalType);
     }
 
     private List getSubsites()



---------------------------------------------------------------------
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