com.vaadin.copilot.
Class SpringBridge
Acts as a bridge between Copilot and Spring specific API. Can be imported into copilot and must never itself import Spring classes.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?>
getApplicationClass
(VaadinServletContext context) Returns the Spring Boot application class of the given context.
static List<SpringBridge.ServiceMethodInfo>
getEndpoints
(VaadinServletContext context) Gets a list of all endpoints / browser callables in the application.
static List<SpringBridge.ServiceMethodInfo>
getFlowUIServices
(VaadinServletContext context) Gets a list of @Service classes that can potentially be used to get data to a component.
static String
getPropertyValue
(VaadinServletContext context, String property) Returns the value of the given property from the Spring environment of the given context.
static String
getUrlPrefix
(VaadinServletContext context) Gets the prefix used for all route paths in the application
static boolean
Returns whether Spring is available in the classpath.
static boolean
Returns whether Spring Security is enabled in the given context.
-
Constructor Details
-
SpringBridge
public SpringBridge()
-
-
Method Details
-
isSpringAvailable
public static boolean isSpringAvailable()Returns whether Spring is available in the classpath.
Returns:
true if Spring is available, false otherwise
-
getPropertyValue
Returns the value of the given property from the Spring environment of the given context.
Parameters:
context
- the Vaadin servlet contextproperty
- the property nameReturns:
the property value or null if not found
-
getApplicationClass
Returns the Spring Boot application class of the given context.
Parameters:
context
- the Vaadin servlet contextReturns:
the Spring Boot application class or null if not found
-
isViewSecurityEnabled
Returns whether Spring Security is enabled in the given context.
Parameters:
context
- the Vaadin servlet contextReturns:
true if Spring Security is enabled, false otherwise
-
getUrlPrefix
Gets the prefix used for all route paths in the application
Parameters:
context
- the Vaadin servlet contextReturns:
the prefix used for all route paths in the application, never ending in a "/" or an empty string if no prefix is used
-
getEndpoints
Gets a list of all endpoints / browser callables in the application.
Returns:
a list of endpoint info objects
-
getFlowUIServices
Gets a list of @Service classes that can potentially be used to get data to a component.
Returns:
a list service classes
-