public class WaarpR66S3Client extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BUCKET_OR_SOURCE_CANNOT_BE_NULL_OR_EMPTY |
static String |
BUCKET_OR_TARGET_CANNOT_BE_NULL_OR_EMPTY |
static String |
S_3_ISSUE |
Constructor and Description |
---|
WaarpR66S3Client(String accessKey,
String secretKey,
URL endPointS3)
Initialize context for S3 Client
|
Modifier and Type | Method and Description |
---|---|
void |
bypassObjectRetention(String bucketName,
String targetName,
ZonedDateTime retentionUntil)
Bypass the governance retention and set a specific validity time in the future
|
String |
createFile(String bucketName,
String targetName,
File file,
Map<String,String> tags)
Create one file into S3 with optional Tags (null if none)
|
void |
deleteFile(String bucketName,
String sourceName)
Delete S3 source
|
Map<String,String> |
getFile(String bucketName,
String sourceName,
File file,
boolean getTags)
Get a File from S3
|
ZonedDateTime |
getObjectRetention(String bucketName,
String sourceName)
Get the ZoneDateTime when this Object will be deleted
|
Map<String,String> |
getTags(String bucketName,
String sourceName)
Get a Tags from S3
|
Iterator<String> |
listObjectsFromBucket(String bucketName,
String optionalNameStartWith,
boolean recursively,
int limit)
Get sourceNames from S3 from the bucketName specified, names optionally starting with a String, recursively or not,
and possibly unlimited (if limit is <= 0)
|
void |
setTags(String bucketName,
String targetName,
Map<String,String> tags)
Set a Tags to S3
|
public static final String BUCKET_OR_TARGET_CANNOT_BE_NULL_OR_EMPTY
public static final String S_3_ISSUE
public static final String BUCKET_OR_SOURCE_CANNOT_BE_NULL_OR_EMPTY
public final String createFile(String bucketName, String targetName, File file, Map<String,String> tags) throws OpenR66ProtocolNetworkException
bucketName
- targetName
- file
- tags
- OpenR66ProtocolNetworkException
public final void setTags(String bucketName, String targetName, Map<String,String> tags) throws OpenR66ProtocolNetworkException
bucketName
- targetName
- tags
- OpenR66ProtocolNetworkException
public final ZonedDateTime getObjectRetention(String bucketName, String sourceName) throws OpenR66ProtocolNetworkException
bucketName
- sourceName
- OpenR66ProtocolNetworkException
public final void bypassObjectRetention(String bucketName, String targetName, ZonedDateTime retentionUntil) throws OpenR66ProtocolNetworkException
bucketName
- targetName
- retentionUntil
- OpenR66ProtocolNetworkException
public final Map<String,String> getFile(String bucketName, String sourceName, File file, boolean getTags) throws OpenR66ProtocolNetworkException
bucketName
- sourceName
- file
- getTags
- if False, will return an empty MapOpenR66ProtocolNetworkException
public final Map<String,String> getTags(String bucketName, String sourceName) throws OpenR66ProtocolNetworkException
bucketName
- sourceName
- OpenR66ProtocolNetworkException
public final void deleteFile(String bucketName, String sourceName) throws OpenR66ProtocolNetworkException
bucketName
- sourceName
- OpenR66ProtocolNetworkException
public final Iterator<String> listObjectsFromBucket(String bucketName, String optionalNameStartWith, boolean recursively, int limit) throws OpenR66ProtocolNetworkException
bucketName
- optionalNameStartWith
- could be null or emptyrecursively
- False only from main directory, True scanning also subdirectorieslimit
- if <= 0, unlimitedOpenR66ProtocolNetworkException
Copyright © 2009–2022 Waarp. All rights reserved.