com.vaadin.flow.di.
Class LookupInitializer.ResourceProviderImpl
- java.lang.Object
-
- com.vaadin.flow.di.LookupInitializer.ResourceProviderImpl
-
All Implemented Interfaces:
Enclosing class:
protected static class LookupInitializer.ResourceProviderImpl extends Object implements ResourceProvider
Default implementation of
ResourceProvider
.Since:
Author:
Vaadin Ltd
-
-
Constructor Summary
Constructors Constructor and Description ResourceProviderImpl()
Creates a new instance.
-
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
public List<URL> getApplicationResources(VaadinContext context, String path) throws IOException
Description copied from interface:
ResourceProvider
Gets all the web application resources identified by the
path
using the providedcontext
.Specified by:
getApplicationResources
in interfaceResourceProvider
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
public URL getApplicationResource(VaadinContext context, String path)
Description copied from interface:
ResourceProvider
Gets the web application resource identified by the
path
using the providedcontext
.Specified by:
getApplicationResource
in interfaceResourceProvider
Parameters:
context
- a context objectpath
- the resource pathReturns:
an URL of the resource, may be
null
-
getClientResource
public URL getClientResource(String path)
Description copied from interface:
ResourceProvider
Gets "flow-client" bundle resource identified by the
path
.Specified by:
getClientResource
in interfaceResourceProvider
Parameters:
path
- the resource pathReturns:
an URL of the resource, may be
null
-
getClientResourceAsStream
public InputStream getClientResourceAsStream(String path) throws IOException
Description copied from interface:
ResourceProvider
Gets "flow-client" bundle resource content identified by the
path
.Specified by:
getClientResourceAsStream
in interfaceResourceProvider
Parameters:
path
- the resource pathReturns:
an URL of the resource, may be
null
Throws:
IOException
- If there is an I/O error.
-
-