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 java.lang.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(java.io.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 java.lang.Exception
- Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
createFile
public FileInfo createFile(java.lang.String path)
throws java.io.IOException
- Specified by:
createFile in interface FileService
- Throws:
java.io.IOException
publish
public boolean publish(FileInfo dest)
throws java.io.IOException
- Specified by:
publish in interface FileService
- Throws:
java.io.IOException
countFiles
public int countFiles()
- Specified by:
countFiles in interface FileService
getFiles
public java.util.List<FileInfo> getFiles(int startFile,
int pageSize)
throws java.io.IOException
- Specified by:
getFiles in interface FileService
- Throws:
java.io.IOException
delete
public int delete(java.lang.String pattern)
throws java.io.IOException
- Specified by:
delete in interface FileService
- Throws:
java.io.IOException
getResource
public org.springframework.core.io.Resource getResource(java.lang.String path)
- Specified by:
getResource in interface FileService
getUploadDirectory
public java.io.File getUploadDirectory()
Copyright © 2011. All Rights Reserved.