|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BroadleafFileService
Many components in the Broadleaf Framework can benefit from creating and manipulating temporary files as well as storing and accessing files in a remote repository (such as AmazonS3). This service provides a pluggable way to provide those services.
| Method Summary | |
|---|---|
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,
FileApplicationType applicationType)
Returns a File representing the passed in name and application type. |
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 |
| Method Detail |
|---|
FileWorkArea initializeWorkArea()
void closeWorkArea(FileWorkArea workArea)
Work - AreaFile getResource(String name)
getResource(String, FileApplicationType) method
which may access a copy of the file that is stored locally.
name - - fully qualified path to the resourceapplicationType - - The type of file being accessed
File getLocalResource(String fullUrl)
fullUrl -
File getSharedLocalResource(String fullUrl)
fullUrl -
File getResource(String name,
FileApplicationType applicationType)
name - - fully qualified path to the resourceapplicationType - - The type of file being accessed
boolean checkForResourceOnClassPath(String name)
name -
InputStream getClasspathResource(String name)
name - - fully qualified path to the resource
boolean removeResource(String name)
name - - fully qualified path to the resourceapplicationType - - The type of file being accessed
void 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 -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||