org.springframework.batch.admin.service
Class LocalFileService
java.lang.Object
org.springframework.batch.admin.service.LocalFileService
- All Implemented Interfaces:
- FileService, org.springframework.beans.factory.InitializingBean, org.springframework.context.ResourceLoaderAware
public class LocalFileService
- extends Object
- implements FileService, org.springframework.beans.factory.InitializingBean, org.springframework.context.ResourceLoaderAware
An implementation of FileService that deals with files only in the
local file system. Files and triggers are created in subdirectories of the
Java temporary directory.
- Author:
- Dave Syer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalFileService
public LocalFileService()
setResourceLoader
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
- Specified by:
setResourceLoader in interface org.springframework.context.ResourceLoaderAware
setFileSender
public void setFileSender(FileSender fileSender)
setOutputDir
public void setOutputDir(File outputDir)
- The output directory to store new files. Defaults to
${java.io.tmpdir}/batch/files.
- Parameters:
outputDir - the output directory to set
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
- Throws:
Exception
createFile
public FileInfo createFile(String path)
throws IOException
- Specified by:
createFile in interface FileService
- Throws:
IOException
publish
public boolean publish(FileInfo dest)
throws IOException
- Specified by:
publish in interface FileService
- Throws:
IOException
countFiles
public int countFiles()
- Specified by:
countFiles in interface FileService
getFiles
public List<FileInfo> getFiles(int startFile,
int pageSize)
throws IOException
- Specified by:
getFiles in interface FileService
- Throws:
IOException
delete
public int delete(String pattern)
throws IOException
- Specified by:
delete in interface FileService
- Throws:
IOException
getResource
public org.springframework.core.io.Resource getResource(String path)
- Specified by:
getResource in interface FileService
getUploadDirectory
public File getUploadDirectory()
Copyright © 2013. All Rights Reserved.