com.atlassian.confluence.user.actions
Class EditUserGroupsAction

java.lang.Object
  extended bycom.opensymphony.xwork.ActionSupport
      extended bycom.atlassian.confluence.core.ConfluenceActionSupport
          extended bycom.atlassian.confluence.user.actions.AbstractUsersAction
              extended bycom.atlassian.confluence.user.actions.EditUserGroupsAction
All Implemented Interfaces:
com.opensymphony.xwork.Action, Administrative, ExternalUserManagementAware, com.opensymphony.xwork.LocaleProvider, Serializable, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware

public class EditUserGroupsAction
extends AbstractUsersAction
implements ExternalUserManagementAware

See Also:
Serialized Form

Field Summary
protected  String action
           
protected  List groupsToJoin
           
protected  List groupsToLeave
           
protected  List memberGroups
           
protected  List nonMemberGroups
           
protected  PermissionCheckDispatcherResultCache permissionCheckDispatcherResultCache
           
protected  List readOnlyGroups
           
 
Fields inherited from class com.atlassian.confluence.user.actions.AbstractUsersAction
user, username
 
Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, log, permissionManager, permitted, PREVIEW, settingsManager, spacePermissionManager, userAccessor, webInterfaceManager
 
Fields inherited from class com.opensymphony.xwork.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
EditUserGroupsAction()
           
 
Method Summary
 String doDefault()
          Default webwork action execution method.
 String execute()
           
 String getCommaSeparatedReadOnlyGroups()
           
 List getMemberGroups()
           
 List getNonMemberGroups()
           
 List getReadOnlyGroups()
           
protected  boolean isLastGroup(String group, String permission)
          protects a user from accidentally removing him/herself from All ADMIN or USE groups

this method hence checks to see if the specified group is the last group the user belongs to, that has the specified permission

protected  void loadMemberGroups()
           
protected  void loadNonMemberGroups()
           
 void setGroupsToJoin(List toJoin)
           
 void setGroupsToLeave(List toLeave)
           
 void setJoin(String action)
           
 void setLeave(String x)
           
 void setPermissionCheckDispatcherResultCache(PermissionCheckDispatcherResultCache permissionCheckDispatcherResultCache)
           
 
Methods inherited from class com.atlassian.confluence.user.actions.AbstractUsersAction
getRemoteUsername, getUser, getUsername, isAllowedToAddUsers, setUsername
 
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addPermissionTypeTo, addToHistory, getActionName, getBootstrapManager, getCancelResult, getDateFormatter, getDefaultResourceBundle, getEditorLanguage, getEventManager, getGlobalHelper, getGlobalSettings, getHelper, getI18n, getInstalledLanguages, getLabelManager, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getNiceContentType, getPermissionTypes, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPreviousLoginDate, getRandom, getRemoteUser, getSession, getSpaceHelper, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUser, getUserAccessor, getUserFullName, getUserInterfaceState, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPermissionCheck, isPermitted, isPermittedAsString, isPrintableVersion, setBootstrapManager, setCancel, setEventManager, setFormatSettingsManager, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setPermissionCheck, setPermissionManager, setPreviousLoginDate, setSettingsManager, setSpacePermissionManager, setUserAccessor, setWebInterfaceManager
 
Methods inherited from class com.opensymphony.xwork.ActionSupport
addActionError, addActionMessage, addFieldError, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, setActionErrors, setActionMessages, setFieldErrors, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

memberGroups

protected List memberGroups

nonMemberGroups

protected List nonMemberGroups

action

protected String action

groupsToJoin

protected List groupsToJoin

groupsToLeave

protected List groupsToLeave

readOnlyGroups

protected List readOnlyGroups

permissionCheckDispatcherResultCache

protected PermissionCheckDispatcherResultCache permissionCheckDispatcherResultCache
Constructor Detail

EditUserGroupsAction

public EditUserGroupsAction()
Method Detail

setPermissionCheckDispatcherResultCache

public void setPermissionCheckDispatcherResultCache(PermissionCheckDispatcherResultCache permissionCheckDispatcherResultCache)

doDefault

public String doDefault()
                 throws Exception
Description copied from class: ConfluenceActionSupport
Default webwork action execution method.

Overrides:
doDefault in class ConfluenceActionSupport
Returns:
the action result
Throws:
Exception - if something goes wrong

loadMemberGroups

protected void loadMemberGroups()

loadNonMemberGroups

protected void loadNonMemberGroups()

execute

public String execute()
               throws Exception
Specified by:
execute in interface com.opensymphony.xwork.Action
Throws:
Exception

isLastGroup

protected boolean isLastGroup(String group,
                              String permission)
protects a user from accidentally removing him/herself from All ADMIN or USE groups

this method hence checks to see if the specified group is the last group the user belongs to, that has the specified permission

Parameters:
group -
permission -

getMemberGroups

public List getMemberGroups()

getNonMemberGroups

public List getNonMemberGroups()

setGroupsToJoin

public void setGroupsToJoin(List toJoin)

setGroupsToLeave

public void setGroupsToLeave(List toLeave)

setJoin

public void setJoin(String action)

setLeave

public void setLeave(String x)

getReadOnlyGroups

public List getReadOnlyGroups()

getCommaSeparatedReadOnlyGroups

public String getCommaSeparatedReadOnlyGroups()


Confluence is developed by Atlassian.