Class AbstractController
java.lang.Object
org.duracloud.account.app.controller.AbstractController
- Direct Known Subclasses:
AbstractAccountController,AbstractCrudController,AbstractRootController,HomeController,UserController
Base class for all controllers.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaccountHasMoreThanOneOwner(Set<org.duracloud.account.db.model.DuracloudUser> users, Long accountId) protected org.springframework.web.servlet.ModelAndViewcreateRedirectMav(String url) voiddestroy()protected static StringformatUserUrl(String username) org.duracloud.account.db.model.Roleorg.duracloud.account.db.model.Roleorg.duracloud.account.db.model.Roleorg.springframework.web.servlet.ModelAndViewvoidinit()protected booleanprotected voidprotected voidsetError(Exception e, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) protected voidsetFailureFeedback(String message, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) protected voidsetSuccessFeedback(String message, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) protected voidsetUserRights(DuracloudUserService userService, Long accountId, Long userId, org.duracloud.account.db.model.Role role) protected booleanvalidateRecaptcha(String recaptchaResponse)
-
Field Details
-
log
protected org.slf4j.Logger log -
USERS_MAPPING
- See Also:
-
USER_MAPPING
- See Also:
-
NEW_MAPPING
- See Also:
-
EDIT_MAPPING
- See Also:
-
BY_ID_MAPPING
- See Also:
-
BY_ID_EDIT_MAPPING
- See Also:
-
BY_ID_DELETE_MAPPING
- See Also:
-
-
Constructor Details
-
AbstractController
public AbstractController()
-
-
Method Details
-
init
public void init() -
destroy
public void destroy() -
getOwnerRole
@ModelAttribute("ownerRole") public org.duracloud.account.db.model.Role getOwnerRole() -
getAdminRole
@ModelAttribute("adminRole") public org.duracloud.account.db.model.Role getAdminRole() -
getUserRole
@ModelAttribute("userRole") public org.duracloud.account.db.model.Role getUserRole() -
getRecaptchaSiteKey
-
isRecaptchaEnabled
@ModelAttribute("recaptchaEnabled") protected boolean isRecaptchaEnabled() -
getRecaptchaSecret
-
setUserRights
protected void setUserRights(DuracloudUserService userService, Long accountId, Long userId, org.duracloud.account.db.model.Role role) -
accountHasMoreThanOneOwner
protected boolean accountHasMoreThanOneOwner(Set<org.duracloud.account.db.model.DuracloudUser> users, Long accountId) - Parameters:
users-- Returns:
-
handleException
@ExceptionHandler(java.lang.Exception.class) public org.springframework.web.servlet.ModelAndView handleException(Exception e) -
formatUserUrl
-
setError
-
setError
protected void setError(Exception e, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) -
createRedirectMav
-
setSuccessFeedback
protected void setSuccessFeedback(String message, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) -
setFailureFeedback
protected void setFailureFeedback(String message, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) -
validateRecaptcha
- Throws:
IOException
-