portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r923862 - in /portals/jetspeed-2/portal/trunk: components/jetspeed-portal/src/main/java/org/apache/jetspeed/administration/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/openid/ components/jetspeed-portal/src/test/java/org/ap...
Date Tue, 16 Mar 2010 16:47:03 GMT
Author: rwatler
Date: Tue Mar 16 16:47:03 2010
New Revision: 923862

URL: http://svn.apache.org/viewvc?rev=923862&view=rev
Log:
integrate portal site user folder path enhancements into user registration

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/administration/PortalAdministrationImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/openid/OpenIDRelayingPartyServlet.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/administration/TestPortalAdministrationImpl.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/administration/PortalAdministration.java
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/administration.xml

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/administration/PortalAdministrationImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/administration/PortalAdministrationImpl.java?rev=923862&r1=923861&r2=923862&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/administration/PortalAdministrationImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/administration/PortalAdministrationImpl.java
Tue Mar 16 16:47:03 2010
@@ -24,6 +24,7 @@ import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 import javax.portlet.PortletConfig;
@@ -34,11 +35,17 @@ import org.apache.commons.configuration.
 import org.apache.jetspeed.Jetspeed;
 import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.exception.JetspeedException;
+import org.apache.jetspeed.mockobjects.MockHttpServletRequest;
+import org.apache.jetspeed.mockobjects.request.MockRequestContext;
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.folder.FolderNotFoundException;
 import org.apache.jetspeed.om.folder.InvalidFolderException;
 import org.apache.jetspeed.page.PageManager;
 import org.apache.jetspeed.page.document.NodeException;
+import org.apache.jetspeed.portalsite.PortalSite;
+import org.apache.jetspeed.portalsite.PortalSiteRequestContext;
+import org.apache.jetspeed.portalsite.PortalSiteSessionContext;
+import org.apache.jetspeed.profiler.ProfileLocator;
 import org.apache.jetspeed.profiler.Profiler;
 import org.apache.jetspeed.profiler.rules.ProfilingRule;
 import org.apache.jetspeed.request.RequestContext;
@@ -81,6 +88,7 @@ public class PortalAdministrationImpl im
     protected GroupManager groupManager;
     protected PageManager pageManager;
     protected Profiler profiler;
+    protected PortalSite portalSite;
     protected JavaMailSender mailSender;
     protected VelocityEngine velocityEngine;
     protected AdminUtil adminUtil;
@@ -103,6 +111,7 @@ public class PortalAdministrationImpl im
                                      GroupManager groupManager, 
                                      PageManager pageManager,
                                      Profiler profiler,
+                                     PortalSite portalSite,
                                      JavaMailSender mailSender,
                                      VelocityEngine velocityEngine)
     {
@@ -111,6 +120,7 @@ public class PortalAdministrationImpl im
         this.groupManager = groupManager;
         this.pageManager = pageManager;
         this.profiler = profiler;
+        this.portalSite = portalSite;
         this.mailSender = mailSender;
         this.velocityEngine = velocityEngine;
         this.adminUtil = new AdminUtil();
@@ -141,12 +151,18 @@ public class PortalAdministrationImpl im
         this.adminRole = config.getString(PortalConfigurationConstants.ROLES_DEFAULT_ADMIN);
     }
     
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.administration.PortalAdministration#registerUser(java.lang.String,
java.lang.String)
+     */
     public void registerUser(String userName, String password)
-    throws RegistrationException
+        throws RegistrationException
     {
         registerUser(userName, password, (List)null, null, null, null, null);
     }
 
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.administration.PortalAdministration#registerUser(java.lang.String,
java.lang.String, java.util.List, java.util.List, java.util.Map, java.util.Map, java.lang.String)
+     */
     public void registerUser(
             String userName, 
             String password, 
@@ -155,14 +171,14 @@ public class PortalAdministrationImpl im
             Map userInfo, 
             Map rules, 
             String folderTemplate)
-    throws RegistrationException    
+        throws RegistrationException    
     {
         registerUser(userName, password, roles, groups, userInfo, rules, folderTemplate,
null);
     }
     
     /* (non-Javadoc)
-     * @see org.apache.jetspeed.administration.PortalAdministration#registerUser(java.lang.String,
java.lang.String, java.util.Map, java.awt.List, java.awt.List, java.lang.String)
-     */    
+     * @see org.apache.jetspeed.administration.PortalAdministration#registerUser(java.lang.String,
java.lang.String, java.util.List, java.util.List, java.util.Map, java.util.Map, java.lang.String,
java.lang.String)
+     */
     public void registerUser(
             String userName, 
             String password, 
@@ -172,7 +188,26 @@ public class PortalAdministrationImpl im
             Map rules, 
             String folderTemplate,
             String subsite)
-    throws RegistrationException    
+        throws RegistrationException    
+    {
+        registerUser(userName, password, roles, groups, userInfo, rules, folderTemplate,
subsite, null, null);
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.administration.PortalAdministration#registerUser(java.lang.String,
java.lang.String, java.util.List, java.util.List, java.util.Map, java.util.Map, java.lang.String,
java.lang.String, java.util.Locale, java.lang.String)
+     */
+    public void registerUser(
+            String userName, 
+            String password, 
+            List roles, 
+            List groups, 
+            Map userInfo, 
+            Map rules, 
+            String folderTemplate,
+            String subsite,
+            Locale locale,
+            String serverName)
+        throws RegistrationException    
     {
         try 
         {
@@ -247,27 +282,58 @@ public class PortalAdministrationImpl im
                     }
                 }
             }
-            
+
+            // get template folders
             if (folderTemplate == null)
             {
                 folderTemplate = this.folderTemplate; 
             }
-            
-            if (subsite == null)
+            String userFolderPath = null;
+            if ((subsite == null) && (serverName != null))
             {
-                subsite = Folder.USER_FOLDER + userName;
+                // setup profiler and portal site to determine template
+                // folders paths generate mock request for new user to profile
+                RequestContext request = new MockRequestContext("/");
+                request.setSubject(userManager.getSubject(user));
+                request.setLocale((locale != null) ? locale : Locale.getDefault());
+                MockHttpServletRequest servletRequest = new MockHttpServletRequest();
+                servletRequest.setServerName(serverName);
+System.out.println(">>>>>>>>>>>>>>>>>>>>>>>
user locale: "+locale);
+System.out.println(">>>>>>>>>>>>>>>>>>>>>>>
user server name: "+serverName);
+                
+                // get profile locators map for new user request
+                Map locators = profiler.getProfileLocators(request , user);
+                if (locators.size() == 0)
+                {
+                    locators = profiler.getDefaultProfileLocators(request);             
  
+                }
+                if (locators.size() == 0)
+                {
+                    locators.put(ProfileLocator.PAGE_LOCATOR, profiler.getProfile(request,
ProfileLocator.PAGE_LOCATOR));
+                }
+System.out.println(">>>>>>>>>>>>>>>>>>>>>>>
user locators: "+locators.entrySet());
+                
+                // get user folder path from profiler site component
+                // using the profile locators for new user request
+                PortalSiteSessionContext sessionContext = portalSite.newSessionContext();
+                PortalSiteRequestContext requestContext = sessionContext.newRequestContext(locators,
userName);
+                userFolderPath = requestContext.getUserFolderPath();
+System.out.println(">>>>>>>>>>>>>>>>>>>>>>>
user path: "+userFolderPath);
+            }
+            else if (subsite != null)
+            {
+                userFolderPath = subsite + Folder.USER_FOLDER + userName;
             }
             else
             {
-                subsite  = subsite + Folder.USER_FOLDER +  userName;
-            }            
-            
+                userFolderPath = Folder.USER_FOLDER + userName;
+            }
             
             // This next chunk of code is the fancy way to force the creation of the user
             // template pages to be created with subject equal to the new user
             // otherwise it would be created as guest, and guest does not have enough privs.
             final String innerFolderTemplate = folderTemplate;
-            final String innerSubsite = subsite;
+            final String innerUserFolderPath = userFolderPath;
             final PageManager innerPageManager = pageManager;
             final String innerUserName = userName;
             final User innerUser = user;
@@ -278,17 +344,17 @@ public class PortalAdministrationImpl im
                     {
                         try
                         {
-                            if (innerSubsite != null)
+                            if (innerUserFolderPath != null)
                             {
-                                innerUser.getSecurityAttributes().getAttribute(User.JETSPEED_USER_SUBSITE_ATTRIBUTE,
true).setStringValue(innerSubsite);
+                                innerUser.getSecurityAttributes().getAttribute(User.JETSPEED_USER_SUBSITE_ATTRIBUTE,
true).setStringValue(innerUserFolderPath);
                                 userManager.updateUser(innerUser);
                             }                                         
                             // create user's home folder                        
                             // deep copy from the default folder template tree, creating
a deep-copy of the template
                             // in the new user's folder tree
                             Folder source = innerPageManager.getFolder(innerFolderTemplate);
-                            innerPageManager.deepCopyFolder(source, innerSubsite, innerUserName);
-                            Folder newFolder = pageManager.getFolder(innerSubsite);     
                      
+                            innerPageManager.deepCopyFolder(source, innerUserFolderPath,
innerUserName);
+                            Folder newFolder = pageManager.getFolder(innerUserFolderPath);
                           
                             newFolder.setTitle("My Home Space");
                             newFolder.setShortTitle("My Space");                        
    
                             return null;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/openid/OpenIDRelayingPartyServlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/openid/OpenIDRelayingPartyServlet.java?rev=923862&r1=923861&r2=923862&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/openid/OpenIDRelayingPartyServlet.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/openid/OpenIDRelayingPartyServlet.java
Tue Mar 16 16:47:03 2010
@@ -20,6 +20,7 @@ import java.io.IOException;
 import java.io.PrintWriter;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ThreadFactory;
@@ -30,6 +31,7 @@ import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
 
 import org.openid4java.OpenIDException;
 import org.openid4java.consumer.ConsumerManager;
@@ -114,6 +116,9 @@ public class OpenIDRelayingPartyServlet 
     private static final String USER_ATTRIBUTE_FAMILY_NAME = "user.name.family";
     private static final String USER_ATTRIBUTE_NICKNAME = "user.name.nickName";
     
+    private static final String OPEN_ID_LOGIN_LOCALE_ATTR_NAME = "org.apache.jetspeed.openid.locale";
+    private static final String OPEN_ID_LOGIN_SERVER_NAME_ATTR_NAME = "org.apache.jetspeed.openid.server.name";
+    
     private ConsumerManager openIDConsumerManager;
     private ConsumerManager openIDStep2ConsumerManager;
     private UserManager portalUserManager;
@@ -243,7 +248,10 @@ public class OpenIDRelayingPartyServlet 
         else 
         {
             // clear error state
-            request.getSession().removeAttribute(OpenIDConstants.OPEN_ID_ERROR);
+            HttpSession httpSession = request.getSession();
+            httpSession.removeAttribute(OpenIDConstants.OPEN_ID_ERROR);
+            httpSession.setAttribute(OPEN_ID_LOGIN_LOCALE_ATTR_NAME, request.getLocale());
+            httpSession.setAttribute(OPEN_ID_LOGIN_SERVER_NAME_ATTR_NAME, request.getServerName());
            
             // parse request from request path
             String servletPathPrefix = servletPath+"/";
@@ -389,9 +397,13 @@ public class OpenIDRelayingPartyServlet 
                         log.debug("Discovered OpenID provider endpoint: "+discovered.getOPEndpoint()+",
["+discovered.getClass().getSimpleName()+"]");
                     }
 
+                    // save login state
+                    httpSession.setAttribute(OPEN_ID_LOGIN_LOCALE_ATTR_NAME, request.getLocale());
+                    httpSession.setAttribute(OPEN_ID_LOGIN_SERVER_NAME_ATTR_NAME, request.getServerName());
+
                     // save OpenID provider in session
-                    request.getSession().setAttribute(OPEN_ID_PROVIDER_ATTR_NAME, provider);
-                    request.getSession().setAttribute(OPEN_ID_DISCOVERY_INFO_ATTR_NAME, discovered);
+                    httpSession.setAttribute(OPEN_ID_PROVIDER_ATTR_NAME, provider);
+                    httpSession.setAttribute(OPEN_ID_DISCOVERY_INFO_ATTR_NAME, discovered);
 
                     // create OpenID authentication request and redirect
                     String authReturnToURL = openIDRealmURL+"/"+OpenIDConstants.OPEN_ID_AUTHENTICATED_REQUEST+"?"+OpenIDConstants.OPEN_ID_RETURN+"="+returnPath;
@@ -434,7 +446,7 @@ public class OpenIDRelayingPartyServlet 
                     // log error and redirect back to portal with error
                     // set as session attribute
                     log.error("OpenID login error: "+e, e);
-                    request.getSession().setAttribute(OpenIDConstants.OPEN_ID_ERROR, (!discoveredProvider
? OpenIDConstants.OPEN_ID_ERROR_NO_PROVIDER : OpenIDConstants.OPEN_ID_ERROR_CANNOT_AUTH));
+                    httpSession.setAttribute(OpenIDConstants.OPEN_ID_ERROR, (!discoveredProvider
? OpenIDConstants.OPEN_ID_ERROR_NO_PROVIDER : OpenIDConstants.OPEN_ID_ERROR_CANNOT_AUTH));
                     response.sendRedirect(returnPath);
                 }
             }
@@ -448,10 +460,20 @@ public class OpenIDRelayingPartyServlet 
                 }
                 
                 // session parameters
-                OpenIDRegistrationConfiguration portalRegistrationConfiguration = (OpenIDRegistrationConfiguration)request.getSession().getAttribute(OpenIDConstants.OPEN_ID_REGISTRATION_CONFIGURATION);
+                Locale loginLocale = (Locale)httpSession.getAttribute(OPEN_ID_LOGIN_LOCALE_ATTR_NAME);
+                if (loginLocale != null)
+                {
+                    httpSession.removeAttribute(OPEN_ID_LOGIN_LOCALE_ATTR_NAME);
+                }
+                String loginServerName = (String)httpSession.getAttribute(OPEN_ID_LOGIN_SERVER_NAME_ATTR_NAME);
+                if (loginServerName != null)
+                {
+                    httpSession.removeAttribute(OPEN_ID_LOGIN_SERVER_NAME_ATTR_NAME);
+                }
+                OpenIDRegistrationConfiguration portalRegistrationConfiguration = (OpenIDRegistrationConfiguration)httpSession.getAttribute(OpenIDConstants.OPEN_ID_REGISTRATION_CONFIGURATION);
                 if (portalRegistrationConfiguration != null)
                 {
-                    request.getSession().removeAttribute(OpenIDConstants.OPEN_ID_REGISTRATION_CONFIGURATION);
+                    httpSession.removeAttribute(OpenIDConstants.OPEN_ID_REGISTRATION_CONFIGURATION);
                 }
 
                 boolean authenticatedByProvider = false;
@@ -462,8 +484,8 @@ public class OpenIDRelayingPartyServlet 
                     ParameterList authParams = new ParameterList(request.getParameterMap());
 
                     // retrieve OpenID provider from session
-                    String provider = (String)request.getSession().getAttribute(OPEN_ID_PROVIDER_ATTR_NAME);
-                    DiscoveryInformation discovered = (DiscoveryInformation)request.getSession().getAttribute(OPEN_ID_DISCOVERY_INFO_ATTR_NAME);
+                    String provider = (String)httpSession.getAttribute(OPEN_ID_PROVIDER_ATTR_NAME);
+                    DiscoveryInformation discovered = (DiscoveryInformation)httpSession.getAttribute(OPEN_ID_DISCOVERY_INFO_ATTR_NAME);
 
                     // reconstruct the authenticated request URL
                     StringBuffer authRequestURLBuffer = request.getRequestURL();
@@ -637,11 +659,13 @@ public class OpenIDRelayingPartyServlet 
                                                                       userAttributes,
                                                                       portalRegistrationConfiguration.getProfilerRules(),
                                                                       portalRegistrationConfiguration.getUserTemplateDirectory(),
-                                                                      portalRegistrationConfiguration.getSubsiteRootFolder());
+                                                                      portalRegistrationConfiguration.getSubsiteRootFolder(),
+                                                                      loginLocale, loginServerName);
                                 }
                                 else
                                 {
-                                    portalAdministration.registerUser(email, null, null,
null, userAttributes, null, null, null);
+                                    portalAdministration.registerUser(email, null, null,
null, userAttributes, null, null, null,
+                                                                      loginLocale, loginServerName);
                                 }
                                 portalUser = portalUserManager.getUser(email);
 
@@ -719,16 +743,16 @@ public class OpenIDRelayingPartyServlet 
                     // create/reset portal session
                     if (portalAuthenticationConfiguration.isCreateNewSessionOnLogin())
                     {
-                        request.getSession().invalidate();
-                        request.getSession(true);
+                        httpSession.invalidate();
+                        httpSession = request.getSession(true);
                     }
                     else
                     {
-                        portalUserContentCacheManager.evictUserContentCache(portalUser.getName(),
request.getSession().getId());
+                        portalUserContentCacheManager.evictUserContentCache(portalUser.getName(),
httpSession.getId());
                     }                         
                     // configure portal session with logged in session
-                    request.getSession().setAttribute(PortalReservedParameters.SESSION_OPEN_ID_PROVIDER,
provider);
-                    request.getSession().setAttribute(PortalReservedParameters.SESSION_KEY_SUBJECT,
subject);
+                    httpSession.setAttribute(PortalReservedParameters.SESSION_OPEN_ID_PROVIDER,
provider);
+                    httpSession.setAttribute(PortalReservedParameters.SESSION_KEY_SUBJECT,
subject);
 
                     // log/audit portal user login
                     portalAudit.logUserActivity(portalUser.getName(), request.getRemoteAddr(),
AuditActivity.AUTHENTICATION_SUCCESS, "OpenIDRelayingPartyServlet");
@@ -740,7 +764,7 @@ public class OpenIDRelayingPartyServlet 
                 {
                     // log error and redirect back to portal
                     log.error("OpenID login error: "+e, e);
-                    request.getSession().setAttribute(OpenIDConstants.OPEN_ID_ERROR, (!authenticatedByProvider
? OpenIDConstants.OPEN_ID_ERROR_NOT_AUTH : (!portalUserExists ? OpenIDConstants.OPEN_ID_ERROR_NO_PORTAL_USER
: OpenIDConstants.OPEN_ID_ERROR_CANNOT_LOGIN)));
+                    httpSession.setAttribute(OpenIDConstants.OPEN_ID_ERROR, (!authenticatedByProvider
? OpenIDConstants.OPEN_ID_ERROR_NOT_AUTH : (!portalUserExists ? OpenIDConstants.OPEN_ID_ERROR_NO_PORTAL_USER
: OpenIDConstants.OPEN_ID_ERROR_CANNOT_LOGIN)));
                     response.sendRedirect(returnPath);
                 }
             }
@@ -754,7 +778,7 @@ public class OpenIDRelayingPartyServlet 
                 }
 
                 // clear portal session
-                request.getSession().invalidate();
+                httpSession.invalidate();
                 
                 // redirect back to portal
                 response.sendRedirect(returnPath);

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/administration/TestPortalAdministrationImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/administration/TestPortalAdministrationImpl.java?rev=923862&r1=923861&r2=923862&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/administration/TestPortalAdministrationImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/administration/TestPortalAdministrationImpl.java
Tue Mar 16 16:47:03 2010
@@ -55,7 +55,7 @@ public class TestPortalAdministrationImp
 
     public void testPasswordGen() throws Exception
     {
-        PortalAdministrationImpl pai = new PortalAdministrationImpl(null,null,null,null,null,null,null);
+        PortalAdministrationImpl pai = new PortalAdministrationImpl(null,null,null,null,null,null,null,null);
         String newPassword = pai.generatePassword();
         assertNotNull("new password was NULL!!!",newPassword);
         assertTrue("password is not long enough",(newPassword.length() > 4) );
@@ -63,7 +63,7 @@ public class TestPortalAdministrationImp
     }
     
     public void xtestSendEmail() throws Exception {
-        PortalAdministrationImpl pai = new PortalAdministrationImpl(null,null,null,null,null,null,null);
+        PortalAdministrationImpl pai = new PortalAdministrationImpl(null,null,null,null,null,null,null,null);
         pai.sendEmail("chris@bluesunrise.com","this is a unittest","chris@bluesunrise.com","this
is the content of the message");
         
     }
@@ -71,7 +71,7 @@ public class TestPortalAdministrationImp
     // this needs too much init to test easily right now
     public void xtestRegUser() throws Exception
     {
-        PortalAdministrationImpl pai = new PortalAdministrationImpl(null,null,null,null,null,null,null);
+        PortalAdministrationImpl pai = new PortalAdministrationImpl(null,null,null,null,null,null,null,null);
         String user = "user"+(Math.abs(new Date().getTime()));
         String password = "password";
         List emptyList = new ArrayList();

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/administration/PortalAdministration.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/administration/PortalAdministration.java?rev=923862&r1=923861&r2=923862&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/administration/PortalAdministration.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/administration/PortalAdministration.java
Tue Mar 16 16:47:03 2010
@@ -17,6 +17,7 @@
 package org.apache.jetspeed.administration;
 
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 import javax.portlet.PortletConfig;
@@ -53,8 +54,25 @@ public interface PortalAdministration
      * @param folderTemplate The full PSML path name of a folder to be deep
      *               copied as the new user's set of folders, pages, links
      * @param subsite The subsite folder to place the new user in
+     * @param locale Optional locale used to compute new user folder path
+     *               if subsite not specified
+     * @param serverName Server name used to compute new user folder path
+     *                   if subsite not specified
      * @since 2.1.2              
      */
+    public void registerUser(
+            String userName, 
+            String password, 
+            List roles, 
+            List groups, 
+            Map userInfo, 
+            Map rules, 
+            String folderTemplate,
+            String subsite,
+            Locale locale,
+            String serverName)
+        throws RegistrationException;
+
     void registerUser(String userName, 
                       String password, 
                       List roles, 
@@ -73,7 +91,7 @@ public interface PortalAdministration
             Map rules,
             String template)
         throws RegistrationException;
- 
+
     /**
      * Register a new user using all default values
      * 

Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/administration.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/administration.xml?rev=923862&r1=923861&r2=923862&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/administration.xml
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/administration.xml
Tue Mar 16 16:47:03 2010
@@ -76,9 +76,12 @@
       <ref bean="org.apache.jetspeed.profiler.Profiler" />
     </constructor-arg>
     <constructor-arg index='5'>
-      <ref bean="mailSender" />
+      <ref bean="org.apache.jetspeed.portalsite.PortalSite" />
     </constructor-arg>
     <constructor-arg index='6'>
+      <ref bean="mailSender" />
+    </constructor-arg>
+    <constructor-arg index='7'>
       <ref bean="adminVelocityEngine" />
     </constructor-arg>
   </bean>



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