Sha256: 4bcfb864843adadadc79d29214af2f5da07001a173cd27c5e0f7694b2327e4f1

Contents?: true

Size: 670 Bytes

Versions: 4

Compression:

Stored size: 670 Bytes

Contents

# frozen_string_literal: true
require 'hyrax/transactions/transaction'

module Hyrax
  module Transactions
    ##
    # Destroys a {Hyrax::PcdmCollection}
    #
    # @since 3.4.0
    class CollectionDestroy < Transaction
      # TODO: Add step that checks if collection is empty for collections of types that require it
      DEFAULT_STEPS = ['collection_resource.delete_acl',
                       'collection_resource.remove_from_membership',
                       'collection_resource.delete'].freeze

      ##
      # @see Hyrax::Transactions::Transaction
      def initialize(container: Container, steps: DEFAULT_STEPS)
        super
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hyrax-5.0.1 lib/hyrax/transactions/collection_destroy.rb
hyrax-5.0.0 lib/hyrax/transactions/collection_destroy.rb
hyrax-5.0.0.rc3 lib/hyrax/transactions/collection_destroy.rb
hyrax-5.0.0.rc2 lib/hyrax/transactions/collection_destroy.rb