Class Route

java.lang.Object
com.morpheusdata.web.Route

public class Route extends Object
A Route is a definition of how to handle incoming requests with a plugin controller. url it handles (eg: /foo/bar) method in controller to call for given url (eg index) permissions to be checked
  • Field Details

    • url

      public String url
      the path it handles (eg: /foo/bar)
    • method

      public String method
      method in controller to call for given url (eg index)
    • permissions

      public List<Permission> permissions
      permissions to be checked
  • Constructor Details

  • Method Details

    • build

      public static Route build(String url, String method, List<Permission> permissions)
      Helper to build a Route with a list of permissions to check.
      Parameters:
      url - to handle
      method - in controller to call
      permissions - to be checked
      Returns:
      Route
    • build

      public static Route build(String url, String method, Permission permission)
      Helper to build a Route with just one permission to check.
      Parameters:
      url - to handle
      method - in controller to call
      permission - to be checked
      Returns:
      Route