org.alfresco.web.bean.groups
Class GroupsDialog

java.lang.Object
  extended by org.alfresco.web.bean.dialog.BaseDialogBean
      extended by org.alfresco.web.bean.groups.GroupsDialog
All Implemented Interfaces:
java.io.Serializable, IContextListener, ChangeViewSupport, FilterViewSupport, IDialogBean

public class GroupsDialog
extends BaseDialogBean
implements IContextListener, FilterViewSupport, ChangeViewSupport

Backing Bean for the Groups Management pages.

See Also:
Serialized Form

Nested Class Summary
 class GroupsDialog.AuthorityNamePropertyResolver
           
 class GroupsDialog.AuthorityPropertyResolver
          Simple dynamic resolver class to return authority properties at runtime
static class GroupsDialog.UserAuthorityDetails
          Simple wrapper bean exposing user authority and person details for JSF results list
 
Field Summary
protected  java.lang.String filterMode
          Filter mode
protected  java.lang.String group
          Currently visible Group Authority
protected  java.lang.String groupName
           
protected  java.util.List groups
          Groups
protected  UIRichList groupsRichList
          Component references
static java.lang.String KEY_GROUP
           
protected  java.util.List location
          Groups path breadcrumb location
static java.lang.String PARAM_GROUP
           
static java.lang.String PARAM_GROUP_NAME
           
protected  UIRichList usersRichList
           
protected  java.lang.String viewMode
          RichList view mode
 
Fields inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
browseBean, isFinished, navigator, parameters
 
Constructor Summary
GroupsDialog()
          Default Constructor
 
Method Summary
 void areaChanged()
          Method called by UIContextService.areaChanged() to inform all registered beans that the user has changed area i.e.
 java.lang.String cancel()
          Method handler called when the cancel button of the dialog is pressed
 void clickGroup(javax.faces.event.ActionEvent event)
          Action called when a Group folder is clicked.
 void contextUpdated()
          Method called by UIContextService.notifyBeans() to inform all registered beans that all UI Beans should refresh dump all cached data and settings.
 void filterModeChanged(javax.faces.event.ActionEvent event)
           
protected  java.lang.String finishImpl(javax.faces.context.FacesContext context, java.lang.String outcome)
          Performs the actual processing for the wizard.
 java.lang.Object getActionsContext()
          Returns the object to use as the context for the main and more actions that may be configured by the dialog
 java.lang.String getCancelButtonLabel()
          Returns the label to use for the cancel button
 java.lang.String getContainerSubTitle()
          Returns the subtitle to be used for the dialog
 java.util.List getFilterItems()
           
 java.lang.String getFilterMode()
           
 java.lang.String getGroup()
           
 java.lang.String getGroupName()
           
 java.util.List getGroups()
           
 UIRichList getGroupsRichList()
           
 java.lang.String getGroupsSearchCriteria()
           
 java.util.List getLocation()
           
 java.util.List getUsers()
           
 UIRichList getUsersRichList()
           
 java.util.List getViewItems()
           
 java.lang.String getViewMode()
           
 boolean isAllowSearchGroups()
           
protected  void removeFromBreadcrumb(java.lang.String group)
           
 void removeUser(javax.faces.event.ActionEvent event)
          Remove specified user from the current group
 void restored()
          Called when the dialog is restored after a nested dialog is closed
 java.lang.String searchGroups()
          Event handler called when the user wishes to search for a group
 void setAuthService(org.alfresco.service.cmr.security.AuthorityService authService)
           
protected  void setCurrentGroup(java.lang.String group, java.lang.String groupName)
          Set the current Group Authority.
 void setFilterMode(java.lang.String filterMode)
           
 void setGroupsRichList(UIRichList groupsRichList)
           
 void setGroupsSearchCriteria(java.lang.String groupsSearchCriteria)
          Simple setter
 void setPersonService(org.alfresco.service.cmr.security.PersonService personService)
           
 void setUsersRichList(UIRichList usersRichList)
           
 void setViewMode(java.lang.String viewMode)
           
 java.lang.String showAllGroups()
          Action handler to show all the sub-groups in the group
 void spaceChanged()
          Method called by UIContextService.spaceChanged() to inform all registered beans that the current space has changed.
protected  void updateUILocation(java.lang.String group)
          Update the breadcrumb with the clicked Group location
 void viewModeChanged(javax.faces.event.ActionEvent event)
           
 
Methods inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
doPostCommitProcessing, finish, formatErrorMessage, getActionsConfigId, getAdditionalButtons, getCheckOutCheckInService, getContainerDescription, getContainerTitle, getDefaultCancelOutcome, getDefaultFinishOutcome, getDictionaryService, getErrorMessageId, getErrorOutcome, getFileFolderService, getFinishButtonDisabled, getFinishButtonLabel, getMoreActionsConfigId, getNamespaceService, getNodeService, getRuleService, getSearchService, getTransactionService, init, isFinished, 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

KEY_GROUP

public static final java.lang.String KEY_GROUP
See Also:
Constant Field Values

PARAM_GROUP

public static final java.lang.String PARAM_GROUP
See Also:
Constant Field Values

PARAM_GROUP_NAME

public static final java.lang.String PARAM_GROUP_NAME
See Also:
Constant Field Values

groupsRichList

protected UIRichList groupsRichList
Component references


usersRichList

protected UIRichList usersRichList

groups

protected java.util.List groups
Groups


group

protected java.lang.String group
Currently visible Group Authority


groupName

protected java.lang.String groupName

viewMode

protected java.lang.String viewMode
RichList view mode


filterMode

protected java.lang.String filterMode
Filter mode


location

protected java.util.List location
Groups path breadcrumb location

Constructor Detail

GroupsDialog

public GroupsDialog()
Default Constructor

Method Detail

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

cancel

public java.lang.String cancel()
Description copied from interface: IDialogBean
Method handler called when the cancel button of the dialog is pressed

Specified by:
cancel in interface IDialogBean
Overrides:
cancel in class BaseDialogBean
Returns:
The outcome to return

getContainerSubTitle

public java.lang.String getContainerSubTitle()
Description copied from interface: IDialogBean
Returns the subtitle to be used for the dialog

If this returns null the DialogManager will lookup the subtitle via the dialog configuration

Specified by:
getContainerSubTitle in interface IDialogBean
Overrides:
getContainerSubTitle in class BaseDialogBean
Returns:
The subtitle or null if the subtitle is to be acquired via configuration

getCancelButtonLabel

public java.lang.String getCancelButtonLabel()
Description copied from interface: IDialogBean
Returns the label to use for the cancel button

Specified by:
getCancelButtonLabel in interface IDialogBean
Overrides:
getCancelButtonLabel in class BaseDialogBean
Returns:
The cancel button label

restored

public void restored()
Description copied from interface: IDialogBean
Called when the dialog is restored after a nested dialog is closed

Specified by:
restored in interface IDialogBean
Overrides:
restored in class BaseDialogBean

getActionsContext

public java.lang.Object getActionsContext()
Description copied from interface: IDialogBean
Returns the object to use as the context for the main and more actions that may be configured by the dialog

Specified by:
getActionsContext in interface IDialogBean
Overrides:
getActionsContext in class BaseDialogBean
Returns:
Object to use as the context for actions

getFilterItems

public java.util.List getFilterItems()
Specified by:
getFilterItems in interface FilterViewSupport

filterModeChanged

public void filterModeChanged(javax.faces.event.ActionEvent event)
Specified by:
filterModeChanged in interface FilterViewSupport

getFilterMode

public java.lang.String getFilterMode()
Specified by:
getFilterMode in interface FilterViewSupport

setFilterMode

public void setFilterMode(java.lang.String filterMode)
Specified by:
setFilterMode in interface FilterViewSupport

getViewItems

public java.util.List getViewItems()
Specified by:
getViewItems in interface ChangeViewSupport

viewModeChanged

public void viewModeChanged(javax.faces.event.ActionEvent event)
Specified by:
viewModeChanged in interface ChangeViewSupport

getViewMode

public java.lang.String getViewMode()
Specified by:
getViewMode in interface ChangeViewSupport

setViewMode

public void setViewMode(java.lang.String viewMode)
Specified by:
setViewMode in interface ChangeViewSupport

getGroup

public java.lang.String getGroup()

getGroupName

public java.lang.String getGroupName()

setAuthService

public void setAuthService(org.alfresco.service.cmr.security.AuthorityService authService)

setPersonService

public void setPersonService(org.alfresco.service.cmr.security.PersonService personService)

getGroupsRichList

public UIRichList getGroupsRichList()

setGroupsRichList

public void setGroupsRichList(UIRichList groupsRichList)

getUsersRichList

public UIRichList getUsersRichList()

setUsersRichList

public void setUsersRichList(UIRichList usersRichList)

getLocation

public java.util.List getLocation()
Returns:
Breadcrumb location list

isAllowSearchGroups

public boolean isAllowSearchGroups()
Returns:
true if user is in the root group

getGroups

public java.util.List getGroups()
Returns:
The list of group objects to display. Returns the list of root groups or the list of sub-groups for the current group if set.

getGroupsSearchCriteria

public java.lang.String getGroupsSearchCriteria()
Returns:
Returns the groups search criteria

searchGroups

public java.lang.String searchGroups()
Event handler called when the user wishes to search for a group

Returns:
The outcome

showAllGroups

public java.lang.String showAllGroups()
Action handler to show all the sub-groups in the group

Returns:
The outcome

getUsers

public java.util.List getUsers()
Returns:
The list of user objects to display. Returns the list of user for the current group.

setCurrentGroup

protected void setCurrentGroup(java.lang.String group,
                               java.lang.String groupName)
Set the current Group Authority.

Setting this value causes the UI to update and display the specified node as current.

Parameters:
group - The current group authority.

clickGroup

public void clickGroup(javax.faces.event.ActionEvent event)
Action called when a Group folder is clicked. Navigate into the Group and show child Groups and child Users.


setGroupsSearchCriteria

public void setGroupsSearchCriteria(java.lang.String groupsSearchCriteria)
Simple setter

Parameters:
groupsSearchCriteria -

removeUser

public void removeUser(javax.faces.event.ActionEvent event)
Remove specified user from the current group


updateUILocation

protected void updateUILocation(java.lang.String group)
Update the breadcrumb with the clicked Group location


removeFromBreadcrumb

protected void removeFromBreadcrumb(java.lang.String group)

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


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