Class: CMIS::Server

Inherits:
Connection show all
Defined in:
lib/cmis/server.rb

Instance Method Summary collapse

Methods inherited from Connection

#execute!

Constructor Details

#initialize(options = {}) ⇒ Server



3
4
5
# File 'lib/cmis/server.rb', line 3

def initialize(options = {})
  super
end

Instance Method Details

#repositories(opts = {}) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/cmis/server.rb', line 7

def repositories(opts = {})
  result = execute!({}, opts)

  result.values.map do |r|
    Repository.new(r, self)
  end
end

#repository(repository_id, opts = {}) ⇒ Object



15
16
17
18
19
20
# File 'lib/cmis/server.rb', line 15

def repository(repository_id, opts = {})
  result = execute!({ cmisselector: 'repositoryInfo',
                      repositoryId: repository_id }, opts)

  Repository.new(result[repository_id], self)
end

#repository?(repository_id) ⇒ Boolean



22
23
24
25
26
27
# File 'lib/cmis/server.rb', line 22

def repository?(repository_id)
  repository(repository_id)
  true
rescue Exceptions::ObjectNotFound
  false
end