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

public class CompositeResourceManager extends ResourceManagerBase
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
  • Constructor Details

    • CompositeResourceManager

      public CompositeResourceManager()
  • Method Details

    • addResourceManager

      public final void addResourceManager(IResourceManager manager)
      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

      public IResource getResource(String name)
      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.
    • 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