Package org.bonitasoft.web.extension
Interface ResourceProvider
- All Known Subinterfaces:
PageResourceProvider
public interface ResourceProvider
Access to the extension resources
-
Method Summary
Modifier and TypeMethodDescriptiongetResourceAsFile(String resourceName) Retrieve a resource as aFilegetResourceAsStream(String resourceName) Retrieve a resource as anInputStreamgetResourceBundle(String name, Locale locale) Retrieve aResourceBundlethat can be used for localization.getResourceURL(String resourceName) Retrieve a resource URL
-
Method Details
-
getResourceAsStream
Retrieve a resource as anInputStream- Parameters:
resourceName- the name of the resource to retrieve. It can be a path.- Returns:
- a
InputStreamfor this resource - Throws:
FileNotFoundException
-
getResourceAsFile
Retrieve a resource as aFile- Parameters:
resourceName- the name of the resource to retrieve. It can be a path.- Returns:
- a
Filefor this resource
-
getResourceURL
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
Retrieve aResourceBundlethat 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- theLocaleof theResourceBundleto retrieve.(e.g. : Locale.FRENCH for a resource named messages_fr.properties)- Returns:
- the
ResourceBundlefor given name andLocale
-