Class RelativeResourceManager

java.lang.Object
com.aquima.interactions.foundation.io.ResourceManagerBase
com.aquima.interactions.foundation.io.RelativeResourceManager
All Implemented Interfaces:
IResourceManager

public class RelativeResourceManager extends ResourceManagerBase
Resource manager that forwards calls to a relative path in the wrapped resource manager.
Since:
6.0
Author:
F. van der Meer, O. Kerpershoek
  • Constructor Details

    • RelativeResourceManager

      public RelativeResourceManager(IResourceManager resourceManager, String relativePath)
      Constructs the resource manager with the required argument.
      Parameters:
      resourceManager - The resource manager that should be wrapped.
      relativePath - The relative path that should be used when looking for resources.
  • Method Details

    • getResource

      public IResource getResource(String typeAndPath)
      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:
      typeAndPath - the path to the resource.
      Returns:
      A resource that will exist, exception otherwise.
    • getSupportedTypes

      public String[] getSupportedTypes()
      Description copied from interface: IResourceManager
      Returns the supported protocol types.
      Returns:
      a list of supported types, which should never be null.
    • toString

      public String toString()
      Overrides:
      toString in class Object