org.springframework.batch.admin.web
Class FileController
java.lang.Object
org.springframework.batch.admin.web.FileController
@Controller
public class FileController
- extends Object
Controller for uploading and managing files.
- Author:
- Dave Syer
|
Method Summary |
String |
delete(ModelMap model,
String pattern)
|
String |
get(HttpServletRequest request,
HttpServletResponse response,
ModelMap model,
int startFile,
int pageSize,
Date date,
Errors errors)
|
void |
list(ModelMap model,
int startFile,
int pageSize)
|
void |
setFileService(FileService fileService)
The service used to manage file lists and uploads. |
String |
upload(String path,
MultipartFile file,
ModelMap model,
int startFile,
int pageSize,
Date date,
Errors errors)
|
String |
uploadRequest(String path,
MultipartFile file,
ModelMap model,
int startFile,
int pageSize,
Date date,
Errors errors)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileController
public FileController()
setFileService
public void setFileService(FileService fileService)
- The service used to manage file lists and uploads.
- Parameters:
fileService - the FileService to set
uploadRequest
@RequestMapping(value="/files",
method=POST)
public String uploadRequest(@RequestParam
String path,
@RequestParam
MultipartFile file,
ModelMap model,
@RequestParam(defaultValue="0")
int startFile,
@RequestParam(defaultValue="20")
int pageSize,
@ModelAttribute(value="date")
Date date,
Errors errors)
throws Exception
- Throws:
Exception
upload
@RequestMapping(value="/files/{path}",
method=POST)
public String upload(@PathVariable
String path,
@RequestParam
MultipartFile file,
ModelMap model,
@RequestParam(defaultValue="0")
int startFile,
@RequestParam(defaultValue="20")
int pageSize,
@ModelAttribute(value="date")
Date date,
Errors errors)
throws Exception
- Throws:
Exception
list
@RequestMapping(value="/files",
method=GET)
public void list(ModelMap model,
@RequestParam(defaultValue="0")
int startFile,
@RequestParam(defaultValue="20")
int pageSize)
throws Exception
- Throws:
Exception
get
@RequestMapping(value="/files/**",
method=GET)
public String get(HttpServletRequest request,
HttpServletResponse response,
ModelMap model,
@RequestParam(defaultValue="0")
int startFile,
@RequestParam(defaultValue="20")
int pageSize,
@ModelAttribute(value="date")
Date date,
Errors errors)
throws Exception
- Throws:
Exception
delete
@RequestMapping(value="/files",
method=DELETE)
public String delete(ModelMap model,
@RequestParam(defaultValue="**")
String pattern)
throws Exception
- Throws:
Exception
Copyright © 2011. All Rights Reserved.