public class LocalFileService extends Object implements FileService, InitializingBean, ResourceLoaderAware
FileService that deals with files only in the
local file system. Files and triggers are created in subdirectories of the
Java temporary directory.| Constructor and Description |
|---|
LocalFileService() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
int |
countFiles() |
FileInfo |
createFile(String path) |
int |
delete(String pattern) |
List<FileInfo> |
getFiles(int startFile,
int pageSize) |
Resource |
getResource(String path) |
File |
getUploadDirectory() |
boolean |
publish(FileInfo dest) |
void |
setFileSender(FileSender fileSender) |
void |
setOutputDir(File outputDir)
The output directory to store new files.
|
void |
setResourceLoader(ResourceLoader resourceLoader) |
public void setResourceLoader(ResourceLoader resourceLoader)
setResourceLoader in interface ResourceLoaderAwarepublic void setFileSender(FileSender fileSender)
public void setOutputDir(File outputDir)
${java.io.tmpdir}/batch/files.outputDir - the output directory to setpublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionpublic FileInfo createFile(String path) throws IOException
createFile in interface FileServiceIOExceptionpublic boolean publish(FileInfo dest) throws IOException
publish in interface FileServiceIOExceptionpublic int countFiles()
countFiles in interface FileServicepublic List<FileInfo> getFiles(int startFile, int pageSize) throws IOException
getFiles in interface FileServiceIOExceptionpublic int delete(String pattern) throws IOException
delete in interface FileServiceIOExceptionpublic Resource getResource(String path)
getResource in interface FileServicepublic File getUploadDirectory()
Copyright © 2015. All rights reserved.