com.atlassian.jira.web.action.admin.user
Class BulkEditUserGroups

java.lang.Object
  extended by webwork.action.ActionSupport
      extended by com.atlassian.jira.action.JiraActionSupport
          extended by com.atlassian.jira.web.action.JiraWebActionSupport
              extended by com.atlassian.jira.web.action.admin.user.BulkEditUserGroups
All Implemented Interfaces:
ErrorCollection, I18nHelper, AuthorizationSupport, Serializable, webwork.action.Action, webwork.action.CommandDriven, webwork.action.IllegalArgumentAware

public class BulkEditUserGroups
extends JiraWebActionSupport

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
JiraWebActionSupport.MessageType
 
Nested classes/interfaces inherited from interface com.atlassian.jira.util.ErrorCollection
ErrorCollection.Reason
 
Nested classes/interfaces inherited from interface com.atlassian.jira.util.I18nHelper
I18nHelper.BeanFactory
 
Field Summary
 
Fields inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
ISSUE_NOT_FOUND_RESULT, PERMISSION_VIOLATION_RESULT, request, RETURN_URL_PARAMETER, savedFilters
 
Fields inherited from class com.atlassian.jira.action.JiraActionSupport
log
 
Fields inherited from class webwork.action.ActionSupport
command, errorMap, errorMessages
 
Fields inherited from interface webwork.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
BulkEditUserGroups(GroupManager groupManager, MultiUserConverter multiUserConverter, ApplicationProperties applicationProperties, GlobalPermissionGroupAssociationUtil globalPermissionGroupAssociationUtil, GroupService groupService, UserManager userManager)
           
 
Method Summary
 String doExecute()
           
 void doValidation()
           
 Collection<com.atlassian.crowd.embedded.api.Group> getAllVisibleGroups()
          gets all the groups, used to populate the groups select list
 String getAssign()
           
 int getAssignedUsersCount()
          Counts the total number of user entries from the memberslist.
NOTE: This does not count distinct users - so with multiple selected groups, the count may be off
 int getAssignedUsersListSize()
          determine what size the assigned users select list should be (capped at MAX_LIST_SIZE)
 boolean getIsGroupSelected(com.atlassian.crowd.embedded.api.Group group)
          Checks if the group is selected
 int getListSize(int size)
          use this to limit the listSizes to MAX_LIST_SIZE
 int getMaxUsersDisplayedPerGroup()
           
 Collection getMembersList()
          Used to populate the assigned users of the selected groups.
Always has the 'All' group which represents all the members of the selected groups.
Rest of the users are added under individual group names.
 String getOptionValue(UserOption userOption)
          used to determine what the option value (format) for a UserOption should be
 String getPrettyPrintOverloadedGroups()
           
 String getPrunedUsersToAssign()
           
 String[] getSelectedGroupsStr()
           
 List<com.atlassian.crowd.embedded.api.Group> getSelectedGroupsUserHasPermToSee()
          Of the groups the user has selected, return only those the current user has permission to edit.
 String getUnassign()
           
 Collection getUsersToAssign()
           
 String getUsersToAssignStr()
           
 String[] getUsersToUnassign()
           
 boolean isTooManyUsersListed()
           
 void setAssign(String assign)
           
 void setSelectedGroupsStr(String[] selectedGroupsStr)
           
 void setUnassign(String unassign)
           
 void setUsersToAssignStr(String usersToAssignStr)
           
 void setUsersToUnassign(String[] usersToUnassign)
           
 
Methods inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
addError, addErrorCollection, addErrorMessage, addErrorMessageByKeyIfAbsent, addErrorMessageIfAbsent, addReason, addReasons, forceRedirect, getAdministratorContactLink, getApplicationProperties, getAuthorizationSupport, getConglomerateCookieValue, getConstantsManager, getDateFormat, getDateTimeFormat, getDateTimeFormatter, getDescTranslation, getDmyDateFormatter, getField, getFlushedErrorMessages, getGlobalPermissionManager, getHint, getHintManager, getJiraContactHelper, getJiraServiceContext, getLanguage, getLoggedInApplicationUser, getLoggedInUser, getNameTranslation, getOutlookDate, getPermissionManager, getProjectManager, getRandomHint, getReasons, getRedirect, getRedirect, getRedirectSanitiser, getReturnUrl, getReturnUrlForCancelLink, getSearchSortDescriptions, getSelectedProject, getSelectedProjectObject, getServerId, getTimeFormat, getUriValidator, getUserFullName, getUserManager, getUserProjectHistoryManager, getVersionManager, getWebworkStack, getWebworkStack, getXsrfToken, hasErrorMessage, hasErrorMessageByKey, htmlEncode, insertContextPath, isHasIssuePermission, isHasIssuePermission, isHasPermission, isHasPermission, isHasPermission, isHasProjectPermission, isHasProjectPermission, isInlineDialogMode, isSystemAdministrator, isUserExists, returnComplete, returnComplete, returnCompleteWithInlineRedirect, returnCompleteWithInlineRedirectAndMsg, returnCompleteWithInlineRedirectAndMsg, returnMsgToUser, returnMsgToUser, setConglomerateCookieValue, setInline, setReasons, setReturnUrl, setSelectedProjectId, urlEncode
 
Methods inherited from class com.atlassian.jira.action.JiraActionSupport
addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, execute, getActionName, getComponentInstanceOfType, getDefaultResourceBundle, getDelegator, getI18nHelper, getKeysForPrefix, getLocale, getOfBizDelegator, getRemoteUser, getResult, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getUnescapedText, getUntransformedRawText, getUserPreferences, getWatcherManager, hasAnyErrors, isIndexing, isKeyDefined, removeKeyOrAddError
 
Methods inherited from class webwork.action.ActionSupport
addError, addErrorMessage, doDefault, getCommandName, getErrorMessages, getErrors, getHasErrorMessages, getHasErrors, getPropertyEditorMessage, getTexts, getTexts, getTimezone, invalidInput, invokeCommand, isCommand, setCommand, setErrorMessages, setErrors, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.util.ErrorCollection
addError, addErrorMessage, addErrorMessages, addErrors, getErrorMessages, getErrors, hasAnyErrors, setErrorMessages
 
Methods inherited from interface webwork.action.CommandDriven
getCommandName, setCommand
 

Constructor Detail

BulkEditUserGroups

public BulkEditUserGroups(GroupManager groupManager,
                          MultiUserConverter multiUserConverter,
                          ApplicationProperties applicationProperties,
                          GlobalPermissionGroupAssociationUtil globalPermissionGroupAssociationUtil,
                          GroupService groupService,
                          UserManager userManager)
Method Detail

doValidation

public void doValidation()
Overrides:
doValidation in class webwork.action.ActionSupport

doExecute

public String doExecute()
                 throws Exception
Overrides:
doExecute in class webwork.action.ActionSupport
Throws:
Exception

getAllVisibleGroups

public Collection<com.atlassian.crowd.embedded.api.Group> getAllVisibleGroups()
gets all the groups, used to populate the groups select list


getIsGroupSelected

public boolean getIsGroupSelected(com.atlassian.crowd.embedded.api.Group group)
Checks if the group is selected


getMembersList

public Collection getMembersList()
Used to populate the assigned users of the selected groups.
Always has the 'All' group which represents all the members of the selected groups.
Rest of the users are added under individual group names.


getAssignedUsersCount

public int getAssignedUsersCount()
Counts the total number of user entries from the memberslist.
NOTE: This does not count distinct users - so with multiple selected groups, the count may be off


getAssignedUsersListSize

public int getAssignedUsersListSize()
determine what size the assigned users select list should be (capped at MAX_LIST_SIZE)


getListSize

public int getListSize(int size)
use this to limit the listSizes to MAX_LIST_SIZE


getOptionValue

public String getOptionValue(UserOption userOption)
used to determine what the option value (format) for a UserOption should be


getUnassign

public String getUnassign()

setUnassign

public void setUnassign(String unassign)

getAssign

public String getAssign()

setAssign

public void setAssign(String assign)

getSelectedGroupsStr

public String[] getSelectedGroupsStr()

setSelectedGroupsStr

public void setSelectedGroupsStr(String[] selectedGroupsStr)

getSelectedGroupsUserHasPermToSee

public List<com.atlassian.crowd.embedded.api.Group> getSelectedGroupsUserHasPermToSee()
Of the groups the user has selected, return only those the current user has permission to edit.

Returns:
those Groups.

setUsersToAssignStr

public void setUsersToAssignStr(String usersToAssignStr)

getUsersToAssignStr

public String getUsersToAssignStr()

getUsersToAssign

public Collection getUsersToAssign()

getPrunedUsersToAssign

public String getPrunedUsersToAssign()
Returns:
collection of valid user names to assign to the currently selected groups

setUsersToUnassign

public void setUsersToUnassign(String[] usersToUnassign)

getUsersToUnassign

public String[] getUsersToUnassign()

isTooManyUsersListed

public boolean isTooManyUsersListed()

getMaxUsersDisplayedPerGroup

public int getMaxUsersDisplayedPerGroup()

getPrettyPrintOverloadedGroups

public String getPrettyPrintOverloadedGroups()


Copyright © 2002-2012 Atlassian. All Rights Reserved.