Class ResourceManagerTemplate

java.lang.Object
com.aquima.interactions.foundation.io.ResourceManagerBase
com.aquima.interactions.foundation.io.CompositeResourceManager
com.aquima.interactions.test.templates.ResourceManagerTemplate
All Implemented Interfaces:
com.aquima.interactions.foundation.io.IResourceManager

public final class ResourceManagerTemplate extends com.aquima.interactions.foundation.io.CompositeResourceManager
Resource manager implementation for test cases.
Since:
6.0
Author:
Jon van Leuven
  • Field Summary

    Fields inherited from class com.aquima.interactions.foundation.io.ResourceManagerBase

    SEPARATOR
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for the resource manager.
  • Method Summary

    Modifier and Type
    Method
    Description
    static byte[]
    getContent(com.aquima.interactions.foundation.io.IResource resource)
    This method returns the content of the specified resource as byte array.
    static byte[]
    This method returns the content of the specified resource as byte array.
    This method returns the content of the specified resource as input stream.
    static com.aquima.interactions.foundation.io.IResource
    This method returns the resource for the specified name.

    Methods inherited from class com.aquima.interactions.foundation.io.CompositeResourceManager

    addResourceManager, getResource, getSupportedTypes, toString

    Methods inherited from class com.aquima.interactions.foundation.io.ResourceManagerBase

    getResourceRef, isSupportedProtocol, isSupportedProtocol

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ResourceManagerTemplate

      public ResourceManagerTemplate()
      Default constructor for the resource manager.
  • Method Details

    • getInputStream

      public static InputStream getInputStream(String name)
      This method returns the content of the specified resource as input stream.
      Parameters:
      name - The name of the resource whose content is requested.
      Returns:
      input stream containing the contents of the specified resource.
    • getTestResource

      public static com.aquima.interactions.foundation.io.IResource getTestResource(String name)
      This method returns the resource for the specified name.
      Parameters:
      name - The name of the requested resource.
      Returns:
      The resource for the specified name.
      Throws:
      com.aquima.interactions.foundation.io.ResourceException - This exception is thrown when the resource could not be located.
    • getContent

      public static byte[] getContent(String name)
      This method returns the content of the specified resource as byte array.
      Parameters:
      name - The name of the resource whose content is requested.
      Returns:
      byte array containing the contents of the specified resource.
      Throws:
      com.aquima.interactions.foundation.io.ResourceException - This exception is thrown when the resource could not be located.
    • getContent

      public static byte[] getContent(com.aquima.interactions.foundation.io.IResource resource)
      This method returns the content of the specified resource as byte array.
      Parameters:
      resource - The resource whose content is requested.
      Returns:
      byte array containing the contents of the specified resource.