public class LocalFileService extends Object implements FileService, org.springframework.beans.factory.InitializingBean, org.springframework.context.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) |
org.springframework.core.io.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(org.springframework.core.io.ResourceLoader resourceLoader) |
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
setResourceLoader in interface org.springframework.context.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 org.springframework.beans.factory.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 org.springframework.core.io.Resource getResource(String path)
getResource in interface FileServicepublic File getUploadDirectory()
Copyright © 2015. All rights reserved.