public class S3BucketLoggingStatus
extends java.lang.Object
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 by toXml()
will enable logging for the named bucket when
provided to S3Service.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 by toXml()
will disable logging for the named bucket when
provided to S3Service.setBucketLoggingStatus(String, S3BucketLoggingStatus, boolean)
.
Constructor and Description |
---|
S3BucketLoggingStatus() |
S3BucketLoggingStatus(java.lang.String targetBucketName,
java.lang.String logfilePrefix) |
Modifier and Type | Method and Description |
---|---|
void |
addTargetGrant(GrantAndPermission targetGrant) |
java.lang.String |
getLogfilePrefix() |
java.lang.String |
getTargetBucketName() |
GrantAndPermission[] |
getTargetGrants() |
boolean |
isLoggingEnabled() |
void |
setLogfilePrefix(java.lang.String logfilePrefix) |
void |
setTargetBucketName(java.lang.String targetBucketName) |
void |
setTargetGrants(GrantAndPermission[] targetGrants) |
java.lang.String |
toString() |
java.lang.String |
toXml() |
com.jamesmurty.utils.XMLBuilder |
toXMLBuilder() |
public S3BucketLoggingStatus()
public S3BucketLoggingStatus(java.lang.String targetBucketName, java.lang.String logfilePrefix)
public boolean isLoggingEnabled()
public java.lang.String getLogfilePrefix()
public void setLogfilePrefix(java.lang.String logfilePrefix)
public java.lang.String getTargetBucketName()
public void setTargetBucketName(java.lang.String targetBucketName)
public GrantAndPermission[] getTargetGrants()
public void setTargetGrants(GrantAndPermission[] targetGrants)
public void addTargetGrant(GrantAndPermission targetGrant)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toXml() throws S3ServiceException
S3ServiceException
public com.jamesmurty.utils.XMLBuilder toXMLBuilder() throws javax.xml.parsers.ParserConfigurationException, javax.xml.parsers.FactoryConfigurationError, javax.xml.transform.TransformerException
javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.FactoryConfigurationError
javax.xml.transform.TransformerException