Class ExpiringBucketLifecycleManager

    • Constructor Detail

      • ExpiringBucketLifecycleManager

        @DataBoundConstructor
        public ExpiringBucketLifecycleManager​(String bucket,
                                              @Nullable
                                              UploadModule module,
                                              Integer ttl,
                                              @Deprecated @Nullable
                                              String bucketNameWithVars,
                                              @Deprecated @Nullable
                                              Integer bucketObjectTTL)
        Construct the simple lifecycle manager from a TLL and the common properties.
        Parameters:
        bucket - GCS Bucket in which to alter the time to live.
        module - Helper class methods to use for execution.
        ttl - The number of days after which to delete data stored in the GCS bucket.
        bucketNameWithVars - Legacy name for bucket. Deprecated.
        bucketObjectTTL - Legacy name for ttl. Deprecated.
    • Method Detail

      • getDetails

        public String getDetails()
        Specified by:
        getDetails in class AbstractUpload
        Returns:
        Provide detail information summarizing this download for the GCS upload report.
      • checkBucket

        protected com.google.api.services.storage.model.Bucket checkBucket​(com.google.api.services.storage.model.Bucket bucket)
                                                                    throws InvalidAnnotationException
        This is intended to be an identity function that throws when the input is not adequately annotated.
        Specified by:
        checkBucket in class AbstractBucketLifecycleManager
        Parameters:
        bucket - the pre-existing bucket whose annotations to validate.
        Returns:
        The bucket that was validated.
        Throws:
        InvalidAnnotationException - if not annotated properly.
      • decorateBucket

        protected com.google.api.services.storage.model.Bucket decorateBucket​(com.google.api.services.storage.model.Bucket bucket)
        A hook by which extensions may annotate a new or existing bucket.
        Specified by:
        decorateBucket in class AbstractBucketLifecycleManager
        Parameters:
        bucket - The bucket to annotate and return.
        Returns:
        The bucket to annotate and return.
      • getTtl

        public int getTtl()
        Returns:
        Surface the TTL for objects contained within the bucket for roundtripping to the jelly UI.