Class UserController
- java.lang.Object
-
- org.duracloud.account.app.controller.AbstractController
-
- org.duracloud.account.app.controller.UserController
-
@Controller @Lazy @RequestMapping("/users") public class UserController extends AbstractControllerThe default view for this application
-
-
Field Summary
Fields Modifier and Type Field Description static StringCHANGE_PASSWORD_FORM_KEYstatic StringCHANGE_PASSWORD_MAPPINGstatic StringCHANGE_PASSWORD_VIEWstatic StringFORGOT_PASSWORD_FORM_KEYstatic StringFORGOT_PASSWORD_MAPPINGprotected static StringFORGOT_PASSWORD_SUCCESS_VIEWstatic StringFORGOT_PASSWORD_VIEWstatic StringNEW_INSTANCE_FORMstatic StringNEW_USER_FORM_KEYstatic StringNEW_USER_VIEWstatic StringUSER_ACCOUNTSstatic StringUSER_ACCOUNTS_MAPPINGstatic StringUSER_EDIT_MAPPINGstatic StringUSER_EDIT_VIEWstatic StringUSER_HOMEstatic StringUSER_KEYstatic StringUSER_PROFILE_FORM_KEY-
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 UserController()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.web.servlet.ModelAndViewadd(NewUserForm newUserForm, org.springframework.validation.BindingResult result, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)StringanonymousPasswordChange(String redemptionCode, AnonymousChangePasswordForm form, org.springframework.validation.BindingResult result, org.springframework.ui.Model model)StringanonymousPasswordChange(String redemptionCode, org.springframework.ui.Model model)org.springframework.web.servlet.ModelAndViewchangePassword(String username, ChangePasswordForm form, org.springframework.validation.BindingResult result, org.springframework.ui.Model model)StringchangePassword(String username, org.springframework.ui.Model model)protected org.duracloud.account.db.model.UserInvitationcheckRedemptionCode(String redemptionCode, org.springframework.ui.Model model)Stringedit(String username, org.springframework.ui.Model model)StringforgotPassword(ForgotPasswordForm forgotPasswordForm, org.springframework.validation.BindingResult result, org.springframework.ui.Model model, javax.servlet.http.HttpServletRequest request)protected static org.springframework.web.servlet.view.RedirectViewformatUserRedirect(String username)AccountManagerServicegetAccountManagerService()org.springframework.web.servlet.ModelAndViewgetForgotPasswordForm(javax.servlet.http.HttpServletRequest request)org.springframework.web.servlet.ModelAndViewgetNewForm(javax.servlet.http.HttpServletRequest request)org.springframework.web.servlet.ModelAndViewgetUser(String username, javax.servlet.http.HttpServletRequest request)org.springframework.web.servlet.ModelAndViewgetUserAccounts(String username)DuracloudUserServicegetUserService()org.duracloud.account.db.model.InstanceType[]instanceTypes()org.springframework.web.servlet.ModelAndViewprofileRedirect()org.springframework.web.servlet.ModelAndViewredeemUser(javax.servlet.http.HttpServletRequest request, String redemptionCode)voidsetAccountManagerService(AccountManagerService accountManagerService)voidsetAmaEndpoint(org.duracloud.account.config.AmaEndpoint amaEndpoint)voidsetUserService(DuracloudUserService userService)org.springframework.web.servlet.ModelAndViewupdate(String username, UserProfileEditForm form, org.springframework.validation.BindingResult result, org.springframework.ui.Model model)-
Methods inherited from class org.duracloud.account.app.controller.AbstractController
accountHasMoreThanOneOwner, createRedirectMav, destroy, formatUserUrl, getAdminRole, getOwnerRole, getUserRole, handleException, init, setError, setError, setFailureFeedback, setSuccessFeedback, setUserRights
-
-
-
-
Field Detail
-
FORGOT_PASSWORD_SUCCESS_VIEW
protected static final String FORGOT_PASSWORD_SUCCESS_VIEW
- See Also:
- Constant Field Values
-
USER_KEY
public static final String USER_KEY
- See Also:
- Constant Field Values
-
NEW_USER_VIEW
public static final String NEW_USER_VIEW
- See Also:
- Constant Field Values
-
FORGOT_PASSWORD_VIEW
public static final String FORGOT_PASSWORD_VIEW
- See Also:
- Constant Field Values
-
USER_HOME
public static final String USER_HOME
- See Also:
- Constant Field Values
-
FORGOT_PASSWORD_MAPPING
public static final String FORGOT_PASSWORD_MAPPING
- See Also:
- Constant Field Values
-
USER_ACCOUNTS
public static final String USER_ACCOUNTS
- See Also:
- Constant Field Values
-
USER_EDIT_MAPPING
public static final String USER_EDIT_MAPPING
- See Also:
- Constant Field Values
-
USER_ACCOUNTS_MAPPING
public static final String USER_ACCOUNTS_MAPPING
- See Also:
- Constant Field Values
-
USER_EDIT_VIEW
public static final String USER_EDIT_VIEW
- See Also:
- Constant Field Values
-
CHANGE_PASSWORD_MAPPING
public static final String CHANGE_PASSWORD_MAPPING
- See Also:
- Constant Field Values
-
CHANGE_PASSWORD_VIEW
public static final String CHANGE_PASSWORD_VIEW
- See Also:
- Constant Field Values
-
USER_PROFILE_FORM_KEY
public static final String USER_PROFILE_FORM_KEY
- See Also:
- Constant Field Values
-
CHANGE_PASSWORD_FORM_KEY
public static final String CHANGE_PASSWORD_FORM_KEY
- See Also:
- Constant Field Values
-
FORGOT_PASSWORD_FORM_KEY
public static final String FORGOT_PASSWORD_FORM_KEY
- See Also:
- Constant Field Values
-
NEW_USER_FORM_KEY
public static final String NEW_USER_FORM_KEY
- See Also:
- Constant Field Values
-
NEW_INSTANCE_FORM
public static final String NEW_INSTANCE_FORM
- See Also:
- Constant Field Values
-
-
Method Detail
-
setUserService
public void setUserService(DuracloudUserService userService)
- Parameters:
userService-
-
getUserService
public DuracloudUserService getUserService()
-
getNewForm
@RequestMapping(value="/new", method=GET) public org.springframework.web.servlet.ModelAndView getNewForm(javax.servlet.http.HttpServletRequest request)
-
getForgotPasswordForm
@RequestMapping(value="/forgot-password", method=GET) public org.springframework.web.servlet.ModelAndView getForgotPasswordForm(javax.servlet.http.HttpServletRequest request)
-
instanceTypes
@ModelAttribute("instanceTypes") public org.duracloud.account.db.model.InstanceType[] instanceTypes()
-
profileRedirect
@RequestMapping(value="/profile", method=GET) public org.springframework.web.servlet.ModelAndView profileRedirect()
-
getUser
@RequestMapping(value="/byid/{username:[a-z0-9.\\-_@]*}", method=GET) public org.springframework.web.servlet.ModelAndView getUser(@PathVariable String username, javax.servlet.http.HttpServletRequest request) throws DBNotFoundException- Throws:
DBNotFoundException
-
getUserAccounts
@RequestMapping(value="/byid/{username:[a-z0-9.\\-_@]*}/accounts", method=GET) public org.springframework.web.servlet.ModelAndView getUserAccounts(@PathVariable String username) throws DBNotFoundException- Throws:
DBNotFoundException
-
edit
@RequestMapping(value="/byid/{username:[a-z0-9.\\-_@]*}/edit", method=GET) public String edit(@PathVariable String username, org.springframework.ui.Model model) throws DBNotFoundException- Throws:
DBNotFoundException
-
update
@Transactional @RequestMapping(value="/byid/{username:[a-z0-9.\\-_@]*}/edit", method=POST) public org.springframework.web.servlet.ModelAndView update(@PathVariable String username, @ModelAttribute("userProfileEditForm") UserProfileEditForm form, org.springframework.validation.BindingResult result, org.springframework.ui.Model model) throws Exception- Throws:
Exception
-
changePassword
@RequestMapping(value="/byid/{username:[a-z0-9.\\-_@]*}/change-password", method=GET) public String changePassword(@PathVariable String username, org.springframework.ui.Model model) throws DBNotFoundException- Throws:
DBNotFoundException
-
changePassword
@Transactional @RequestMapping(value="/byid/{username:[a-z0-9.\\-_@]*}/change-password", method=POST) public org.springframework.web.servlet.ModelAndView changePassword(@PathVariable String username, @ModelAttribute("changePasswordForm") ChangePasswordForm form, org.springframework.validation.BindingResult result, org.springframework.ui.Model model) throws Exception- Throws:
Exception
-
anonymousPasswordChange
@RequestMapping(value="/change-password/{redemptionCode}", method=GET) public String anonymousPasswordChange(@PathVariable String redemptionCode, org.springframework.ui.Model model) throws DBNotFoundException- Throws:
DBNotFoundException
-
checkRedemptionCode
protected org.duracloud.account.db.model.UserInvitation checkRedemptionCode(String redemptionCode, org.springframework.ui.Model model)
-
anonymousPasswordChange
@Transactional @RequestMapping(value="/change-password/{redemptionCode}", method=POST) public String anonymousPasswordChange(@PathVariable String redemptionCode, @ModelAttribute("changePasswordForm") AnonymousChangePasswordForm form, org.springframework.validation.BindingResult result, org.springframework.ui.Model model) throws Exception- Throws:
Exception
-
add
@Transactional @RequestMapping(value="/new", method=POST) public org.springframework.web.servlet.ModelAndView add(@ModelAttribute("newUserForm") NewUserForm newUserForm, org.springframework.validation.BindingResult result, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) throws Exception- Throws:
Exception
-
formatUserRedirect
protected static org.springframework.web.servlet.view.RedirectView formatUserRedirect(String username)
-
forgotPassword
@Transactional @RequestMapping(value="/forgot-password", method=POST) public String forgotPassword(@ModelAttribute("forgotPasswordForm") ForgotPasswordForm forgotPasswordForm, org.springframework.validation.BindingResult result, org.springframework.ui.Model model, javax.servlet.http.HttpServletRequest request) throws Exception- Throws:
Exception
-
redeemUser
@RequestMapping(value="/redeem/{redemptionCode}", method=GET) public org.springframework.web.servlet.ModelAndView redeemUser(javax.servlet.http.HttpServletRequest request, @PathVariable String redemptionCode) throws DBNotFoundException- Throws:
DBNotFoundException
-
setAccountManagerService
public void setAccountManagerService(AccountManagerService accountManagerService)
-
getAccountManagerService
public AccountManagerService getAccountManagerService()
-
setAmaEndpoint
public void setAmaEndpoint(org.duracloud.account.config.AmaEndpoint amaEndpoint)
-
-