Interface ResourceProvider
- All Known Implementing Classes:
DefaultResourceProvider
public interface ResourceProvider
Provide system resource access to
ModelMapperSerializer
.- Author:
- Jeff Fischer
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Delete all files in the filesystem at the location described intargetOut(String)
boolean
Whether or not the filesystem contains the file at the destination described intargetOut(String)
String[]
contents()
All cache related artifact paths in the containing pathThe classloader prefix under which all cache resources are locatedboolean
resourceAvailable
(String fileName) Whether or not the classpath contains the resource at the destination described intargetIn(String)
resourcePath
(String fileName) For the filename, provide an InputStream from which to read the file.For the filename, provide a OutputStream to write the file to.
-
Method Details
-
targetOut
For the filename, provide a OutputStream to write the file to. Generally, this is a File in the mavenresources/cache
directory of the current application.- Parameters:
fileName
- The name of the file to write- Returns:
- the OutputStream to write the file to
-
targetIn
For the filename, provide an InputStream from which to read the file. Generally, this is a resource on the classpath of the application inresources/cache
.- Parameters:
fileName
- The name of the resource to fetch- Returns:
- The InputStream from which to read the resource
-
contains
Whether or not the filesystem contains the file at the destination described intargetOut(String)
- Parameters:
fileName
- The name of the file to check- Returns:
- Whether or not the filesystem contains the file
-
contents
String[] contents()All cache related artifact paths in the containing path- Returns:
- All cache related artifact paths in the containing path
-
resourceAvailable
Whether or not the classpath contains the resource at the destination described intargetIn(String)
- Parameters:
fileName
- The name of the resource to check- Returns:
- Whether or not the classpath contains the resource
-
resourcePath
-
clear
void clear()Delete all files in the filesystem at the location described intargetOut(String)
-
getResourcePrefix
String getResourcePrefix()The classloader prefix under which all cache resources are located- Returns:
- The classloader prefix under which all cache resources are located
-