Package com.vaadin.copilot
Class RouteCreator
java.lang.Object
com.vaadin.copilot.RouteCreator
Handles creation of views for new routes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateFlowView(String route, AccessRequirement accessRequirement, Class<?> layoutClass) Creates a Flow view for the given route using the given access requirement.voidcreateHillaView(String route, AccessRequirement accessRequirement) Creates a Hilla view for the given route using the given access requirement.
-
Constructor Details
-
RouteCreator
-
-
Method Details
-
createFlowView
public void createFlowView(String route, AccessRequirement accessRequirement, Class<?> layoutClass) throws IOException, RouteDuplicatedException Creates a Flow view for the given route using the given access requirement.- Parameters:
route- the path to create a view foraccessRequirement- the access requirement for the viewlayoutClass- the layout class to use, ornullto not use a layout- Throws:
IOException- if the view file could not be createdRouteDuplicatedException
-
createHillaView
public void createHillaView(String route, AccessRequirement accessRequirement) throws IOException, RouteDuplicatedException Creates a Hilla view for the given route using the given access requirement.- Parameters:
route- the path to create a view foraccessRequirement- the access requirement for the view- Throws:
IOExceptionRouteDuplicatedException
-