Sha256: 36e3fd239edc823101f9f57b4856346e208f4bdd166f9f59bbe72166c9724daa

Contents?: true

Size: 708 Bytes

Versions: 54

Compression:

Stored size: 708 Bytes

Contents

module CMIS
  class Policy < Object
    attr_reader :policy_text

    def initialize(raw, repository)
      super
      cmis_properties %w( cmis:policyText )
    end

    def apply_to(object, opts = {})
      server.execute!({ cmisaction: 'applyPolicy',
                        repositoryId: repository_id,
                        policyId: cmis_object_id,
                        objectId: object.cmis_object_id }, opts)
    end

    def remove_from(object, opts = {})
      server.execute!({ cmisaction: 'removePolicy',
                        repositoryId: repository_id,
                        policyId: cmis_object_id,
                        objectId: object.cmis_object_id }, opts)
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
cmis-ruby-0.5.38 lib/cmis/policy.rb
cmis-ruby-0.5.37 lib/cmis/policy.rb
cmis-ruby-0.5.36 lib/cmis/policy.rb
cmis-ruby-0.5.35 lib/cmis/policy.rb
cmis-ruby-0.5.34 lib/cmis/policy.rb
cmis-ruby-0.5.33 lib/cmis/policy.rb
cmis-ruby-0.5.32 lib/cmis/policy.rb
cmis-ruby-0.5.31 lib/cmis/policy.rb
cmis-ruby-0.5.30 lib/cmis/policy.rb
cmis-ruby-0.5.29 lib/cmis/policy.rb
cmis-ruby-0.5.28 lib/cmis/policy.rb
cmis-ruby-0.5.27 lib/cmis/policy.rb
cmis-ruby-0.5.26 lib/cmis/policy.rb
cmis-ruby-0.5.25 lib/cmis/policy.rb
cmis-ruby-0.5.24 lib/cmis/policy.rb
cmis-ruby-0.5.23 lib/cmis/policy.rb
cmis-ruby-0.5.22 lib/cmis/policy.rb
cmis-ruby-0.5.21 lib/cmis/policy.rb
cmis-ruby-0.5.20 lib/cmis/policy.rb
cmis-ruby-0.5.19 lib/cmis/policy.rb