Package org.eclipse.rap.rwt.service
Interface ResourceManager
public interface ResourceManager
The resource manager is used to register static resources like images, CSS files etc. in order to
 make them available at a URL.
- Since:
- 2.0
- 
Method SummaryModifier and TypeMethodDescriptiongetLocation(String name) Returns the location within the web-applications context where the resource will be available for download.getRegisteredContent(String name) Returns the content of the registered resource with the given name.booleanisRegistered(String name) Determines whether the resource with the given name has been registered.voidregister(String name, InputStream inputStream) Registers a given resource and makes it available for download.booleanunregister(String name) Unregisters the resource with the given name.
- 
Method Details- 
registerRegisters a given resource and makes it available for download. The URL for the registered resource can be obtained fromgetLocation(String).- Parameters:
- name- a name that represents the resource
- inputStream- a stream to read the content from
 
- 
unregisterUnregisters the resource with the given name.- Parameters:
- name- the name that represents the resource. Must not be- null.
- Returns:
- trueif unregistering the resource was successful,- falseotherwise.
 
- 
isRegisteredDetermines whether the resource with the given name has been registered.- Parameters:
- name- filename which identifies the registered resource. The filename must be relative to a classpath root, e.g. a gif 'my.gif' located within the package 'org.eclipse.rap' is identified as 'org/eclipse/rap/my.gif'. Must not be- null.
- Returns:
- if the resource is already registered
 
- 
getLocationReturns the location within the web-applications context where the resource will be available for download.- Parameters:
- name- the name which identifies the registered resource
- Returns:
- the location where the resource will be available for download
 
- 
getRegisteredContentReturns the content of the registered resource with the given name.- Parameters:
- name- the name of the resource, must not be- null
- Returns:
- an input stream to the contents of the resource, or nullif no such resource exists
 
 
-