public interface BroadleafFileService
| Modifier and Type | Method and Description |
|---|---|
void |
addOrUpdateResource(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)
Takes in a temporary work area and copies all of the files to the configured FileProvider's permanent storage.
|
void |
addOrUpdateResources(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 accessedvoid addOrUpdateResource(FileWorkArea workArea, File file, boolean removeFilesFromWorkArea)
workArea - fileName - removeFilesFromWorkArea - void addOrUpdateResources(FileWorkArea workArea, boolean removeFilesFromWorkArea)
workArea - removeFilesFromWorkArea - void addOrUpdateResources(FileWorkArea workArea, List<File> files, boolean removeFilesFromWorkArea)
workArea - fileNames - removeFilesFromWorkArea - Copyright © 2014. All rights reserved.