Class ReturnUrlBean

java.lang.Object
jp.ecuacion.splib.web.bean.ReturnUrlBean

public class ReturnUrlBean extends Object
Returns the URL to redirect / forward pages to use as the return string in @RequestMapping, @GetMapping and @PostMapping methods.
  • Constructor Details

    • ReturnUrlBean

      public ReturnUrlBean(@RequireNonnull SplibGeneralController<?> controller, @RequireNonnull SplibUtil util)
      Constructs a new instance with controller, util.

      Since isNormalEnd == false is used only from ExceptionHandler normally implemented not by app-developers, isNormalEnd is set to true by default.

      Parameters:
      controller - controller
      util - util
    • ReturnUrlBean

      public ReturnUrlBean(@RequireNonnull SplibGeneralController<?> controller, @RequireNonnull SplibUtil util, boolean isNormalEnd)
      Constructs a new instance with controller, util, isNormalEnd.
      Parameters:
      controller - controller
      util - util
      isNormalEnd - when it's true the default subFunction and page on normal end set in the controller is used.
    • ReturnUrlBean

      public ReturnUrlBean(@RequireNonnull SplibGeneralController<?> controller, @RequireNonnull SplibUtil util, @RequireNonnull String page)
      Constructs a new instance with controller, util, page.

      Since isNormalEnd == false is used only from ExceptionHandler normally implemented not by app-developers, isNormalEnd is set to true by default.

      Parameters:
      controller - controller
      util - util
      page - page
    • ReturnUrlBean

      public ReturnUrlBean(@RequireNonnull SplibGeneralController<?> controller, @RequireNonnull SplibUtil util, boolean isNormalEnd, @RequireNonnull String page)
      Constructs a new instance with controller, util, page.
      Parameters:
      controller - controller
      util - util
      isNormalEnd - when it's true the default subFunction on normal end set in the controller is used.
      page - page
    • ReturnUrlBean

      public ReturnUrlBean(@RequireNonnull SplibGeneralController<?> controller, @RequireNonnull SplibUtil util, @RequireNonnull String subFunction, @RequireNonnull String page)
      Constructs a new instance with controller, util, subFunction, page.
      Parameters:
      controller - controller
      util - util
      subFunction - subFunction
      page - page
    • ReturnUrlBean

      public ReturnUrlBean(@RequireNonnull String path)
      Constructs a new instance with explicit path.
      Parameters:
      path - path
  • Method Details

    • getUrl

      public String getUrl()
      Returns the URL.
      Returns:
      URL string
    • isForward

      public boolean isForward()
    • setProtocolForward

      public ReturnUrlBean setProtocolForward()
      Sets isForward.
      Returns:
      ReturnUrlBean (for method chain)
    • putParam

      public ReturnUrlBean putParam(String key, String value)
      Adds the argument parameter to paramMap.
      Parameters:
      key - key
      value - value
      Returns:
      ReturnUrlBean (for method chain)
    • putParam

      public ReturnUrlBean putParam(String key, String[] values)
      Adds the argument parameter to paramMap.
      Parameters:
      key - key
      values - values
      Returns:
      ReturnUrlBean (for method chain)
    • putParamMap

      public ReturnUrlBean putParamMap(Map<String,String[]> paramMap)
      Adds the argument map to paramMap.

      This is used when you want to put request.parameterMap() to the paramMap.

      Parameters:
      paramMap - paramMap
      Returns:
      ReturnUrlBean (for method chain)
    • removeParam

      public ReturnUrlBean removeParam(String key)
      Removes the argument key from paramMap.
      Parameters:
      key - key
      Returns:
      ReturnUrlBean (for method chain)
    • showSuccessMessage

      public ReturnUrlBean showSuccessMessage()
      add parameter to show success message.
      Returns:
      ReturnUrlBean (for method chain)