Class CompositeResourceManager
java.lang.Object
com.aquima.interactions.foundation.io.ResourceManagerBase
com.aquima.interactions.foundation.io.CompositeResourceManager
- All Implemented Interfaces:
IResourceManager
- Direct Known Subclasses:
DefaultResourceManager
Compound resource manager specifying an ordered lookup.
One can add extra managers with prefixes. The managers will be searched in the same order as the managers were added.
- Since:
- 6.0
- Author:
- F. van der Meer
-
Field Summary
Fields inherited from class com.aquima.interactions.foundation.io.ResourceManagerBase
SEPARATOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addResourceManager
(IResourceManager manager) This function is final since it is used from the constructor.getResource
(String name) Locates a resource specified by path.String[]
Returns the supported protocol types.toString()
Methods inherited from class com.aquima.interactions.foundation.io.ResourceManagerBase
getResourceRef, isSupportedProtocol, isSupportedProtocol
-
Constructor Details
-
CompositeResourceManager
public CompositeResourceManager()
-
-
Method Details
-
addResourceManager
This function is final since it is used from the constructor. adding a resource manager to the chain of managers.- Parameters:
manager
- the manager connected to this prefix.- Throws:
IllegalStateException
- when the prefix is already in use.
-
getResource
Description copied from interface:IResourceManager
Locates a resource specified by path. Path may contain a protocol prefix to specify that the resource should be located from a specific resource manager. This method will only return a result when the resource is available. When the resource manager can not locate the requested resource, an UnknownResourceException will be thrown.- Parameters:
name
- the path to the resource.- Returns:
- A resource that will exist, exception otherwise.
- Throws:
ResourceException
- When the resource could not be retrieved from the resource manager.
-
getSupportedTypes
Description copied from interface:IResourceManager
Returns the supported protocol types.- Returns:
- a list of supported types, which should never be null.
-
toString
-