public class FileManagerService extends Object implements org.springframework.beans.factory.InitializingBean
| Constructor and Description |
|---|
FileManagerService() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Class initialization
|
File |
downloadAsZipFile(String[] toFilename,
String[] items)
Download multiple files and zip them
|
File |
downloadFile(String path,
String preview)
Download preview file
|
com.fasterxml.jackson.databind.JsonNode |
error(Exception ex)
Build json error response
|
com.fasterxml.jackson.databind.JsonNode |
fileOperation(com.fasterxml.jackson.databind.node.ObjectNode params)
Manage file manager operation
|
com.fasterxml.jackson.databind.JsonNode |
uploadFile(String destination,
List<org.springframework.web.multipart.MultipartFile> files)
Upload file
|
public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanpublic File downloadFile(String path, String preview)
path - File pathpreview - Previewpublic File downloadAsZipFile(String[] toFilename, String[] items) throws IOException
toFilename - File namesitems - ItemsIOException - Error downloading as zip filepublic com.fasterxml.jackson.databind.JsonNode uploadFile(String destination, List<org.springframework.web.multipart.MultipartFile> files)
destination - Destinationfiles - Filespublic com.fasterxml.jackson.databind.JsonNode fileOperation(com.fasterxml.jackson.databind.node.ObjectNode params)
params - Parameterspublic com.fasterxml.jackson.databind.JsonNode error(Exception ex)
ex - ExceptionCopyright © 2020. All rights reserved.