public class BucketPolicy extends Object
| Constructor and Description |
|---|
BucketPolicy() |
BucketPolicy(String bucketName) |
| Modifier and Type | Method and Description |
|---|---|
String |
getJson()
Generates JSON of this BucketPolicy object.
|
Map<String,PolicyType> |
getPolicies()
Returns policy type of all prefixes.
|
PolicyType |
getPolicy(String prefix)
Returns policy type of this bucket policy.
|
static BucketPolicy |
parseJson(Reader reader,
String bucketName)
Reads JSON from given
Reader and returns new BucketPolicy of given bucket name. |
void |
setPolicy(PolicyType policy,
String prefix)
Sets policy type for given prefix.
|
List<Statement> |
statements() |
public BucketPolicy()
public BucketPolicy(String bucketName)
public static BucketPolicy parseJson(Reader reader, String bucketName) throws IOException
Reader and returns new BucketPolicy of given bucket name.IOExceptionpublic String getJson() throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic PolicyType getPolicy(String prefix)
public Map<String,PolicyType> getPolicies()
public void setPolicy(PolicyType policy, String prefix)