Class S3BucketLoggingStatus
- java.lang.Object
-
- org.jets3t.service.model.S3BucketLoggingStatus
-
public class S3BucketLoggingStatus extends Object
Represents Bucket Logging Status settings used to control bucket-based Server Access Logging in S3.For logging to be enabled for a bucket both the targetBucketName and logfilePrefix must be non-null, and the named bucket must exist. When both variables are non-null, this object represents an enabled logging status (as indicated by
isLoggingEnabled()
) and the XML document generated bytoXml()
will enable logging for the named bucket when provided toS3Service.setBucketLoggingStatus(String, S3BucketLoggingStatus, boolean)
.If either the targetBucketName or logfilePrefix are null, this object will represent a disabled logging status (as indicated by
isLoggingEnabled()
) and the XML document generated bytoXml()
will disable logging for the named bucket when provided toS3Service.setBucketLoggingStatus(String, S3BucketLoggingStatus, boolean)
.- Author:
- James Murty
-
-
Constructor Summary
Constructors Constructor Description S3BucketLoggingStatus()
S3BucketLoggingStatus(String targetBucketName, String logfilePrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTargetGrant(GrantAndPermission targetGrant)
String
getLogfilePrefix()
String
getTargetBucketName()
GrantAndPermission[]
getTargetGrants()
boolean
isLoggingEnabled()
void
setLogfilePrefix(String logfilePrefix)
void
setTargetBucketName(String targetBucketName)
void
setTargetGrants(GrantAndPermission[] targetGrants)
String
toString()
String
toXml()
com.jamesmurty.utils.XMLBuilder
toXMLBuilder()
-
-
-
Method Detail
-
isLoggingEnabled
public boolean isLoggingEnabled()
-
getLogfilePrefix
public String getLogfilePrefix()
-
setLogfilePrefix
public void setLogfilePrefix(String logfilePrefix)
-
getTargetBucketName
public String getTargetBucketName()
-
setTargetBucketName
public void setTargetBucketName(String targetBucketName)
-
getTargetGrants
public GrantAndPermission[] getTargetGrants()
-
setTargetGrants
public void setTargetGrants(GrantAndPermission[] targetGrants)
-
addTargetGrant
public void addTargetGrant(GrantAndPermission targetGrant)
-
toXml
public String toXml() throws S3ServiceException
- Returns:
- An XML representation of the object suitable for use as an input to the REST/HTTP interface.
- Throws:
S3ServiceException
-
toXMLBuilder
public com.jamesmurty.utils.XMLBuilder toXMLBuilder() throws ParserConfigurationException, FactoryConfigurationError, TransformerException
-
-