Class AccountUsersController
- java.lang.Object
-
- org.duracloud.account.app.controller.AbstractController
-
- org.duracloud.account.app.controller.AbstractAccountController
-
- org.duracloud.account.app.controller.AccountUsersController
-
@Controller @Lazy public class AccountUsersController extends AbstractAccountController
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classAccountUsersController.AccountUserThis class is a read only representation of a user from the perspective of an account admin/owner.static classAccountUsersController.InvitationStatusclassAccountUsersController.PendingAccountUser
-
Field Summary
Fields Modifier and Type Field Description static StringACCOUNT_USERS_EDIT_IDstatic StringACCOUNT_USERS_MAPPINGstatic StringACCOUNT_USERS_PATHstatic StringACCOUNT_USERS_VIEW_IDstatic StringEDIT_ACCOUNT_USERS_FORM_KEYstatic StringUSERS_DELETE_MAPPINGstatic StringUSERS_EDIT_MAPPINGstatic StringUSERS_INVITATIONS_DELETE_MAPPINGstatic StringUSERS_KEY-
Fields inherited from class org.duracloud.account.app.controller.AbstractAccountController
ACCOUNT_HOME, ACCOUNT_INFO_KEY, ACCOUNT_PATH, accountManagerService, ACCOUNTS_PATH, ACTION_STATUS, DC_VERSIONS_KEY, EDIT_PATH, NEW_ACCOUNT_VIEW, STATEMENT_PATH, userService
-
Fields inherited from class org.duracloud.account.app.controller.AbstractController
BY_ID_DELETE_MAPPING, BY_ID_EDIT_MAPPING, BY_ID_MAPPING, EDIT_MAPPING, log, NEW_MAPPING, USER_MAPPING, USERS_MAPPING
-
-
Constructor Summary
Constructors Constructor Description AccountUsersController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccountUserEditFormaccountUserEditForm()org.springframework.web.servlet.ModelAndViewaddUser(Long accountId, UsernameForm usernameForm, org.springframework.validation.BindingResult result, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)org.springframework.web.servlet.ModelAndViewdeleteUserFromAccount(Long accountId, Long userId, org.springframework.ui.Model model)org.springframework.web.servlet.ModelAndViewdeleteUserInvitation(Long accountId, Long invitationId, org.springframework.ui.Model model)org.springframework.web.servlet.ModelAndVieweditUser(Long accountId, Long userId, AccountUserEditForm accountUserEditForm, org.springframework.validation.BindingResult result, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)Stringget(Long accountId, org.springframework.ui.Model model)protected Stringget(AccountService accountService, org.springframework.ui.Model model)StringgetEditUserForm(Long accountId, Long userId, org.springframework.ui.Model model)InvitationForminvitationForm()org.springframework.web.servlet.ModelAndViewsendInvitations(Long accountId, InvitationForm invitationForm, org.springframework.validation.BindingResult result, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)UsernameFormusernameForm()-
Methods inherited from class org.duracloud.account.app.controller.AbstractAccountController
addAccountInfoToModel, addAccountOwnersToModel, addUserToModel, createAccountRedirectModelAndView, createAccountRedirectView, getAccountManagerService, getUser, getUserService, loadAccountInfo, loadAccountInfo, loadBillingInfo, loadProviderInfo, setAccountManagerService, setUserService
-
Methods inherited from class org.duracloud.account.app.controller.AbstractController
accountHasMoreThanOneOwner, createRedirectMav, destroy, formatUserUrl, getAdminRole, getOwnerRole, getRecaptchaSecret, getRecaptchaSiteKey, getUserRole, handleException, init, isRecaptchaEnabled, setError, setError, setFailureFeedback, setSuccessFeedback, setUserRights, validateRecaptcha
-
-
-
-
Field Detail
-
ACCOUNT_USERS_VIEW_ID
public static final String ACCOUNT_USERS_VIEW_ID
- See Also:
- Constant Field Values
-
ACCOUNT_USERS_EDIT_ID
public static final String ACCOUNT_USERS_EDIT_ID
- See Also:
- Constant Field Values
-
EDIT_ACCOUNT_USERS_FORM_KEY
public static final String EDIT_ACCOUNT_USERS_FORM_KEY
- See Also:
- Constant Field Values
-
ACCOUNT_USERS_PATH
public static final String ACCOUNT_USERS_PATH
- See Also:
- Constant Field Values
-
ACCOUNT_USERS_MAPPING
public static final String ACCOUNT_USERS_MAPPING
- See Also:
- Constant Field Values
-
USERS_INVITATIONS_DELETE_MAPPING
public static final String USERS_INVITATIONS_DELETE_MAPPING
- See Also:
- Constant Field Values
-
USERS_DELETE_MAPPING
public static final String USERS_DELETE_MAPPING
- See Also:
- Constant Field Values
-
USERS_EDIT_MAPPING
public static final String USERS_EDIT_MAPPING
- See Also:
- Constant Field Values
-
USERS_KEY
public static final String USERS_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
invitationForm
@ModelAttribute("invitationForm") public InvitationForm invitationForm()
-
usernameForm
@ModelAttribute("usernameForm") public UsernameForm usernameForm()
-
accountUserEditForm
@ModelAttribute("accountUsersEditForm") public AccountUserEditForm accountUserEditForm()
-
get
@RequestMapping(value="/byid/{accountId}/users", method=GET) public String get(@PathVariable Long accountId, org.springframework.ui.Model model) throws Exception- Parameters:
accountId-model-- Returns:
- Throws:
AccountNotFoundExceptionException
-
addUser
@Transactional @RequestMapping(value="/byid/{accountId}/users/adduser", method=POST) public org.springframework.web.servlet.ModelAndView addUser(@PathVariable Long accountId, @ModelAttribute("usernameForm") UsernameForm usernameForm, org.springframework.validation.BindingResult result, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) throws Exception- Throws:
Exception
-
get
protected String get(AccountService accountService, org.springframework.ui.Model model) throws Exception
- Throws:
Exception
-
sendInvitations
@Transactional @RequestMapping(value="/byid/{accountId}/users", method=POST) public org.springframework.web.servlet.ModelAndView sendInvitations(@PathVariable Long accountId, @ModelAttribute("invitationForm") InvitationForm invitationForm, org.springframework.validation.BindingResult result, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) throws Exception- Throws:
Exception
-
deleteUserInvitation
@Transactional @RequestMapping(value="/byid/{accountId}/users/invitations/byid/{invitationId}/delete", method=POST) public org.springframework.web.servlet.ModelAndView deleteUserInvitation(@PathVariable Long accountId, @PathVariable Long invitationId, org.springframework.ui.Model model) throws Exception- Throws:
Exception
-
deleteUserFromAccount
@Transactional @RequestMapping(value="/byid/{accountId}/users/byid/{userId}/delete", method=POST) public org.springframework.web.servlet.ModelAndView deleteUserFromAccount(@PathVariable Long accountId, @PathVariable Long userId, org.springframework.ui.Model model) throws Exception- Throws:
Exception
-
getEditUserForm
@RequestMapping(value="/byid/{accountId}/users/byid/{userId}/edit", method=GET) public String getEditUserForm(@PathVariable Long accountId, @PathVariable Long userId, org.springframework.ui.Model model) throws Exception- Throws:
Exception
-
editUser
@Transactional @RequestMapping(value="/byid/{accountId}/users/byid/{userId}/edit", method=POST) public org.springframework.web.servlet.ModelAndView editUser(@PathVariable Long accountId, @PathVariable Long userId, @ModelAttribute("accountUsersEditForm") AccountUserEditForm accountUserEditForm, org.springframework.validation.BindingResult result, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) throws Exception- Throws:
Exception
-
-