Interface ResourceProvider

All Known Subinterfaces:
PageResourceProvider

public interface ResourceProvider
Access to the extension resources
  • Method Details

    • getResourceAsStream

      InputStream getResourceAsStream(String resourceName) throws FileNotFoundException
      Retrieve a resource as an InputStream
      Parameters:
      resourceName - the name of the resource to retrieve. It can be a path.
      Returns:
      a InputStream for this resource
      Throws:
      FileNotFoundException
    • getResourceAsFile

      File getResourceAsFile(String resourceName)
      Retrieve a resource as a File
      Parameters:
      resourceName - the name of the resource to retrieve. It can be a path.
      Returns:
      a File for this resource
    • getResourceURL

      String getResourceURL(String resourceName)
      Retrieve a resource URL
      Parameters:
      resourceName - the name of the resource to retrieve. It can be a path.
      Returns:
      the URL of where the resource is available.
    • getResourceBundle

      ResourceBundle getResourceBundle(String name, Locale locale)
      Retrieve a ResourceBundle that can be used for localization.
      Parameters:
      name - the name of the resource to retrieve (e.g. : messages for a resource named messages_fr.properties)
      locale - the Locale of the ResourceBundle to retrieve.(e.g. : Locale.FRENCH for a resource named messages_fr.properties)
      Returns:
      the ResourceBundle for given name and Locale