public interface OsgiVaadinStaticResource
E.g. some static web resource could be inside classpath with path "/META-INF/resources/VAADIN/static/{resourceName}" and if it should be available by URI "/VAADIN/static/{resourceName}" then is the alias for the path.
Another usecase is resources inside the "frontend" folder. You may want to register static web resources available by the URI "/frontend/mycomponent" (this is the alias) which are located inside a bundle by the path "/META-INF/resources/frontend/mycomponent" (this path is a standard path for the web resources in jar but it can be any path you want if it's supposed to be used inside OSGi only).
To publish a resource, an implementation of this interface needs to be
registered as an OSGi service, which makes
VaadinResourceTrackerComponent automatically publish the
resource with the given name.
| Modifier and Type | Method and Description |
|---|---|
static OsgiVaadinStaticResource |
create(String path,
String alias)
Creates a new resource instance.
|
String |
getAlias()
Gets the name in the URI namespace at which the resources are registered.
|
String |
getPath()
Return the path where the resource is located inside the bundle.
|
String getPath()
String getAlias()
static OsgiVaadinStaticResource create(String path, String alias)
path - the resource path inside a bundlealias - the URI aliasCopyright © 2000–2025 Vaadin Ltd. All rights reserved.