@Component public class FileManagementService extends Object
| Constructor and Description |
|---|
FileManagementService() |
| Modifier and Type | Method and Description |
|---|---|
String |
calcPredefinedFileName(String contentType,
String fileName)
Returns predefined fileName for contentType or fileName parameter if there is no predefined fileName.
|
String |
calcPredefinedPath(String contentType,
String path)
Returns predefined path for contentType or path parameter if there is no predefined path.
|
void |
delete(FileInfo fileInfo)
Delete file by fileInfo.
|
boolean |
dontUseProjectForCreatingDirectory(String contentType)
Returns true if files of contentType should be in separate project folders.
|
String |
getDirectory(String contentType,
UUID projectUuid,
String filePath)
Get full path to file.
|
Path |
getDirectoryPath(String contentType,
UUID projectUuid,
String filePath)
Get path to file.
|
boolean |
isContentTypeExist(String contentType)
Checks if contentType exists in
EdsContentType. |
void |
save(Collection<FileInfo> filesInfo)
Save files identified by filesInfo collection.
|
File |
save(FileInfo fileInfo)
Save file identified by fileInfo.
|
File |
save(String contentType,
UUID projectUuid,
String filePath,
String fileName,
InputStream inputStream)
Save file identified by separate parameters.
|
public void save(Collection<FileInfo> filesInfo)
public File save(String contentType, UUID projectUuid, String filePath, String fileName, InputStream inputStream)
public void delete(FileInfo fileInfo)
public boolean isContentTypeExist(String contentType)
EdsContentType.public String getDirectory(String contentType, UUID projectUuid, String filePath)
public Path getDirectoryPath(String contentType, UUID projectUuid, String filePath)
public boolean dontUseProjectForCreatingDirectory(String contentType)
public String calcPredefinedPath(String contentType, String path)
Copyright © 2025. All rights reserved.