com.vaadin.flow.di.
Interface ResourceProvider
-
All Known Implementing Classes:
public interface ResourceProvider
Static "classpath" resources provider.
This is SPI to access resources available at runtime. Depending on the web container this can be an application classpath only or bundles which are identified by the provided context.
Since:
Author:
Vaadin Ltd
-
-
Method Summary
All Methods Modifier and Type Method and Description URL
getApplicationResource(VaadinContext context, String path)
Gets the web application resource identified by the
path
using the providedcontext
.List<URL>
getApplicationResources(VaadinContext context, String path)
Gets all the web application resources identified by the
path
using the providedcontext
.URL
getClientResource(String path)
Gets "flow-client" bundle resource identified by the
path
.InputStream
getClientResourceAsStream(String path)
Gets "flow-client" bundle resource content identified by the
path
.
-
-
-
Method Detail
-
getApplicationResources
List<URL> getApplicationResources(VaadinContext context, String path) throws IOException
Gets all the web application resources identified by the
path
using the providedcontext
.Parameters:
context
- a context objectpath
- the resource pathReturns:
a list of URLs of the resources or an empty list if resources are not found
Throws:
IOException
- if there is an I/O error
-
getApplicationResource
URL getApplicationResource(VaadinContext context, String path)
Gets the web application resource identified by the
path
using the providedcontext
.Parameters:
context
- a context objectpath
- the resource pathReturns:
an URL of the resource, may be
null
-
getClientResource
URL getClientResource(String path)
Gets "flow-client" bundle resource identified by the
path
.Parameters:
path
- the resource pathReturns:
an URL of the resource, may be
null
-
getClientResourceAsStream
InputStream getClientResourceAsStream(String path) throws IOException
Gets "flow-client" bundle resource content identified by the
path
.Parameters:
path
- the resource pathReturns:
an URL of the resource, may be
null
Throws:
IOException
- If there is an I/O error.
-
-