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.void
deleteFile
(String fileName) Deletes a file with the specified name from the store.io.minio.MinioClient
Retrieves aPath
representation of the specified file in the store.Retrieves the type of store being used.Retrieves an input stream for the specified file.boolean
Checks if a file with the specified name exists in the store.void
shutdown()
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:Store
Checks if a file with the specified name exists in the store. -
addFile
Description copied from interface:Store
Adds a file to the store using the provided input stream and file name.- Specified by:
addFile
in interfaceStore
- Parameters:
inputStream
- the input stream containing the file datafileName
- the name of the file to be stored- Returns:
- an
UploadedFile
object representing the details of the uploaded file
-
addFile
Description copied from interface:Store
Adds a file to the store using the specified file path and file name.- Specified by:
addFile
in interfaceStore
- Parameters:
path
- thePath
of the file to be addedfileName
- the name under which the file should be stored- Returns:
- an
UploadedFile
object containing the details of the uploaded file
-
deleteFile
Description copied from interface:Store
Deletes a file with the specified name from the store.- Specified by:
deleteFile
in interfaceStore
- Parameters:
fileName
- the name of the file to be deleted
-
getPath
Description copied from interface:Store
Retrieves aPath
representation of the specified file in the store. -
getStream
Description copied from interface:Store
Retrieves an input stream for the specified file.- Specified by:
getStream
in 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
InputStream
for the specified file
-
getStoreType
Description copied from interface:Store
Retrieves the type of store being used.- Specified by:
getStoreType
in interfaceStore
- Returns:
- the
StoreType
representing the type of storage
-
shutdown
public void shutdown()Description copied from interface:Store
Performs the necessary cleanup or resource release operations to gracefully shut down the storage.
-