org.apache.jetspeed.administration
Class PortalAdministrationImpl

java.lang.Object
  extended by org.apache.jetspeed.administration.PortalAdministrationImpl
All Implemented Interfaces:
org.apache.jetspeed.administration.PortalAdministration

public class PortalAdministrationImpl
extends Object
implements org.apache.jetspeed.administration.PortalAdministration

PortalAdministrationImpl Implements aggregate portal administration functions: - Emails - Registration - Password Generation -

Version:
$Id: $
Author:
David Sean Taylor, Chris Schaefer

Field Summary
protected  String adminUser
          default administrative user
protected  AdminUtil adminUtil
           
protected  org.apache.commons.configuration.Configuration config
          administration services
protected  List defaultGroups
          list of default groups for a registered user
protected  List defaultRoles
          list of default roles for a registered user
protected  Map defaultRules
          map of default profiling rules for a registered user
protected  String folderTemplate
          name of PSML Folder Template to clone from when registering new user
(package private)  Map forgottenPasswordData
           
protected  org.apache.jetspeed.security.GroupManager groupManager
           
private static org.apache.commons.logging.Log log
           
protected  org.springframework.mail.javamail.JavaMailSender mailSender
           
protected  org.apache.jetspeed.page.PageManager pageManager
           
private  org.apache.jetspeed.prefs.PreferencesProvider preferences
           
protected  org.apache.jetspeed.profiler.Profiler profiler
           
protected  org.apache.jetspeed.security.RoleManager roleManager
           
private static String USER_NOT_FOUND_FROM_EMAIL
           
protected  org.apache.jetspeed.security.UserManager userManager
           
protected  org.apache.velocity.app.VelocityEngine velocityEngine
           
 
Constructor Summary
PortalAdministrationImpl(org.apache.jetspeed.security.UserManager userManager, org.apache.jetspeed.security.RoleManager roleManager, org.apache.jetspeed.security.GroupManager groupManager, org.apache.jetspeed.page.PageManager pageManager, org.apache.jetspeed.prefs.PreferencesProvider preferences, org.apache.jetspeed.profiler.Profiler profiler, org.springframework.mail.javamail.JavaMailSender mailSender, org.apache.velocity.app.VelocityEngine velocityEngine)
           
 
Method Summary
 String generatePassword()
           
 Map getNewLoginInfo(String guid)
           
 String getPortalURL(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response, String path)
          Helper for admin portlets to generate portal urls
 org.apache.jetspeed.security.User lookupUserFromEmail(String email)
           
 String mergeEmailTemplate(javax.portlet.PortletConfig portletConfig, Map attributes, String attributesName, String template)
           
 void putNewLoginInfo(String guid, Map info)
           
 void registerUser(String userName, String password)
           
 void registerUser(String userName, String password, List roles, List groups, Map userInfo, Map rules, String folderTemplate)
           
 void registerUser(String userName, String password, List roles, List groups, Map userInfo, Map rules, String folderTemplate, String subsite)
           
 void removeNewLoginInfo(String guid)
           
 void sendEmail(javax.portlet.PortletConfig portletConfig, String emailAddress, String localizedSubject, String localizedTemplatePath, Map userAttributes)
           
 void sendEmail(String from, String subject, String to, String text)
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log

config

protected org.apache.commons.configuration.Configuration config
administration services


userManager

protected org.apache.jetspeed.security.UserManager userManager

roleManager

protected org.apache.jetspeed.security.RoleManager roleManager

groupManager

protected org.apache.jetspeed.security.GroupManager groupManager

pageManager

protected org.apache.jetspeed.page.PageManager pageManager

preferences

private org.apache.jetspeed.prefs.PreferencesProvider preferences

profiler

protected org.apache.jetspeed.profiler.Profiler profiler

mailSender

protected org.springframework.mail.javamail.JavaMailSender mailSender

velocityEngine

protected org.apache.velocity.app.VelocityEngine velocityEngine

adminUtil

protected AdminUtil adminUtil

defaultRoles

protected List defaultRoles
list of default roles for a registered user


defaultGroups

protected List defaultGroups
list of default groups for a registered user


defaultRules

protected Map defaultRules
map of default profiling rules for a registered user


folderTemplate

protected String folderTemplate
name of PSML Folder Template to clone from when registering new user


adminUser

protected String adminUser
default administrative user


USER_NOT_FOUND_FROM_EMAIL

private static final String USER_NOT_FOUND_FROM_EMAIL
See Also:
Constant Field Values

forgottenPasswordData

Map forgottenPasswordData
Constructor Detail

PortalAdministrationImpl

public PortalAdministrationImpl(org.apache.jetspeed.security.UserManager userManager,
                                org.apache.jetspeed.security.RoleManager roleManager,
                                org.apache.jetspeed.security.GroupManager groupManager,
                                org.apache.jetspeed.page.PageManager pageManager,
                                org.apache.jetspeed.prefs.PreferencesProvider preferences,
                                org.apache.jetspeed.profiler.Profiler profiler,
                                org.springframework.mail.javamail.JavaMailSender mailSender,
                                org.apache.velocity.app.VelocityEngine velocityEngine)
Method Detail

start

public void start()

registerUser

public void registerUser(String userName,
                         String password)
                  throws org.apache.jetspeed.administration.RegistrationException
Specified by:
registerUser in interface org.apache.jetspeed.administration.PortalAdministration
Throws:
org.apache.jetspeed.administration.RegistrationException

registerUser

public void registerUser(String userName,
                         String password,
                         List roles,
                         List groups,
                         Map userInfo,
                         Map rules,
                         String folderTemplate)
                  throws org.apache.jetspeed.administration.RegistrationException
Specified by:
registerUser in interface org.apache.jetspeed.administration.PortalAdministration
Throws:
org.apache.jetspeed.administration.RegistrationException

registerUser

public void registerUser(String userName,
                         String password,
                         List roles,
                         List groups,
                         Map userInfo,
                         Map rules,
                         String folderTemplate,
                         String subsite)
                  throws org.apache.jetspeed.administration.RegistrationException
Specified by:
registerUser in interface org.apache.jetspeed.administration.PortalAdministration
Throws:
org.apache.jetspeed.administration.RegistrationException

generatePassword

public String generatePassword()
Specified by:
generatePassword in interface org.apache.jetspeed.administration.PortalAdministration

sendEmail

public void sendEmail(javax.portlet.PortletConfig portletConfig,
                      String emailAddress,
                      String localizedSubject,
                      String localizedTemplatePath,
                      Map userAttributes)
               throws org.apache.jetspeed.administration.AdministrationEmailException
Specified by:
sendEmail in interface org.apache.jetspeed.administration.PortalAdministration
Throws:
org.apache.jetspeed.administration.AdministrationEmailException

sendEmail

public void sendEmail(String from,
                      String subject,
                      String to,
                      String text)
               throws org.apache.jetspeed.administration.AdministrationEmailException
Specified by:
sendEmail in interface org.apache.jetspeed.administration.PortalAdministration
Parameters:
from -
subject -
to -
text -
Throws:
AdministrationEmailException

mergeEmailTemplate

public String mergeEmailTemplate(javax.portlet.PortletConfig portletConfig,
                                 Map attributes,
                                 String attributesName,
                                 String template)
                          throws org.apache.jetspeed.administration.AdministrationEmailException
Throws:
org.apache.jetspeed.administration.AdministrationEmailException

lookupUserFromEmail

public org.apache.jetspeed.security.User lookupUserFromEmail(String email)
                                                      throws org.apache.jetspeed.administration.AdministrationEmailException
Specified by:
lookupUserFromEmail in interface org.apache.jetspeed.administration.PortalAdministration
Throws:
org.apache.jetspeed.administration.AdministrationEmailException

getPortalURL

public String getPortalURL(javax.portlet.PortletRequest request,
                           javax.portlet.PortletResponse response,
                           String path)
Helper for admin portlets to generate portal urls

Specified by:
getPortalURL in interface org.apache.jetspeed.administration.PortalAdministration

getNewLoginInfo

public Map getNewLoginInfo(String guid)
Specified by:
getNewLoginInfo in interface org.apache.jetspeed.administration.PortalAdministration

putNewLoginInfo

public void putNewLoginInfo(String guid,
                            Map info)
Specified by:
putNewLoginInfo in interface org.apache.jetspeed.administration.PortalAdministration

removeNewLoginInfo

public void removeNewLoginInfo(String guid)
Specified by:
removeNewLoginInfo in interface org.apache.jetspeed.administration.PortalAdministration


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.