public interface StaticAssetStorageService
Modifier and Type | Method and Description |
---|---|
StaticAssetStorage |
create()
Deprecated.
Use createStaticAssetStorageFromFile instead.
|
Blob |
createBlob(InputStream uploadedFileInputStream,
long fileSize)
Creates a blob from an input stream with a given filesize.
|
Blob |
createBlob(org.springframework.web.multipart.MultipartFile uploadedFile)
Deprecated.
Use createStaticAssetStorageFromFile instead.
|
void |
createStaticAssetStorage(InputStream fileInputStream,
StaticAsset staticAsset)
Similar to
createStaticAssetStorageFromFile(MultipartFile, StaticAsset) except that this does not depend on
an uploaded file and can support more generic use cases |
void |
createStaticAssetStorageFromFile(org.springframework.web.multipart.MultipartFile file,
StaticAsset staticAsset)
Persists the file to the DB or FileSystem according to the staticAsset's StorageType.
|
void |
delete(StaticAssetStorage assetStorage)
Removes a static asset from the database.
|
StaticAssetStorage |
findStaticAssetStorageById(Long id)
Returns a StaticAssetStorage object.
|
Map<String,String> |
getCacheFileModel(String fullUrl,
Map<String,String> parameterMap) |
StaticAssetStorage |
readStaticAssetStorageByStaticAssetId(Long id)
Returns a StaticAssetStorage object using the id of a related StaticAsset.
|
StaticAssetStorage |
save(StaticAssetStorage assetStorage)
Persists a static asset to the database.
|
void |
validateFileSize(org.springframework.web.multipart.MultipartFile file)
Validates given file with the maximum upload file size value
|
StaticAssetStorage findStaticAssetStorageById(Long id)
id
- @Deprecated StaticAssetStorage create()
StaticAssetStorage readStaticAssetStorageByStaticAssetId(Long id)
id
- StaticAssetStorage save(StaticAssetStorage assetStorage)
assetStorage
- void delete(StaticAssetStorage assetStorage)
assetStorage
- @Deprecated Blob createBlob(org.springframework.web.multipart.MultipartFile uploadedFile) throws IOException
uploadedFile
- IOException
Blob createBlob(InputStream uploadedFileInputStream, long fileSize) throws IOException
uploadedFileInputStream
- fileSize
- IOException
Map<String,String> getCacheFileModel(String fullUrl, Map<String,String> parameterMap) throws Exception
fullUrl
- sandBox
- parameterMap
- Exception
void createStaticAssetStorageFromFile(org.springframework.web.multipart.MultipartFile file, StaticAsset staticAsset) throws IOException
file
- the uploaded file from the Spring controllerstaticAsset
- the StaticAsset
entity to obtain storage information from like file size and the file name,
usually created from StaticAssetService.createStaticAssetFromFile(MultipartFile, Map)
IOException
StaticAssetService#createStaticAssetFromFile(MultipartFile, Map)}
void createStaticAssetStorage(InputStream fileInputStream, StaticAsset staticAsset) throws IOException
createStaticAssetStorageFromFile(MultipartFile, StaticAsset)
except that this does not depend on
an uploaded file and can support more generic use casesfileInputStream
- the input stream of the uploaded filestaticAsset
- the StaticAsset
entity to obtain storage information from like file size and the file name,
usually created from StaticAssetService.createStaticAsset(InputStream, String, long, Map)
IOException
StaticAssetService#createStaticAsset(InputStream, String, long, Map)}
void validateFileSize(org.springframework.web.multipart.MultipartFile file) throws IOException
file
- IOException
Copyright © 2022. All rights reserved.