@Controller
public class FileController
extends java.lang.Object
| Constructor and Description |
|---|
FileController() |
| Modifier and Type | Method and Description |
|---|---|
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) |
@Autowired public void setFileService(FileService fileService)
fileService - the FileService to set@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
java.lang.Exception@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
java.lang.Exception@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
java.lang.Exception@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
java.lang.Exception@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
java.lang.ExceptionCopyright © 2015. All Rights Reserved.