Class PackageResourceManager
java.lang.Object
com.aquima.interactions.foundation.io.ResourceManagerBase
com.aquima.interactions.foundation.io.PackageResourceManager
- All Implemented Interfaces:
IResourceManager
This resource manager implementation uses the classpath to locate resources.
- Since:
- 6.0
- Author:
- F. van der Meer, O. Kerpershoek
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
This member denotates the default protocol name of this resource manager.Fields inherited from class com.aquima.interactions.foundation.io.ResourceManagerBase
SEPARATOR
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs the resource manager with the default protocol name.PackageResourceManager
(String protocol) Constructs the resource manager with the specified protocol name. -
Method Summary
Modifier and TypeMethodDescriptiongetResource
(String path) 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
-
Field Details
-
Constructor Details
-
PackageResourceManager
public PackageResourceManager()Constructs the resource manager with the default protocol name. -
PackageResourceManager
Constructs the resource manager with the specified protocol name.- Parameters:
protocol
- The protocol name that should be used to identify resources from this manager.
-
-
Method Details
-
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:
path
- the path to the resource.- Returns:
- A resource that will exist, exception otherwise.
-
getSupportedTypes
Description copied from interface:IResourceManager
Returns the supported protocol types.- Returns:
- a list of supported types, which should never be null.
-
toString
-