Interface ResourceProvider

All Known Implementing Classes:
DefaultResourceProvider, DevModeResourceProvider

public interface ResourceProvider
Author:
Golovlyev
  • Method Details

    • getResourceAsStreamByPath

      InputStream getResourceAsStreamByPath(String path)
      Returns resource as input stream by full file path. For example, file path: "process_definitions/process1.bpmn2".
      Parameters:
      path - full file path.
      Returns:
      input stream representation of resource.
      Throws:
      ResourceException - if resource couldn't be read.
      See Also:
    • getResourceAsBytesByPath

      byte[] getResourceAsBytesByPath(String path)
      Returns resource as byte array by full file path. For example, file path: "process_definitions/process1.bpmn2".
      Parameters:
      path - full file path.
      Returns:
      byte array representation of resource.
      Throws:
      ResourceException - if resource couldn't be read.
      See Also:
    • getResourceAsUrlByPath

      URL getResourceAsUrlByPath(String path)
      Returns resource as URL by full file path.
      Parameters:
      path - full file path.
      Returns:
      URL representation of resource.
      Throws:
      ResourceException - if resource couldn't be read.
    • getResourcesAsStreamsByExt

      Collection<InputStream> getResourcesAsStreamsByExt(String extension)
      Returns collection of resources by file extension. Resources are in input stream representation. For example, file extension: "bpmn2".
      Parameters:
      extension - file extension.
      Returns:
      collection of resources in input stream representation.
      Throws:
      ResourceException - if any resource (with such extension) couldn't be read.
    • getResourcesAsBytesByExt

      Collection<byte[]> getResourcesAsBytesByExt(String extension)
      Returns collection of resources by file extension. Resources are in byte array representation. For example, file extension: "bpmn2".
      Parameters:
      extension - file extension.
      Returns:
      collection of resources in byte array representation.
      Throws:
      ResourceException - if any resource (with such extension) couldn't be read.
    • getResourcesAsUrlByExt

      Collection<URL> getResourcesAsUrlByExt(String extension)
      Returns collection of resources by file extension. Resources are in URL representation. For example, file extension: "bpmn2".
      Parameters:
      extension - file extension.
      Returns:
      collection of resources in URL representation.
      Throws:
      ResourceException - if any resource (with such extension) couldn't be read.
    • getResourcesAsStreamsByPattern

      Collection<InputStream> getResourcesAsStreamsByPattern(String pattern)
      Returns collection of resources by regex pattern. Resources are in input stream representation. For example, regex pattern: "bpmn2".
      Parameters:
      pattern - file extension.
      Returns:
      collection of resources in input stream representation.
      Throws:
      ResourceException - if any resource (satisfying this regex pattern) couldn't be read.
    • getResourcesAsBytesByPattern

      Collection<byte[]> getResourcesAsBytesByPattern(String pattern)
      Returns collection of resources by regex pattern. Resources are in byte array representation. For example, regex pattern: "bpmn2".
      Parameters:
      pattern - file extension.
      Returns:
      collection of resources in byte array representation.
      Throws:
      ResourceException - if any resource (satisfying this regex pattern) couldn't be read.
    • getResourcesAsUrlByPattern

      Collection<URL> getResourcesAsUrlByPattern(String pattern)
      Returns collection of resources by regex pattern. Resources are in URL representation. For example, regex pattern: "bpmn2".
      Parameters:
      pattern - file extension.
      Returns:
      collection of resources in URL representation.
      Throws:
      ResourceException - if any resource (satisfying this regex pattern) couldn't be read.
    • getResourceFilesByPattern

      Collection<ResourceFile> getResourceFilesByPattern(String pattern)
      Returns collection of resources by regex pattern. Resources are in ResourceFile representation. For example, regex pattern: "bpmn2".
      Parameters:
      pattern - file extension.
      Returns:
      collection of resources in ResourceFile representation.
      Throws:
      ResourceException - if any resource (satisfying this regex pattern) couldn't be read.