org.springframework.batch.admin.web
Class FileController

java.lang.Object
  extended by org.springframework.batch.admin.web.FileController

@Controller
public class FileController
extends java.lang.Object

Controller for uploading and managing files.

Author:
Dave Syer

Constructor Summary
FileController()
           
 
Method Summary
 java.lang.String delete(org.springframework.ui.ModelMap model, java.lang.String pattern)
           
 java.lang.String get(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.ModelMap model, int startFile, int pageSize, java.util.Date date, org.springframework.validation.Errors errors)
           
 void list(org.springframework.ui.ModelMap model, int startFile, int pageSize)
           
 void setFileService(FileService fileService)
          The service used to manage file lists and uploads.
 java.lang.String upload(java.lang.String path, org.springframework.web.multipart.MultipartFile file, org.springframework.ui.ModelMap model, int startFile, int pageSize, java.util.Date date, org.springframework.validation.Errors errors)
           
 java.lang.String uploadRequest(java.lang.String path, org.springframework.web.multipart.MultipartFile file, org.springframework.ui.ModelMap model, int startFile, int pageSize, java.util.Date date, org.springframework.validation.Errors errors)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileController

public FileController()
Method Detail

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 java.lang.String uploadRequest(@RequestParam
                                                     java.lang.String path,
                                                     @RequestParam
                                                     org.springframework.web.multipart.MultipartFile file,
                                                     org.springframework.ui.ModelMap model,
                                                     @RequestParam(defaultValue="0")
                                                     int startFile,
                                                     @RequestParam(defaultValue="20")
                                                     int pageSize,
                                                     @ModelAttribute(value="date")
                                                     java.util.Date date,
                                                     org.springframework.validation.Errors errors)
                               throws java.lang.Exception
Throws:
java.lang.Exception

upload

@RequestMapping(value="/files/{path}",
                method=POST)
public java.lang.String upload(@PathVariable
                                              java.lang.String path,
                                              @RequestParam
                                              org.springframework.web.multipart.MultipartFile file,
                                              org.springframework.ui.ModelMap model,
                                              @RequestParam(defaultValue="0")
                                              int startFile,
                                              @RequestParam(defaultValue="20")
                                              int pageSize,
                                              @ModelAttribute(value="date")
                                              java.util.Date date,
                                              org.springframework.validation.Errors errors)
                        throws java.lang.Exception
Throws:
java.lang.Exception

list

@RequestMapping(value="/files",
                method=GET)
public void list(org.springframework.ui.ModelMap model,
                                @RequestParam(defaultValue="0")
                                int startFile,
                                @RequestParam(defaultValue="20")
                                int pageSize)
          throws java.lang.Exception
Throws:
java.lang.Exception

get

@RequestMapping(value="/files/**",
                method=GET)
public java.lang.String get(javax.servlet.http.HttpServletRequest request,
                                           javax.servlet.http.HttpServletResponse response,
                                           org.springframework.ui.ModelMap model,
                                           @RequestParam(defaultValue="0")
                                           int startFile,
                                           @RequestParam(defaultValue="20")
                                           int pageSize,
                                           @ModelAttribute(value="date")
                                           java.util.Date date,
                                           org.springframework.validation.Errors errors)
                     throws java.lang.Exception
Throws:
java.lang.Exception

delete

@RequestMapping(value="/files",
                method=DELETE)
public java.lang.String delete(org.springframework.ui.ModelMap model,
                                              @RequestParam(defaultValue="**")
                                              java.lang.String pattern)
                        throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2011. All Rights Reserved.