org.alfresco.web.bean.users
Class UserMembersBean

java.lang.Object
  extended by org.alfresco.web.bean.dialog.BaseDialogBean
      extended by org.alfresco.web.bean.users.UserMembersBean
All Implemented Interfaces:
java.io.Serializable, IContextListener, FilterViewSupport, IDialogBean
Direct Known Subclasses:
ContentUsersBean, SpaceUsersBean

public abstract class UserMembersBean
extends BaseDialogBean
implements IContextListener, FilterViewSupport

Bean backing the Manage Space/Content Permission pages.

See Also:
Serialized Form

Nested Class Summary
static class UserMembersBean.PermissionWrapper
          Wrapper class for list data model to display current roles for user
 
Field Summary
protected  BrowseBean browseBean
          BrowseBean bean refernce
 
Fields inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
isFinished, navigator, parameters
 
Constructor Summary
UserMembersBean()
          Default constructor
 
Method Summary
 void addRole(javax.faces.event.ActionEvent event)
          Action handler called when the Add Role button is pressed to process the current selection
 void areaChanged()
          Method called by UIContextService.areaChanged() to inform all registered beans that the user has changed area i.e.
 java.lang.String cancel()
          Action called to Close the dialog
 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)
           
 java.lang.String finishOK()
          Action handler called when the Finish button is clicked on the Edit User Roles page
protected  org.alfresco.service.cmr.security.AuthorityService getAuthorityService()
           
 java.util.List getFilterItems()
           
 java.lang.String getFilterMode()
           
 boolean getHasChangePermissions()
           
abstract  Node getNode()
          Returns the node that is being acted upon
protected  org.alfresco.service.cmr.repository.NodeService getNodeService()
           
protected  org.alfresco.service.cmr.security.OwnableService getOwnableService()
           
 java.lang.String getOwner()
          Return the owner username
protected  org.alfresco.service.cmr.security.PermissionService getPermissionService()
           
 java.lang.String getPersonAuthority()
           
 java.lang.String getPersonName()
           
 javax.faces.model.DataModel getPersonRolesDataModel()
          Returns the properties for current Person roles JSF DataModel
protected  org.alfresco.service.cmr.security.PersonService getPersonService()
           
protected  org.alfresco.service.cmr.search.SearchService getSearchService()
           
 java.util.List getUsers()
           
 UIRichList getUsersRichList()
           
 void inheritPermissionsValueChanged(javax.faces.event.ValueChangeEvent event)
          Inherit parent Space permissions value changed by the user
 boolean isInheritPermissions()
           
 java.lang.String removeOK()
          Action handler called when the OK button is clicked on the Remove User page
 void removeRole(javax.faces.event.ActionEvent event)
          Action handler called when the Remove button is pressed to remove a role from current user
static java.lang.String roleListToString(javax.faces.context.FacesContext context, java.util.List list)
          Convert a list of user Roles to a comma separated string list.
 void setAuthorityService(org.alfresco.service.cmr.security.AuthorityService authorityService)
           
 void setBrowseBean(BrowseBean browseBean)
           
 void setFilterMode(java.lang.String filterMode)
           
 void setInheritPermissions(boolean inheritPermissions)
           
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
           
 void setOwnableService(org.alfresco.service.cmr.security.OwnableService ownableService)
           
 void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
           
 void setPersonAuthority(java.lang.String person)
           
 void setPersonName(java.lang.String personName)
           
 void setPersonService(org.alfresco.service.cmr.security.PersonService personService)
           
 void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
           
 void setupUserAction(javax.faces.event.ActionEvent event)
          Action event called by all actions that need to setup a Person context on the UserMembers bean before an action page is called.
 void setUsersRichList(UIRichList usersRichList)
           
 void spaceChanged()
          Method called by UIContextService.spaceChanged() to inform all registered beans that the current space has changed.
 
Methods inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
doPostCommitProcessing, finish, finishImpl, formatErrorMessage, getActionsConfigId, getActionsContext, getAdditionalButtons, getCancelButtonLabel, getCheckOutCheckInService, getContainerDescription, getContainerSubTitle, getContainerTitle, getDefaultCancelOutcome, getDefaultFinishOutcome, getDictionaryService, getErrorMessageId, getErrorOutcome, getFileFolderService, getFinishButtonDisabled, getFinishButtonLabel, getMoreActionsConfigId, getNamespaceService, getRuleService, getTransactionService, init, isFinished, restored, setDictionaryService, setFileFolderService, setNamespaceService, setNavigator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

browseBean

protected BrowseBean browseBean
BrowseBean bean refernce

Constructor Detail

UserMembersBean

public UserMembersBean()
Default constructor

Method Detail

getNode

public abstract Node getNode()
Returns the node that is being acted upon

Returns:
The node to manage permissions for

setNodeService

public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Overrides:
setNodeService in class BaseDialogBean
Parameters:
nodeService - The NodeService to set.

getNodeService

protected org.alfresco.service.cmr.repository.NodeService getNodeService()
Overrides:
getNodeService in class BaseDialogBean

setSearchService

public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
Overrides:
setSearchService in class BaseDialogBean
Parameters:
searchService - The search service

getSearchService

protected org.alfresco.service.cmr.search.SearchService getSearchService()
Overrides:
getSearchService in class BaseDialogBean

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

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

setOwnableService

public void setOwnableService(org.alfresco.service.cmr.security.OwnableService ownableService)
Parameters:
ownableService - The ownableService to set.

getOwnableService

protected org.alfresco.service.cmr.security.OwnableService getOwnableService()

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

setBrowseBean

public void setBrowseBean(BrowseBean browseBean)
Overrides:
setBrowseBean in class BaseDialogBean
Parameters:
browseBean - The BrowseBean to set.

getUsersRichList

public UIRichList getUsersRichList()
Returns:
Returns the usersRichList.

setUsersRichList

public void setUsersRichList(UIRichList usersRichList)
Parameters:
usersRichList - The usersRichList to set.

getPersonRolesDataModel

public javax.faces.model.DataModel getPersonRolesDataModel()
Returns the properties for current Person roles JSF DataModel

Returns:
JSF DataModel representing the current Person roles

getPersonAuthority

public java.lang.String getPersonAuthority()
Returns:
Returns the current person authority.

setPersonAuthority

public void setPersonAuthority(java.lang.String person)
Parameters:
person - The person person authority to set.

getPersonName

public java.lang.String getPersonName()
Returns:
Returns the personName.

setPersonName

public void setPersonName(java.lang.String personName)
Parameters:
personName - The personName to set.

getHasChangePermissions

public boolean getHasChangePermissions()
Returns:
true if the current user can change permissions on this Space

isInheritPermissions

public boolean isInheritPermissions()
Returns:
Returns the inherit parent permissions flag set for the current space.

setInheritPermissions

public void setInheritPermissions(boolean inheritPermissions)
Parameters:
inheritPermissions - The inheritPermissions to set.

getOwner

public java.lang.String getOwner()
Return the owner username


getUsers

public java.util.List getUsers()
Returns:
the list of user nodes for list data binding

roleListToString

public static java.lang.String roleListToString(javax.faces.context.FacesContext context,
                                                java.util.List list)
Convert a list of user Roles to a comma separated string list. Each individual role will be looked up in message bundle to convert to a human readable string value.

Parameters:
context - FacesContext
list - List of Role names
Returns:
Comma separated string of human readable roles

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

filterModeChanged

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

getFilterItems

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

getFilterMode

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

setFilterMode

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

cancel

public java.lang.String cancel()
Action called to Close the dialog

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

setupUserAction

public void setupUserAction(javax.faces.event.ActionEvent event)
Action event called by all actions that need to setup a Person context on the UserMembers bean before an action page is called. The context will be a Authority in setPersonAuthority() which can be retrieved on the action page from UserMembersBean.setPersonAuthority().


inheritPermissionsValueChanged

public void inheritPermissionsValueChanged(javax.faces.event.ValueChangeEvent event)
Inherit parent Space permissions value changed by the user


addRole

public void addRole(javax.faces.event.ActionEvent event)
Action handler called when the Add Role button is pressed to process the current selection


removeRole

public void removeRole(javax.faces.event.ActionEvent event)
Action handler called when the Remove button is pressed to remove a role from current user


finishOK

public java.lang.String finishOK()
Action handler called when the Finish button is clicked on the Edit User Roles page


removeOK

public java.lang.String removeOK()
Action handler called when the OK button is clicked on the Remove User page



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