public class LocalFileService extends java.lang.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(java.lang.String path) |
int |
delete(java.lang.String pattern) |
java.util.List<FileInfo> |
getFiles(int startFile,
int pageSize) |
org.springframework.core.io.Resource |
getResource(java.lang.String path) |
java.io.File |
getUploadDirectory() |
boolean |
publish(FileInfo dest) |
void |
setFileSender(FileSender fileSender) |
void |
setOutputDir(java.io.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(java.io.File outputDir)
${java.io.tmpdir}/batch/files.outputDir - the output directory to setpublic void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic FileInfo createFile(java.lang.String path) throws java.io.IOException
createFile in interface FileServicejava.io.IOExceptionpublic boolean publish(FileInfo dest) throws java.io.IOException
publish in interface FileServicejava.io.IOExceptionpublic int countFiles()
countFiles in interface FileServicepublic java.util.List<FileInfo> getFiles(int startFile, int pageSize) throws java.io.IOException
getFiles in interface FileServicejava.io.IOExceptionpublic int delete(java.lang.String pattern)
throws java.io.IOException
delete in interface FileServicejava.io.IOExceptionpublic org.springframework.core.io.Resource getResource(java.lang.String path)
getResource in interface FileServicepublic java.io.File getUploadDirectory()
Copyright © 2015. All Rights Reserved.