Class NewRouteTemplateHandler

java.lang.Object
com.vaadin.copilot.NewRouteTemplateHandler

public class NewRouteTemplateHandler extends Object
Handles listing, supplying templates of new views that will be created by New Route Panel.
  • Constructor Details

    • NewRouteTemplateHandler

      public NewRouteTemplateHandler()
  • Method Details

    • getFlowTemplate

      public String getFlowTemplate(NewRouteTemplateHandler.FlowTemplateRequest flowTemplateRequest)
      It will return the view template string that will have Route annotations, given Class name, access annotations etc...
      It returns the empty template when template name is blank or equals to EMPTY or null.
      Parameters:
      flowTemplateRequest - Required parameters to create flow template
      Returns:
      New view file content
    • getHillaTemplate

      public String getHillaTemplate(NewRouteTemplateHandler.HillaTemplateRequest hillaTemplateRequest)
      It will return the view template string that will have view configuration based on given parameters It returns the empty template when template name is blank or equals to EMPTY or null.
      Parameters:
      hillaTemplateRequest - Required parameters to create hilla template
      Returns:
      New view file content
    • getTemplateNames

      public List<String> getTemplateNames(String framework)
      It returns the template list for the given framework. Label is the base file name, value is the file name.
      Parameters:
      framework - Either "hilla" or "flow"
      Returns:
      list of summary templates, which model has label and value properties