Class AbstractController

java.lang.Object
org.duracloud.account.app.controller.AbstractController
Direct Known Subclasses:
AbstractAccountController, AbstractCrudController, AbstractRootController, HomeController, UserController

public abstract class AbstractController extends Object
Base class for all controllers.
  • Field Details

  • 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

      @ModelAttribute("recaptchaSiteKey") public String getRecaptchaSiteKey()
    • isRecaptchaEnabled

      @ModelAttribute("recaptchaEnabled") protected boolean isRecaptchaEnabled()
    • getRecaptchaSecret

      public String 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

      protected static String formatUserUrl(String username)
    • setError

      protected void setError(Exception e)
    • setError

      protected void setError(Exception e, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
    • createRedirectMav

      protected org.springframework.web.servlet.ModelAndView createRedirectMav(String url)
    • 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

      protected boolean validateRecaptcha(String recaptchaResponse) throws IOException
      Throws:
      IOException