Class DefaultResourceProvider
java.lang.Object
ru.cg.webbpm.modules.resources.impl.DefaultResourceProvider
- All Implemented Interfaces:
ResourceProvider
- Author:
- Rinat Suleymanov
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultResourceProvider(org.springframework.core.io.support.ResourcePatternResolver patternResolver) -
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.
-
Constructor Details
-
DefaultResourceProvider
@Autowired public DefaultResourceProvider(org.springframework.core.io.support.ResourcePatternResolver patternResolver)
-
-
Method Details
-
getResourceAsStreamByPath
Description copied from interface:ResourceProviderReturns resource as input stream by full file path. For example, file path: "process_definitions/process1.bpmn2".- Specified by:
getResourceAsStreamByPathin interfaceResourceProvider- Parameters:
path- full file path.- Returns:
- input stream representation of resource.
- See Also:
-
getResourceAsBytesByPath
Description copied from interface:ResourceProviderReturns resource as byte array by full file path. For example, file path: "process_definitions/process1.bpmn2".- Specified by:
getResourceAsBytesByPathin interfaceResourceProvider- Parameters:
path- full file path.- Returns:
- byte array representation of resource.
- See Also:
-
getResourceAsUrlByPath
Description copied from interface:ResourceProviderReturns resource as URL by full file path.- Specified by:
getResourceAsUrlByPathin interfaceResourceProvider- Parameters:
path- full file path.- Returns:
- URL representation of resource.
-
getResourcesAsStreamsByExt
Description copied from interface:ResourceProviderReturns collection of resources by file extension. Resources are in input stream representation. For example, file extension: "bpmn2".- Specified by:
getResourcesAsStreamsByExtin interfaceResourceProvider- Parameters:
extension- file extension.- Returns:
- collection of resources in input stream representation.
-
getResourcesAsBytesByExt
Description copied from interface:ResourceProviderReturns collection of resources by file extension. Resources are in byte array representation. For example, file extension: "bpmn2".- Specified by:
getResourcesAsBytesByExtin interfaceResourceProvider- Parameters:
extension- file extension.- Returns:
- collection of resources in byte array representation.
-
getResourcesAsUrlByExt
Description copied from interface:ResourceProviderReturns collection of resources by file extension. Resources are in URL representation. For example, file extension: "bpmn2".- Specified by:
getResourcesAsUrlByExtin interfaceResourceProvider- Parameters:
extension- file extension.- Returns:
- collection of resources in URL representation.
-
getResourcesAsStreamsByPattern
Description copied from interface:ResourceProviderReturns collection of resources by regex pattern. Resources are in input stream representation. For example, regex pattern: "bpmn2".- Specified by:
getResourcesAsStreamsByPatternin interfaceResourceProvider- Parameters:
pattern- file extension.- Returns:
- collection of resources in input stream representation.
-
getResourcesAsBytesByPattern
Description copied from interface:ResourceProviderReturns collection of resources by regex pattern. Resources are in byte array representation. For example, regex pattern: "bpmn2".- Specified by:
getResourcesAsBytesByPatternin interfaceResourceProvider- Parameters:
pattern- file extension.- Returns:
- collection of resources in byte array representation.
-
getResourcesAsUrlByPattern
Description copied from interface:ResourceProviderReturns collection of resources by regex pattern. Resources are in URL representation. For example, regex pattern: "bpmn2".- Specified by:
getResourcesAsUrlByPatternin interfaceResourceProvider- Parameters:
pattern- file extension.- Returns:
- collection of resources in URL representation.
-
getResourceFilesByPattern
Description copied from interface:ResourceProviderReturns collection of resources by regex pattern. Resources are in ResourceFile representation. For example, regex pattern: "bpmn2".- Specified by:
getResourceFilesByPatternin interfaceResourceProvider- Parameters:
pattern- file extension.- Returns:
- collection of resources in ResourceFile representation.
-