Class AccountUsersController
java.lang.Object
org.duracloud.account.app.controller.AbstractController
org.duracloud.account.app.controller.AbstractAccountController
org.duracloud.account.app.controller.AccountUsersController
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassThis class is a read only representation of a user from the perspective of an account admin/owner.static enumclass -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields 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, userServiceFields 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 -
Method Summary
Modifier and TypeMethodDescriptionorg.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) protected Stringget(AccountService accountService, org.springframework.ui.Model model) getEditUserForm(Long accountId, Long userId, org.springframework.ui.Model model) 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) Methods inherited from class org.duracloud.account.app.controller.AbstractAccountController
addAccountInfoToModel, addAccountOwnersToModel, addUserToModel, createAccountRedirectModelAndView, createAccountRedirectView, getAccountManagerService, getUser, getUserService, loadAccountInfo, loadAccountInfo, loadBillingInfo, loadProviderInfo, setAccountManagerService, setUserServiceMethods 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 Details
-
ACCOUNT_USERS_VIEW_ID
- See Also:
-
ACCOUNT_USERS_EDIT_ID
- See Also:
-
EDIT_ACCOUNT_USERS_FORM_KEY
- See Also:
-
ACCOUNT_USERS_PATH
- See Also:
-
ACCOUNT_USERS_MAPPING
- See Also:
-
USERS_INVITATIONS_DELETE_MAPPING
- See Also:
-
USERS_DELETE_MAPPING
- See Also:
-
USERS_EDIT_MAPPING
- See Also:
-
USERS_KEY
- See Also:
-
-
Constructor Details
-
AccountUsersController
public AccountUsersController()
-
-
Method Details
-
invitationForm
-
usernameForm
-
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
-