Package com.vaadin.copilot
Class NewRouteTemplateHandler
java.lang.Object
com.vaadin.copilot.NewRouteTemplateHandler
Handles listing, supplying templates of new views that will be created by New
Route Panel.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordContains information to generate new Flow viewstatic final recordContains information to generate new Flow view -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFlowTemplate(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 toEMPTYor null.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 toEMPTYor null.getTemplateNames(String framework) It returns the template list for the given framework.
-
Constructor Details
-
NewRouteTemplateHandler
public NewRouteTemplateHandler()
-
-
Method Details
-
getFlowTemplate
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 toEMPTYor null.- Parameters:
flowTemplateRequest- Required parameters to create flow template- Returns:
- New view file content
-
getHillaTemplate
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 toEMPTYor null.- Parameters:
hillaTemplateRequest- Required parameters to create hilla template- Returns:
- New view file content
-
getTemplateNames
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
-