| | |
| | | */ |
| | | public interface IOssService { |
| | | |
| | | String getOssType(); |
| | | public String getOssType(); |
| | | |
| | | /** |
| | | * Get temporary credentials. |
| | | * |
| | | * @return |
| | | */ |
| | | CredentialsDTO getCredentials(); |
| | | public CredentialsDTO getCredentials(); |
| | | |
| | | /** |
| | | * Get the address of the object based on the bucket name and the object name. |
| | |
| | | * @param objectKey object name |
| | | * @return download link |
| | | */ |
| | | URL getObjectUrl(String bucket, String objectKey); |
| | | public URL getObjectUrl(String bucket, String objectKey); |
| | | |
| | | /** |
| | | * Deletes the object in the storage bucket. |
| | |
| | | * @param objectKey |
| | | * @return |
| | | */ |
| | | Boolean deleteObject(String bucket, String objectKey); |
| | | public Boolean deleteObject(String bucket, String objectKey); |
| | | |
| | | /** |
| | | * Get the contents of an object. |
| | |
| | | * @param objectKey |
| | | * @return |
| | | */ |
| | | InputStream getObject(String bucket, String objectKey); |
| | | public InputStream getObject(String bucket, String objectKey); |
| | | |
| | | void putObject(String bucket, String objectKey, InputStream input); |
| | | public void putObject(String bucket, String objectKey, InputStream input); |
| | | |
| | | void putObject(String bucket, String objectKey, InputStream input, String contentType); |
| | | public void putObject(String bucket, String objectKey, InputStream input, String contentType); |
| | | |
| | | void createClient(); |
| | | public void createClient(); |
| | | |
| | | } |