public interface FileService
| Modifier and Type | Method and Description |
|---|---|
File |
compressToZipFile(List<File> documents,
boolean removeCompressed)
Compress documents to newly created zip file.
|
File |
createExportFile(String filename)
Create empty export file with given name.
|
File |
createReportFile(String filename)
Create empty report file with given name.
|
String |
getContentType(String path)
Returns content type of the file from given path.
|
File |
getFileFromFilenameWithRandomDirectory(String filename) |
File |
getFileFromFilenameWithRandomDirectory(String filename,
boolean withDate) |
InputStream |
getInputStream(String path)
Returns stream of the file from given path.
|
String |
getLastModificationDate(String path)
Returns last modification date of the file from given path.
|
String |
getName(String path)
Returns name of the file from given path.
|
String |
getPathFromUrl(String url)
Returns path for the file from given URL.
|
String |
getUrl(String path)
Returns URL for the file from given path.
|
void |
remove(String path)
Remove the file from given path.
|
Entity |
updateReportFileName(Entity entity,
String dateFieldName,
String name)
Update report file name for given report entity
|
Entity |
updateReportFileName(Entity entity,
String dateFieldName,
String name,
String... args)
Update report file name for given report entity
|
String |
upload(org.springframework.web.multipart.MultipartFile multipartFile)
Create file from given uploaded file.
|
File compressToZipFile(List<File> documents, boolean removeCompressed) throws IOException
documents - documents to be compressremoveCompressed - if true removes documents after compressionIOExceptionFile createExportFile(String filename)
filename - filenameFile createReportFile(String filename) throws IOException
filename - filenameIOExceptionString getContentType(String path)
path - pathFile getFileFromFilenameWithRandomDirectory(String filename, boolean withDate)
InputStream getInputStream(String path)
path - pathString getLastModificationDate(String path)
path - pathString getName(String path)
path - pathString getPathFromUrl(String url)
url - String getUrl(String path)
path - pathvoid remove(String path)
path - pathEntity updateReportFileName(Entity entity, String dateFieldName, String name)
entity - dateFieldName - report date field namename - translation code for language specific file nameEntity updateReportFileName(Entity entity, String dateFieldName, String name, String... args)
entity - dateFieldName - report date field namename - translation code for language specific file nameargs - translation argsString upload(org.springframework.web.multipart.MultipartFile multipartFile) throws IOException
multipartFile - uploaded fileIOExceptionCopyright © 2010-2025 Qcadoo Limited