Class QuarkusResourceProvider

java.lang.Object
com.vaadin.quarkus.QuarkusResourceProvider
All Implemented Interfaces:
ResourceProvider

public class QuarkusResourceProvider extends Object implements ResourceProvider
A ResourceProvider implementation that delegates resource loading to current thread context ClassLoader.
  • Constructor Details

    • QuarkusResourceProvider

      public QuarkusResourceProvider()
  • Method Details

    • getApplicationResource

      public URL getApplicationResource(String path)
      Description copied from interface: ResourceProvider
      Gets the resource identified by path located in the application bundle (jar) which may be found using this resource provider instance.

      If the provider doesn't contain any information about application bundle or there is no resource with the given path then this method returns null.

      Specified by:
      getApplicationResource in interface ResourceProvider
      Parameters:
      path - the resource path
      Returns:
      an URL of the resource, may be null
    • getApplicationResources

      public List<URL> getApplicationResources(String path) throws IOException
      Description copied from interface: ResourceProvider
      Gets all the resources identified by path located in in the application bundle (jar) which may be found using this resource provider.

      If the provider doesn't contain any information about application bundle or there is no resource with the given path then this method returns an empty list.

      Specified by:
      getApplicationResources in interface ResourceProvider
      Parameters:
      path - the resource path
      Returns:
      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
    • getClientResource

      public URL getClientResource(String path)
      Description copied from interface: ResourceProvider
      Gets "flow-client" bundle resource identified by the path.
      Specified by:
      getClientResource in interface ResourceProvider
      Parameters:
      path - the resource path
      Returns:
      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 interface ResourceProvider
      Parameters:
      path - the resource path
      Returns:
      an URL of the resource, may be null
      Throws:
      IOException - If there is an I/O error.