Interface ResourceProvider
- All Known Implementing Classes:
DefaultResourceProvider
,DevModeResourceProvider
public interface ResourceProvider
- Author:
- Golovlyev
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Returns resource as byte array by full file path.Returns resource as input stream by full file path.getResourceAsUrlByPath
(String path) Returns resource as URL by full file path.getResourceFilesByPattern
(String pattern) Returns collection of resources by regex pattern.Collection<byte[]>
getResourcesAsBytesByExt
(String extension) Returns collection of resources by file extension.Collection<byte[]>
getResourcesAsBytesByPattern
(String pattern) Returns collection of resources by regex pattern.getResourcesAsStreamsByExt
(String extension) Returns collection of resources by file extension.getResourcesAsStreamsByPattern
(String pattern) Returns collection of resources by regex pattern.getResourcesAsUrlByExt
(String extension) Returns collection of resources by file extension.getResourcesAsUrlByPattern
(String pattern) Returns collection of resources by regex pattern.
-
Method Details
-
getResourceAsStreamByPath
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
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
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
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
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
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
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
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
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
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.
-