org.alfresco.web.bean.users
Class EmailSpaceUsersDialog

java.lang.Object
  extended by org.alfresco.web.bean.dialog.BaseDialogBean
      extended by org.alfresco.web.bean.users.EmailSpaceUsersDialog
All Implemented Interfaces:
java.io.Serializable, IContextListener, IDialogBean

public class EmailSpaceUsersDialog
extends BaseDialogBean
implements IContextListener

Dialog bean managing the state for the Email Space Users page. Calculates the user/groups that are invited to a space and builds the data structures needed to display and modify the list in the web-client UI. Notifies the selected user/groups with a templatable email.

See Also:
Serialized Form

Field Summary
protected  TemplateMailHelperBean mailHelper
          Helper providing template based mailing facilities
 
Fields inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
browseBean, isFinished, navigator, parameters
 
Constructor Summary
EmailSpaceUsersDialog()
          Default constructor
 
Method Summary
 void areaChanged()
          Method called by UIContextService.areaChanged() to inform all registered beans that the user has changed area i.e.
 void contextUpdated()
          Method called by UIContextService.notifyBeans() to inform all registered beans that all UI Beans should refresh dump all cached data and settings.
protected  java.lang.String finishImpl(javax.faces.context.FacesContext context, java.lang.String outcome)
          Performs the actual processing for the wizard.
protected  org.alfresco.service.cmr.security.AuthorityService getAuthorityService()
           
 boolean getFinishButtonDisabled()
          Determines whether the finish button on the dialog should be disabled
 TemplateMailHelperBean getMailHelper()
           
protected  org.springframework.mail.javamail.JavaMailSender getMailSender()
           
protected  org.alfresco.service.cmr.security.PermissionService getPermissionService()
           
protected  org.alfresco.service.cmr.security.PersonService getPersonService()
           
 Node getSpace()
           
 java.util.List getUsersGroups()
          Return the List of objects representing the Users and Groups invited to this space.
 void init(java.util.Map parameters)
          Setup the dialog
 void setAuthorityService(org.alfresco.service.cmr.security.AuthorityService authorityService)
           
 void setMailSender(org.springframework.mail.javamail.JavaMailSender mailSender)
           
 void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
           
 void setPersonService(org.alfresco.service.cmr.security.PersonService personService)
           
 void spaceChanged()
          Method called by UIContextService.spaceChanged() to inform all registered beans that the current space has changed.
 void userGroupSelectorAction(javax.faces.event.ActionEvent event)
          Action handler for a user/group selector event
 
Methods inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
cancel, doPostCommitProcessing, finish, formatErrorMessage, getActionsConfigId, getActionsContext, getAdditionalButtons, getCancelButtonLabel, getCheckOutCheckInService, getContainerDescription, getContainerSubTitle, getContainerTitle, getDefaultCancelOutcome, getDefaultFinishOutcome, getDictionaryService, getErrorMessageId, getErrorOutcome, getFileFolderService, getFinishButtonLabel, getMoreActionsConfigId, getNamespaceService, getNodeService, getRuleService, getSearchService, getTransactionService, isFinished, restored, setBrowseBean, setDictionaryService, setFileFolderService, setNamespaceService, setNavigator, setNodeService, setSearchService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mailHelper

protected TemplateMailHelperBean mailHelper
Helper providing template based mailing facilities

Constructor Detail

EmailSpaceUsersDialog

public EmailSpaceUsersDialog()
Default constructor

Method Detail

init

public void init(java.util.Map parameters)
Setup the dialog

Specified by:
init in interface IDialogBean
Overrides:
init in class BaseDialogBean
Parameters:
parameters - Map of parameters for the dialog

finishImpl

protected java.lang.String finishImpl(javax.faces.context.FacesContext context,
                                      java.lang.String outcome)
                               throws java.lang.Exception
Description copied from class: BaseDialogBean
Performs the actual processing for the wizard. NOTE: This method is called within the context of a transaction so no transaction handling is required

Specified by:
finishImpl in class BaseDialogBean
Parameters:
context - FacesContext
outcome - The default outcome
Returns:
The outcome
Throws:
java.lang.Exception
See Also:
BaseDialogBean.finishImpl(javax.faces.context.FacesContext, java.lang.String)

contextUpdated

public void contextUpdated()
Description copied from interface: IContextListener
Method called by UIContextService.notifyBeans() to inform all registered beans that all UI Beans should refresh dump all cached data and settings.

Specified by:
contextUpdated in interface IContextListener
See Also:
IContextListener.contextUpdated()

areaChanged

public void areaChanged()
Description copied from interface: IContextListener
Method called by UIContextService.areaChanged() to inform all registered beans that the user has changed area i.e. from company home to my home.

Specified by:
areaChanged in interface IContextListener
See Also:
IContextListener.areaChanged()

spaceChanged

public void spaceChanged()
Description copied from interface: IContextListener
Method called by UIContextService.spaceChanged() to inform all registered beans that the current space has changed.

Specified by:
spaceChanged in interface IContextListener
See Also:
IContextListener.spaceChanged()

setPermissionService

public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
Parameters:
permissionService - The PermissionService to set

getPermissionService

protected org.alfresco.service.cmr.security.PermissionService getPermissionService()

setPersonService

public void setPersonService(org.alfresco.service.cmr.security.PersonService personService)
Parameters:
personService - The PersonService to set

getPersonService

protected org.alfresco.service.cmr.security.PersonService getPersonService()

setMailSender

public void setMailSender(org.springframework.mail.javamail.JavaMailSender mailSender)
Parameters:
mailSender - The JavaMailSender to set.

getMailSender

protected org.springframework.mail.javamail.JavaMailSender getMailSender()

setAuthorityService

public void setAuthorityService(org.alfresco.service.cmr.security.AuthorityService authorityService)
Parameters:
authorityService - The AuthorityService to set.

getAuthorityService

protected org.alfresco.service.cmr.security.AuthorityService getAuthorityService()

getSpace

public Node getSpace()
Returns:
The space to email users for

getUsersGroups

public java.util.List getUsersGroups()
Return the List of objects representing the Users and Groups invited to this space. The picker is then responsible for rendering a view to represent those users and groups which allows the users to select and deselect users and groups, also to expand groups to show sub-groups and users.

Returns:
List of Map objects representing the users/groups assigned to the current space

getMailHelper

public TemplateMailHelperBean getMailHelper()
Returns:
TemplateMailHelperBean instance for this wizard

getFinishButtonDisabled

public boolean getFinishButtonDisabled()
Description copied from interface: IDialogBean
Determines whether the finish button on the dialog should be disabled

Specified by:
getFinishButtonDisabled in interface IDialogBean
Overrides:
getFinishButtonDisabled in class BaseDialogBean
Returns:
true if any authorities are selected, false otherwise

userGroupSelectorAction

public void userGroupSelectorAction(javax.faces.event.ActionEvent event)
Action handler for a user/group selector event



Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.