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, java.io.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 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(com.opensymphony.user.UserManager userManager, MultiUserConverter multiUserConverter, ApplicationProperties applicationProperties, GlobalPermissionGroupAssociationUtil globalPermissionGroupAssociationUtil, GroupService groupService)
           
 
Method Summary
 java.lang.String doExecute()
           
 void doValidation()
           
 java.util.Collection getAllVisibleGroups()
          gets all the groups, used to populate the groups select list
 java.lang.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.opensymphony.user.Group group)
          Checks if the group is selected
 int getListSize(int size)
          use this to limit the listSizes to MAX_LIST_SIZE
 int getMaxUsersDisplayedPerGroup()
           
 java.util.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.
 java.lang.String getOptionValue(UserOption userOption)
          used to determine what the option value (format) for a UserOption should be
 java.lang.String getPrettyPrintOverloadedGroups()
           
 java.lang.String getPrunedUsersToAssign()
           
 java.lang.String[] getSelectedGroupsStr()
           
 java.util.List getSelectedGroupsUserHasPermToSee()
          Of the groups the user has selected, return only those the current user has permission to edit.
 java.lang.String getUnassign()
           
 java.util.Collection getUsersToAssign()
           
 java.lang.String getUsersToAssignStr()
           
 java.lang.String[] getUsersToUnassign()
           
 boolean isTooManyUsersListed()
           
 void setAssign(java.lang.String assign)
           
 void setSelectedGroupsStr(java.lang.String[] selectedGroupsStr)
           
 void setUnassign(java.lang.String unassign)
           
 void setUsersToAssignStr(java.lang.String usersToAssignStr)
           
 void setUsersToUnassign(java.lang.String[] usersToUnassign)
           
 
Methods inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
addErrorCollection, addErrorMessageByKeyIfAbsent, addErrorMessageIfAbsent, forceRedirect, getApplicationProperties, getAssignableUsers, getAssignableUsers, getCachedGroups, getComponentManager, getConglomerateCookieValue, getConstantsManager, getDateFormat, getDateTimeFormat, getDescTranslation, getExternalLinkUtils, getField, getFlushedErrorMessages, getGlobalPermissionManager, getHint, getHintManager, getJiraServiceContext, getLanguage, getNameTranslation, getOutlookDate, getPermissionManager, getProjectManager, getPropertySet, getRandomHint, getRedirect, getRemoteUser, getReturnUrl, getReturnUrlForCancelLink, getSearchSortDescriptions, getSelectedProject, getSelectedProjectObject, getServerId, getText, getTimeFormat, getUriValidator, getUserFullName, getUserProjectHistoryManager, getVersionManager, getWebworkStack, getWebworkStack, getXsrfToken, hasErrorMessage, hasErrorMessageByKey, htmlEncode, isHasIssuePermission, isHasIssuePermission, isHasPermission, isHasPermission, isHasPermission, isHasProjectPermission, isHasProjectPermission, isInlineDialogMode, isSystemAdministrator, isUserExists, returnComplete, returnComplete, returnCompleteWithInlineRedirect, setConglomerateCookieValue, setInline, setReturnUrl, setSelectedProjectId
 
Methods inherited from class com.atlassian.jira.action.JiraActionSupport
addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, execute, getActionName, getDefaultResourceBundle, getDelegator, getKeysForPrefix, getLocale, getResult, getText, getText, getText, getText, getText, getText, getText, getText, getText0, getUnescapedText, getUserPreferences, getWatcherManager, hasAnyErrors, isEnterprise, isIndexing, isProfessional, isProfessionalOrEnterprise, isStandard, 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(com.opensymphony.user.UserManager userManager,
                          MultiUserConverter multiUserConverter,
                          ApplicationProperties applicationProperties,
                          GlobalPermissionGroupAssociationUtil globalPermissionGroupAssociationUtil,
                          GroupService groupService)
Method Detail

doValidation

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

doExecute

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

getAllVisibleGroups

public java.util.Collection getAllVisibleGroups()
gets all the groups, used to populate the groups select list


getIsGroupSelected

public boolean getIsGroupSelected(com.opensymphony.user.Group group)
Checks if the group is selected


getMembersList

public java.util.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 java.lang.String getOptionValue(UserOption userOption)
used to determine what the option value (format) for a UserOption should be


getUnassign

public java.lang.String getUnassign()

setUnassign

public void setUnassign(java.lang.String unassign)

getAssign

public java.lang.String getAssign()

setAssign

public void setAssign(java.lang.String assign)

getSelectedGroupsStr

public java.lang.String[] getSelectedGroupsStr()

setSelectedGroupsStr

public void setSelectedGroupsStr(java.lang.String[] selectedGroupsStr)

getSelectedGroupsUserHasPermToSee

public java.util.List 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(java.lang.String usersToAssignStr)

getUsersToAssignStr

public java.lang.String getUsersToAssignStr()

getUsersToAssign

public java.util.Collection getUsersToAssign()

getPrunedUsersToAssign

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

setUsersToUnassign

public void setUsersToUnassign(java.lang.String[] usersToUnassign)

getUsersToUnassign

public java.lang.String[] getUsersToUnassign()

isTooManyUsersListed

public boolean isTooManyUsersListed()

getMaxUsersDisplayedPerGroup

public int getMaxUsersDisplayedPerGroup()

getPrettyPrintOverloadedGroups

public java.lang.String getPrettyPrintOverloadedGroups()


Copyright © 2002-2010 Atlassian. All Rights Reserved.