Class RouteCreator

java.lang.Object
com.vaadin.copilot.RouteCreator

public class RouteCreator extends Object
Handles creation of views for new routes.
  • Constructor Details

  • Method Details

    • createFlowView

      public void createFlowView(String route, AccessRequirement accessRequirement, Class<?> layoutClass, String templateFileName) throws IOException, RouteDuplicatedException
      Creates a Flow view for the given route using the given access requirement.
      Parameters:
      route - the path to create a view for
      accessRequirement - the access requirement for the view
      layoutClass - the layout class to use, or null to not use a layout
      templateFileName - the file name to select the template of view
      Throws:
      IOException - if the view file could not be created
      RouteDuplicatedException
    • createHillaView

      public void createHillaView(String route, AccessRequirement accessRequirement, String templateFileName) throws IOException, RouteDuplicatedException
      Creates a Hilla view for the given route using the given access requirement.
      Parameters:
      route - the path to create a view for
      accessRequirement - the access requirement for the view
      templateFileName - the selected template for the view
      Throws:
      IOException
      RouteDuplicatedException