/** * Creates a new bucket versioning configuration object which defaults to * {@link #OFF} status. */ public BucketVersioningConfiguration() { setStatus(OFF); }
/** * Creates a new bucket versioning configuration object with the specified * status. * <p> * Note that once versioning has been enabled for a bucket, its status can * only be {@link #SUSPENDED suspended} and can never be set back to * {@link #OFF off}. * * @param status * The desired bucket versioning status for the new configuration * object. * * @see #ENABLED * @see #SUSPENDED */ public BucketVersioningConfiguration(String status) { setStatus(status); }
/** * Sets the desired status of versioning for this bucket versioning * configuration object, and returns this object so that additional method * calls may be chained together. * <p> * Note that once versioning has been enabled for a bucket, its status can * only be {@link #SUSPENDED suspended} and can never be set back to * {@link #OFF off}. * * @param status * The desired status of versioning for this bucket versioning * configuration. * * @return The updated S3BucketVersioningConfiguration object so that * additional method calls may be chained together. * * @see #ENABLED * @see #SUSPENDED */ public BucketVersioningConfiguration withStatus(String status) { setStatus(status); return this; }
@Override protected void doEndElement(String uri, String name, String qName) { if (in("VersioningConfiguration")) { if (name.equals("Status")) { configuration.setStatus(getText()); } else if (name.equals("MfaDelete")) { String mfaDeleteStatus = getText(); if (mfaDeleteStatus.equals("Disabled")) { configuration.setMfaDeleteEnabled(false); } else if (mfaDeleteStatus.equals("Enabled")) { configuration.setMfaDeleteEnabled(true); } else { configuration.setMfaDeleteEnabled(null); } } } } }
/** * Creates a new bucket versioning configuration object which defaults to * {@link #OFF} status. */ public BucketVersioningConfiguration() { setStatus(OFF); }
/** * Creates a new bucket versioning configuration object with the specified * status. * <p> * Note that once versioning has been enabled for a bucket, its status can * only be {@link #SUSPENDED suspended} and can never be set back to * {@link #OFF off}. * * @param status The desired bucket versioning status for the new * configuration object. * @see #ENABLED * @see #SUSPENDED */ public BucketVersioningConfiguration(String status) { setStatus(status); }
/** * Sets the desired status of versioning for this bucket versioning * configuration object, and returns this object so that additional method * calls may be chained together. * <p> * Note that once versioning has been enabled for a bucket, its status can * only be {@link #SUSPENDED suspended} and can never be set back to * {@link #OFF off}. * * @param status The desired status of versioning for this bucket versioning * configuration. * @return The updated S3BucketVersioningConfiguration object so that * additional method calls may be chained together. * @see #ENABLED * @see #SUSPENDED */ public BucketVersioningConfiguration withStatus(String status) { setStatus(status); return this; }
@Override protected void doEndElement(String uri, String name, String qName) { if (in("VersioningConfiguration")) { if (name.equals("Status")) { configuration.setStatus(getText()); } else if (name.equals("MfaDelete")) { final String mfaDeleteStatus = getText(); if (mfaDeleteStatus.equals("Disabled")) { configuration.setMfaDeleteEnabled(false); } else if (mfaDeleteStatus.equals("Enabled")) { configuration.setMfaDeleteEnabled(true); } else { configuration.setMfaDeleteEnabled(null); } } } } }
/** * Creates a new bucket versioning configuration object which defaults to * {@link #OFF} status. */ public BucketVersioningConfiguration() { setStatus(OFF); }
/** * Creates a new bucket versioning configuration object which defaults to * {@link #OFF} status. */ public BucketVersioningConfiguration() { setStatus(OFF); }
/** * Creates a new bucket versioning configuration object with the specified * status. * <p> * Note that once versioning has been enabled for a bucket, its status can * only be {@link #SUSPENDED suspended} and can never be set back to * {@link #OFF off}. * * @param status The desired bucket versioning status for the new * configuration object. * @see #ENABLED * @see #SUSPENDED */ public BucketVersioningConfiguration(String status) { setStatus(status); }
/** * Sets the desired status of versioning for this bucket versioning * configuration object, and returns this object so that additional method * calls may be chained together. * <p> * Note that once versioning has been enabled for a bucket, its status can * only be {@link #SUSPENDED suspended} and can never be set back to * {@link #OFF off}. * * @param status The desired status of versioning for this bucket versioning * configuration. * @return The updated S3BucketVersioningConfiguration object so that * additional method calls may be chained together. * @see #ENABLED * @see #SUSPENDED */ public BucketVersioningConfiguration withStatus(String status) { setStatus(status); return this; }
/** * Creates a new bucket versioning configuration object with the specified * status. * <p> * Note that once versioning has been enabled for a bucket, its status can * only be {@link #SUSPENDED suspended} and can never be set back to * {@link #OFF off}. * * @param status * The desired bucket versioning status for the new configuration * object. * * @see #ENABLED * @see #SUSPENDED */ public BucketVersioningConfiguration(String status) { setStatus(status); }
/** * Sets the desired status of versioning for this bucket versioning * configuration object, and returns this object so that additional method * calls may be chained together. * <p> * Note that once versioning has been enabled for a bucket, its status can * only be {@link #SUSPENDED suspended} and can never be set back to * {@link #OFF off}. * * @param status * The desired status of versioning for this bucket versioning * configuration. * * @return The updated S3BucketVersioningConfiguration object so that * additional method calls may be chained together. * * @see #ENABLED * @see #SUSPENDED */ public BucketVersioningConfiguration withStatus(String status) { setStatus(status); return this; }
@Override protected void doEndElement(String uri, String name, String qName) { if (in("VersioningConfiguration")) { if (name.equals("Status")) { configuration.setStatus(getText()); } else if (name.equals("MfaDelete")) { final String mfaDeleteStatus = getText(); if (mfaDeleteStatus.equals("Disabled")) { configuration.setMfaDeleteEnabled(false); } else if (mfaDeleteStatus.equals("Enabled")) { configuration.setMfaDeleteEnabled(true); } else { configuration.setMfaDeleteEnabled(null); } } } } }
@Override protected void doEndElement(String uri, String name, String qName) { if (in("VersioningConfiguration")) { if (name.equals("Status")) { configuration.setStatus(getText()); } else if (name.equals("MfaDelete")) { String mfaDeleteStatus = getText(); if (mfaDeleteStatus.equals("Disabled")) { configuration.setMfaDeleteEnabled(false); } else if (mfaDeleteStatus.equals("Enabled")) { configuration.setMfaDeleteEnabled(true); } else { configuration.setMfaDeleteEnabled(null); } } } } }