Package org.bonitasoft.web.extension
Interface ResourceProvider
-
- All Known Subinterfaces:
PageResourceProvider
public interface ResourceProviderAccess to the extension resources
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.FilegetResourceAsFile(java.lang.String resourceName)Retrieve a resource as aFilejava.io.InputStreamgetResourceAsStream(java.lang.String resourceName)Retrieve a resource as anInputStreamjava.util.ResourceBundlegetResourceBundle(java.lang.String name, java.util.Locale locale)Retrieve aResourceBundlethat can be used for localization.java.lang.StringgetResourceURL(java.lang.String resourceName)Retrieve a resource URL
-
-
-
Method Detail
-
getResourceAsStream
java.io.InputStream getResourceAsStream(java.lang.String resourceName) throws java.io.FileNotFoundExceptionRetrieve a resource as anInputStream- Parameters:
resourceName- the name of the resource to retrieve. It can be a path.- Returns:
- a
InputStreamfor this resource - Throws:
java.io.FileNotFoundException
-
getResourceAsFile
java.io.File getResourceAsFile(java.lang.String resourceName)
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
java.lang.String getResourceURL(java.lang.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
java.util.ResourceBundle getResourceBundle(java.lang.String name, java.util.Locale locale)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
-
-