public interface BroadleafFileService
| Modifier and Type | Method and Description | 
|---|---|
| void | addOrUpdateResource(FileWorkArea workArea,
                   File file,
                   boolean removeFilesFromWorkArea)Deprecated. 
 | 
| String | addOrUpdateResourceForPath(FileWorkArea workArea,
                          File file,
                          boolean removeFilesFromWorkArea)
 Takes in a temporary work area and a single File and copies that files to 
 the configured FileProvider's permanent storage. | 
| void | addOrUpdateResources(FileWorkArea workArea,
                    boolean removeFilesFromWorkArea)Deprecated. 
 | 
| void | addOrUpdateResources(FileWorkArea workArea,
                    List<File> files,
                    boolean removeFilesFromWorkArea)Deprecated. 
 | 
| List<String> | addOrUpdateResourcesForPaths(FileWorkArea workArea,
                            boolean removeFilesFromWorkArea)
 Takes in a temporary work area and copies all of the files to the configured FileProvider's permanent storage. | 
| List<String> | addOrUpdateResourcesForPaths(FileWorkArea workArea,
                            List<File> files,
                            boolean removeFilesFromWorkArea)
 Takes in a temporary work area and a list of Files and copies them to 
 the configured FileProvider's permanent storage. | 
| boolean | checkForResourceOnClassPath(String name)Returns true if the resource is available on the classpath. | 
| void | closeWorkArea(FileWorkArea workArea)Closes the passed in work area. | 
| InputStream | getClasspathResource(String name)Allows assets to be included in the Java classpath. | 
| File | getLocalResource(String fullUrl)Checks for a resource in the temporary directory of the file-system. | 
| File | getResource(String name)Returns a File representing the passed in name. | 
| File | getResource(String name,
           Long timeout)Returns a File representing the resource. | 
| File | getSharedLocalResource(String fullUrl)Checks for a resource in the temporary directory of the file-system. | 
| FileWorkArea | initializeWorkArea()Create a file work area that can be used for further operations. | 
| boolean | removeResource(String name)Removes the resource from the configured FileProvider | 
FileWorkArea initializeWorkArea()
void closeWorkArea(FileWorkArea workArea)
Work - AreaFile getResource(String name)
name - - fully qualified path to the resourceFile getResource(String name, Long timeout)
getResource(String).
 
 If the timeout parameter is null then if the resource exists locally, it will be returned.name - - fully qualified path to the resourcetimeout - - timeframe that the temporary file is considered validFile getLocalResource(String fullUrl)
fullUrl - File getSharedLocalResource(String fullUrl)
fullUrl - boolean checkForResourceOnClassPath(String name)
name - InputStream getClasspathResource(String name)
name - - fully qualified path to the resourceboolean removeResource(String name)
name - - fully qualified path to the resourceapplicationType - - The type of file being accessed@Deprecated void addOrUpdateResource(FileWorkArea workArea, File file, boolean removeFilesFromWorkArea)
addOrUpdateResourceForPath(FileWorkArea, File, boolean)Takes in a temporary work area and a single File and copies that files to the configured FileProvider's permanent storage.
Passing in removeFilesFromWorkArea to true allows for more efficient file processing when using a local file system as it performs a move operation instead of a copy.
workArea - fileName - removeFilesFromWorkArea - String addOrUpdateResourceForPath(FileWorkArea workArea, File file, boolean removeFilesFromWorkArea)
Takes in a temporary work area and a single File and copies that files to the configured FileProvider's permanent storage.
Passing in removeFilesFromWorkArea to true allows for more efficient file processing when using a local file system as it performs a move operation instead of a copy.
workArea - the work area from the given filefile - the file to uploadremoveFilesFromWorkArea - whether or not the given file should be removed from workArea when it
 has been copied@Deprecated void addOrUpdateResources(FileWorkArea workArea, boolean removeFilesFromWorkArea)
addOrUpdateResourcesForPaths(FileWorkArea, boolean) insteadTakes in a temporary work area and copies all of the files to the configured FileProvider's permanent storage.
Passing in removeFilesFromWorkArea to true allows for more efficient file processing when using a local file system as it performs a move operation instead of a copy.
workArea - removeFilesFromWorkArea - List<String> addOrUpdateResourcesForPaths(FileWorkArea workArea, boolean removeFilesFromWorkArea)
Takes in a temporary work area and copies all of the files to the configured FileProvider's permanent storage.
Passing in removeFilesFromWorkArea to true allows for more efficient file processing when using a local file system as it performs a move operation instead of a copy.
workArea - removeFilesFromWorkArea - @Deprecated void addOrUpdateResources(FileWorkArea workArea, List<File> files, boolean removeFilesFromWorkArea)
addOrUpdateResourcesForPaths(FileWorkArea, List, boolean) insteadTakes in a temporary work area and a list of Files and copies them to the configured FileProvider's permanent storage.
Passing in removeFilesFromWorkArea to true allows for more efficient file processing when using a local file system as it performs a move operation instead of a copy.
workArea - files - removeFilesFromWorkArea - List<String> addOrUpdateResourcesForPaths(FileWorkArea workArea, List<File> files, boolean removeFilesFromWorkArea)
Takes in a temporary work area and a list of Files and copies them to the configured FileProvider's permanent storage.
Passing in removeFilesFromWorkArea to true allows for more efficient file processing when using a local file system as it performs a move operation instead of a copy.
workArea - the work area for the given filesfiles - the files to copy to the provider's permanent storageremoveFilesFromWorkArea - whether or not the given files hsould be removed from the given workArea
 after they are uploadedCopyright © 2020. All rights reserved.