portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vku...@apache.org
Subject svn commit: r728008 - in /portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security: JetspeedPrincipalManagementPortlet.java users/WicketUserAdmin.java
Date Fri, 19 Dec 2008 12:20:25 GMT
Author: vkumar
Date: Fri Dec 19 04:20:24 2008
New Revision: 728008

URL: http://svn.apache.org/viewvc?rev=728008&view=rev
Log:
Modifying JetspeedPrincipalManagement to configure it from preference

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/users/WicketUserAdmin.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=728008&r1=728007&r2=728008&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 04:20:24 2008
@@ -137,19 +137,14 @@
     public JetspeedPrincipalManagementPortlet()
     {
         super();
-        principalParam = getInitParam(principalParamName);
+        principalParam = getPreference(principalParamName);
+        if(principalParam == null)
+        {
+        	principalParam = getInitParam(principalParamName);	
+        }        
         principalType = getJetspeedPrincipalManagerProvider().getPrincipalType(principalParam);
         ITab tab = null;
         tabs = new ArrayList();
-        this.userNameList = new ArrayList();
-        try
-        {
-            userNameList = getUserManager().getUsers(getSearchString());
-        }
-        catch (Exception e)
-        {
-            e.printStackTrace();
-        }
         final CheckGroup group = new CheckGroup("group", new ArrayList());
         Form form = new Form("form")
         {

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/users/WicketUserAdmin.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/users/WicketUserAdmin.java?rev=728008&r1=728007&r2=728008&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/users/WicketUserAdmin.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/users/WicketUserAdmin.java
Fri Dec 19 04:20:24 2008
@@ -64,7 +64,37 @@
         }
         return paramValue;
     }
-
+    
+    public String getPreference(String key)
+    {
+    	String preferenceValue=null;;
+    	if(getPortletRequest().getPreferences().getMap().containsKey(key))
+    	{
+    		preferenceValue = getPortletRequest().getPreferences().getValue(key, null);
+    	}
+    	return preferenceValue;
+    }
+    
+    public String getPreference(String key,String defaultValue)
+    {
+    	String preferenceValue=null;;
+    	if(getPortletRequest().getPreferences().getMap().containsKey(key))
+    	{
+    		preferenceValue = getPortletRequest().getPreferences().getValue(key, defaultValue);
+    	}
+    	return preferenceValue;
+    }
+    
+    public String [] getPreference(String key,String values [])
+    {
+    	String preferenceValue[]=null;;
+    	if(getPortletRequest().getPreferences().getMap().containsKey(key))
+    	{
+    		preferenceValue = getPortletRequest().getPreferences().getValues(key, null);
+    	}
+    	return preferenceValue;
+    }
+    
     protected PortletRequest getPortletRequest()
     {
         return ((PortletRequestContext) RequestContext.get()).getPortletRequest();



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