Package com.axelor.file.store.s3
Class S3Store
java.lang.Object
com.axelor.file.store.s3.S3Store
- All Implemented Interfaces:
Store
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFile(InputStream inputStream, String fileName) Adds a file to the store using the provided input stream and file name.Adds a file to the store using the specified file path and file name.voiddeleteFile(String fileName) Deletes a file with the specified name from the store.io.minio.MinioClientRetrieves aPathrepresentation of the specified file in the store.Retrieves the type of store being used.Retrieves an input stream for the specified file.booleanChecks if a file with the specified name exists in the store.voidshutdown()Performs the necessary cleanup or resource release operations to gracefully shut down the storage.
-
Constructor Details
-
S3Store
-
-
Method Details
-
getClient
public io.minio.MinioClient getClient() -
getBucketName
-
hasFile
Description copied from interface:StoreChecks if a file with the specified name exists in the store. -
addFile
Description copied from interface:StoreAdds a file to the store using the provided input stream and file name.- Specified by:
addFilein interfaceStore- Parameters:
inputStream- the input stream containing the file datafileName- the name of the file to be stored- Returns:
- an
UploadedFileobject representing the details of the uploaded file
-
addFile
Description copied from interface:StoreAdds a file to the store using the specified file path and file name.- Specified by:
addFilein interfaceStore- Parameters:
path- thePathof the file to be addedfileName- the name under which the file should be stored- Returns:
- an
UploadedFileobject containing the details of the uploaded file
-
deleteFile
Description copied from interface:StoreDeletes a file with the specified name from the store.- Specified by:
deleteFilein interfaceStore- Parameters:
fileName- the name of the file to be deleted
-
getPath
Description copied from interface:StoreRetrieves aPathrepresentation of the specified file in the store. -
getStream
Description copied from interface:StoreRetrieves an input stream for the specified file.- Specified by:
getStreamin interfaceStore- Parameters:
fileName- the name of the file to retrieve the input stream forcache- whether the file should be retrieved from a cached source- Returns:
- an
InputStreamfor the specified file
-
getStoreType
Description copied from interface:StoreRetrieves the type of store being used.- Specified by:
getStoreTypein interfaceStore- Returns:
- the
StoreTyperepresenting the type of storage
-
shutdown
public void shutdown()Description copied from interface:StorePerforms the necessary cleanup or resource release operations to gracefully shut down the storage.
-