com.atlassian.confluence.user.actions
Class EditUserGroupsAction

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

public class EditUserGroupsAction
extends AbstractUsersAction
implements ExternalUserManagementAware

See Also:
Serialized Form

Field Summary
protected  java.lang.String action
           
protected  java.util.List groupsToJoin
           
protected  java.util.List groupsToLeave
           
protected  java.util.List memberGroups
           
protected  java.util.List nonMemberGroups
           
protected  PermissionCheckDispatcherResultCache permissionCheckDispatcherResultCache
           
protected  java.util.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, 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
 java.lang.String doDefault()
          Default webwork action execution method.
 java.lang.String execute()
           
 java.util.List getMemberGroups()
           
 java.util.List getNonMemberGroups()
           
 java.util.List getReadOnlyGroups()
           
protected  boolean isLastGroup(java.lang.String group, java.lang.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

 boolean isPermitted()
           
 void setGroupsToJoin(java.util.List toJoin)
           
 void setGroupsToLeave(java.util.List toLeave)
           
 void setJoin(java.lang.String action)
           
 void setLeave(java.lang.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, addFieldError, addPermissionTypeTo, addToHistory, formatFriendlyDate, getActionName, getBootstrapManager, getCancelResult, getDateFormatter, getDefaultResourceBundle, getEventManager, getFriendlyDateFormatter, 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, getWebInterfaceContext, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPermissionCheck, isPermittedAsString, isPrintableVersion, isSharedMode, isUsingHSQL, setBootstrapManager, setCancel, setEventManager, setFormatSettingsManager, setI18NBean, 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 java.util.List memberGroups

nonMemberGroups

protected java.util.List nonMemberGroups

action

protected java.lang.String action

groupsToJoin

protected java.util.List groupsToJoin

groupsToLeave

protected java.util.List groupsToLeave

readOnlyGroups

protected java.util.List readOnlyGroups

permissionCheckDispatcherResultCache

protected PermissionCheckDispatcherResultCache permissionCheckDispatcherResultCache
Constructor Detail

EditUserGroupsAction

public EditUserGroupsAction()
Method Detail

setPermissionCheckDispatcherResultCache

public void setPermissionCheckDispatcherResultCache(PermissionCheckDispatcherResultCache permissionCheckDispatcherResultCache)

doDefault

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

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

execute

public java.lang.String execute()
                         throws java.lang.Exception
Specified by:
execute in interface com.opensymphony.xwork.Action
Overrides:
execute in class com.opensymphony.xwork.ActionSupport
Throws:
java.lang.Exception

isLastGroup

protected boolean isLastGroup(java.lang.String group,
                              java.lang.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


getMemberGroups

public java.util.List getMemberGroups()

getNonMemberGroups

public java.util.List getNonMemberGroups()

setGroupsToJoin

public void setGroupsToJoin(java.util.List toJoin)

setGroupsToLeave

public void setGroupsToLeave(java.util.List toLeave)

setJoin

public void setJoin(java.lang.String action)

setLeave

public void setLeave(java.lang.String x)

getReadOnlyGroups

public java.util.List getReadOnlyGroups()

isPermitted

public boolean isPermitted()
Overrides:
isPermitted in class ConfluenceActionSupport


Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.