yaccl 0.0.37 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0aa01f464edab2e0c416e992269500e4c2a5c344
4
- data.tar.gz: f757044fb27cd9d71fb4772d320aafb29854f956
3
+ metadata.gz: b84663b4ef3de5c21d665ed484b90813f31136c5
4
+ data.tar.gz: 13b0d7a833d8f22aa08493b9d16c2cc71275d95b
5
5
  SHA512:
6
- metadata.gz: 16136c9987d4691a7b9ec925a27f971aff67c7f3f5cbcc497a61ff5ecb68a0ec856575bad11b7683ca3eef84fe8d4e96138032db199deef2dd6bd8a5c3eebf1b
7
- data.tar.gz: 67069bdd18178efd13198947470a6fd6ba3421dcea3a464aabcc008125d071f56c0b237fafa9b0d5cd7e0e7bd24654edf70a2f9b7e6baa4c3a0e97150f3e5b3c
6
+ metadata.gz: c40575eefa58eb2918191c576000c74537e3ca258965c6c7b03daedf9e06ab5c514c4d54260318c808c055080d2856877cf74980c77c0016a279bf4591c66f8d
7
+ data.tar.gz: ae679d70f95f5bc62e3408b1bcd0b8f6ab4709328752fa9e78f959332acfbdff1a13d0a3349616617b6696ddabeff4c98d4af91da4c2586bb1e4cb5f98afaa75
@@ -37,13 +37,13 @@ module YACCL
37
37
  end
38
38
 
39
39
  def copy_in_folder(folder)
40
- new_object_id = Services.create_document_from_source(repository_id, object_id, nil, folder.object_id, nil, nil, nil, nil)
41
- repository.object(new_object_id)
40
+ new_cmis_object_id = Services.create_document_from_source(repository_id, cmis_object_id, nil, folder.cmis_object_id, nil, nil, nil, nil)
41
+ repository.object(new_cmis_object_id)
42
42
  end
43
43
 
44
44
  def content
45
45
  begin
46
- Services.get_content_stream(repository_id, object_id, nil, nil, nil)
46
+ Services.get_content_stream(repository_id, cmis_object_id, nil, nil, nil)
47
47
  rescue Services::CMISRequestError
48
48
  nil
49
49
  end
@@ -54,7 +54,7 @@ module YACCL
54
54
  if detached?
55
55
  @local_content = content
56
56
  else
57
- r = Services.set_content_stream(repository_id, object_id, nil, change_token, content)
57
+ r = Services.set_content_stream(repository_id, cmis_object_id, nil, change_token, content)
58
58
  update_change_token(r)
59
59
  end
60
60
  end
@@ -24,7 +24,7 @@ module YACCL
24
24
  end
25
25
 
26
26
  def children(options={})
27
- children = Services.get_children(repository_id, object_id, options[:filter], options[:order_by], options[:include_allowable_actions], options[:include_relations], options[:rendition_filter], options[:include_path_segment], options[:max_items], options[:skip_count])
27
+ children = Services.get_children(repository_id, cmis_object_id, options[:filter], options[:order_by], options[:include_allowable_actions], options[:include_relations], options[:rendition_filter], options[:include_path_segment], options[:max_items], options[:skip_count])
28
28
  if children[:objects]
29
29
  children[:objects].map! { |o| ObjectFactory.create(repository_id, o[:object]) }
30
30
  else
@@ -43,15 +43,15 @@ module YACCL
43
43
  def create(object)
44
44
  properties = object.create_properties
45
45
  if object.is_a? Folder
46
- o = Services.create_folder(repository_id, properties, object_id, nil, nil, nil)
46
+ o = Services.create_folder(repository_id, properties, cmis_object_id, nil, nil, nil)
47
47
  elsif object.is_a? Document
48
- return object.create_in_folder(object_id)
48
+ return object.create_in_folder(cmis_object_id)
49
49
  elsif object.is_a? Relationship
50
50
  raise 'relationship is not fileable'
51
51
  elsif object.is_a? Policy
52
- o = Services.create_policy(repository_id, properties, object_id, nil, nil, nil)
52
+ o = Services.create_policy(repository_id, properties, cmis_object_id, nil, nil, nil)
53
53
  elsif object.is_a? Item
54
- o = Services.create_item(repository_id, properties, object_id, nil, nil, nil)
54
+ o = Services.create_item(repository_id, properties, cmis_object_id, nil, nil, nil)
55
55
  else
56
56
  raise "Unexpected base_type_id: #{object.base_type_id}"
57
57
  end
@@ -59,15 +59,15 @@ module YACCL
59
59
  end
60
60
 
61
61
  def delete_tree
62
- Services.delete_tree(repository_id, object_id, nil, nil, nil)
62
+ Services.delete_tree(repository_id, cmis_object_id, nil, nil, nil)
63
63
  end
64
64
 
65
65
  def add(object)
66
- Services.add_object_to_folder(repository_id, object.object_id, object_id, nil)
66
+ Services.add_object_to_folder(repository_id, object.cmis_object_id, cmis_object_id, nil)
67
67
  end
68
68
 
69
69
  def remove(object)
70
- Services.remove_object_from_folder(repository_id, object.object_id, object_id)
70
+ Services.remove_object_from_folder(repository_id, object.cmis_object_id, cmis_object_id)
71
71
  end
72
72
  end
73
73
  end
@@ -2,7 +2,7 @@ module YACCL
2
2
  module Model
3
3
  class Object
4
4
  attr_reader :repository_id
5
- attr_reader :object_id
5
+ attr_reader :cmis_object_id
6
6
  attr_reader :base_type_id
7
7
  attr_accessor :object_type_id
8
8
  attr_reader :secondary_object_type_ids
@@ -15,11 +15,16 @@ module YACCL
15
15
  attr_accessor :change_token
16
16
  attr_accessor :properties
17
17
 
18
+ def object_id
19
+ warn "[DEPRECATION] using `object_id` for CMIS objects is deprecated. Please use `cmis_object_id` instead."
20
+ cmis_object_id
21
+ end
22
+
18
23
  def initialize(repository_id, raw={})
19
24
  @repository_id = repository_id
20
25
  @properties = get_properties_map(raw)
21
26
 
22
- @object_id = @properties[:'cmis:objectId']
27
+ @cmis_object_id = @properties[:'cmis:objectId']
23
28
  @base_type_id = @properties[:'cmis:baseTypeId']
24
29
  @object_type_id = @properties[:'cmis:objectTypeId']
25
30
  @secondary_object_type_ids = @properties[:'cmis:secondaryObjectTypeIds']
@@ -41,59 +46,59 @@ module YACCL
41
46
  end
42
47
 
43
48
  def delete
44
- Services.delete_object(repository_id, object_id, true)
49
+ Services.delete_object(repository_id, cmis_object_id, true)
45
50
  end
46
51
 
47
52
  def update_properties(properties)
48
- r = Services.update_properties(repository_id, object_id, change_token, properties)
53
+ r = Services.update_properties(repository_id, cmis_object_id, change_token, properties)
49
54
  update_change_token(r)
50
55
  end
51
56
 
52
57
  def parents
53
- Services.get_object_parents(repository_id, object_id, nil, nil, nil, nil, nil).map do |o|
58
+ Services.get_object_parents(repository_id, cmis_object_id, nil, nil, nil, nil, nil).map do |o|
54
59
  ObjectFactory.create(repository_id, o[:object])
55
60
  end
56
61
  end
57
62
 
58
63
  def allowable_actions
59
- Services.get_allowable_actions(repository_id, object_id)
64
+ Services.get_allowable_actions(repository_id, cmis_object_id)
60
65
  end
61
66
 
62
67
  def relationships(direction=:either)
63
- result = Services.get_object_relationships(repository_id, object_id, nil, direction, nil, nil, false, nil, nil)
68
+ result = Services.get_object_relationships(repository_id, cmis_object_id, nil, direction, nil, nil, false, nil, nil)
64
69
  result[:objects].map { |r| Relationship.new(repository_id, r) }
65
70
  end
66
71
 
67
72
  def policies
68
- Services.get_applied_policies(repository_id, object_id, nil).map do |policy|
73
+ Services.get_applied_policies(repository_id, cmis_object_id, nil).map do |policy|
69
74
  Policy.new(repository_id, policy)
70
75
  end
71
76
  end
72
77
 
73
78
  # remove from all folders
74
79
  def unfile
75
- Services.remove_object_from_folder(repository_id, object_id, nil)
80
+ Services.remove_object_from_folder(repository_id, cmis_object_id, nil)
76
81
  end
77
82
 
78
83
  def move(target_folder)
79
84
  object_parents = parents
80
85
  if object_parents.size == 1
81
- Services.move_object(repository_id, object_id, target_folder.object_id, object_parents.first.object_id)
86
+ Services.move_object(repository_id, cmis_object_id, target_folder.cmis_object_id, object_parents.first.cmis_object_id)
82
87
  else
83
88
  # raise?
84
89
  end
85
90
  end
86
91
 
87
92
  def acls
88
- Services.get_acl(repository_id, object_id, nil)
93
+ Services.get_acl(repository_id, cmis_object_id, nil)
89
94
  end
90
95
 
91
96
  def add_aces(aces)
92
- Services.apply_acl(repository_id, object_id, aces, nil, nil)
97
+ Services.apply_acl(repository_id, cmis_object_id, aces, nil, nil)
93
98
  end
94
99
 
95
100
  def remove_aces(aces)
96
- Services.apply_acl(repository_id, object_id, nil, aces, nil)
101
+ Services.apply_acl(repository_id, cmis_object_id, nil, aces, nil)
97
102
  end
98
103
 
99
104
  def create_properties
@@ -101,7 +106,7 @@ module YACCL
101
106
  end
102
107
 
103
108
  def detached?
104
- object_id.nil?
109
+ cmis_object_id.nil?
105
110
  end
106
111
 
107
112
  # utility
@@ -9,11 +9,11 @@ module YACCL
9
9
  end
10
10
 
11
11
  def apply_to(object)
12
- Services.apply_policy(repository_id, object_id, object.object_id)
12
+ Services.apply_policy(repository_id, cmis_object_id, object.cmis_object_id)
13
13
  end
14
14
 
15
15
  def remove_from(object)
16
- Services.remove_policy(repository_id, object_id, object.object_id)
16
+ Services.remove_policy(repository_id, cmis_object_id, object.cmis_object_id)
17
17
  end
18
18
  end
19
19
  end
@@ -75,8 +75,8 @@ module YACCL
75
75
  ObjectFactory.create(id, Services.get_object(id, root_folder_id, nil, false, nil, nil, false, false))
76
76
  end
77
77
 
78
- def object(object_id)
79
- ObjectFactory.create(id, Services.get_object(id, object_id, nil, false, nil, nil, false, false))
78
+ def object(cmis_object_id)
79
+ ObjectFactory.create(id, Services.get_object(id, cmis_object_id, nil, false, nil, nil, false, false))
80
80
  end
81
81
 
82
82
  # type
@@ -1,19 +1,19 @@
1
1
  module YACCL
2
2
  module ACLServices
3
- def get_acl(repository_id, object_id, only_basic_permissions, succinct=false)
3
+ def get_acl(repository_id, cmis_object_id, only_basic_permissions, succinct=false)
4
4
  required = {succinct: succinct,
5
5
  cmisselector: 'acl',
6
6
  repositoryId: repository_id,
7
- objectId: object_id}
7
+ objectId: cmis_object_id}
8
8
  optional = {onlyBasicPermissions: only_basic_permissions}
9
9
  perform_request(required, optional)
10
10
  end
11
11
 
12
- def apply_acl(repository_id, object_id, add_aces, remove_aces, acl_propagation, succinct=false)
12
+ def apply_acl(repository_id, cmis_object_id, add_aces, remove_aces, acl_propagation, succinct=false)
13
13
  required = {succinct: succinct,
14
14
  cmisaction: 'applyACL',
15
15
  repositoryId: repository_id,
16
- objectId: object_id}
16
+ objectId: cmis_object_id}
17
17
  optional = {addACEs: add_aces,
18
18
  removeACEs: remove_aces,
19
19
  ACLPropagation: acl_propagation}
@@ -58,11 +58,11 @@ module YACCL
58
58
 
59
59
  private
60
60
 
61
- def get_url(repository_id, object_id)
61
+ def get_url(repository_id, cmis_object_id)
62
62
  if repository_id.nil?
63
63
  @service_url
64
64
  else
65
- repository_urls(repository_id)[object_id ? :root_folder_url : :repository_url]
65
+ repository_urls(repository_id)[cmis_object_id ? :root_folder_url : :repository_url]
66
66
  end
67
67
  end
68
68
 
@@ -1,20 +1,20 @@
1
1
  module YACCL
2
2
  module MultiFilingServices
3
- def add_object_to_folder(repository_id, object_id, folder_id, all_versions, succinct=false)
3
+ def add_object_to_folder(repository_id, cmis_object_id, folder_id, all_versions, succinct=false)
4
4
  required = {succinct: succinct,
5
5
  cmisaction: 'addObjectToFolder',
6
6
  repositoryId: repository_id,
7
- objectId: object_id,
7
+ objectId: cmis_object_id,
8
8
  folderId: folder_id}
9
9
  optional = {allVersions: all_versions}
10
10
  perform_request(required, optional)
11
11
  end
12
12
 
13
- def remove_object_from_folder(repository_id, object_id, folder_id, succinct=false)
13
+ def remove_object_from_folder(repository_id, cmis_object_id, folder_id, succinct=false)
14
14
  required = {succinct: succinct,
15
15
  repositoryId: repository_id,
16
16
  cmisaction: 'removeObjectFromFolder',
17
- objectId: object_id}
17
+ objectId: cmis_object_id}
18
18
  optional = {folderId: folder_id}
19
19
  perform_request(required, optional)
20
20
  end
@@ -53,11 +53,11 @@ module YACCL
53
53
  perform_request(required, optional)
54
54
  end
55
55
 
56
- def get_object_parents(repository_id, object_id, filter, include_allowable_actions, include_relationships, rendition_filter, include_relative_path_segment, succinct=false)
56
+ def get_object_parents(repository_id, cmis_object_id, filter, include_allowable_actions, include_relationships, rendition_filter, include_relative_path_segment, succinct=false)
57
57
  required = {succinct: succinct,
58
58
  cmisselector: 'parents',
59
59
  repositoryId: repository_id,
60
- objectId: object_id}
60
+ objectId: cmis_object_id}
61
61
  optional = {filter: filter,
62
62
  includeAllowableActions: include_allowable_actions,
63
63
  includeRelationships: include_relationships,
@@ -1,10 +1,10 @@
1
1
  module YACCL
2
2
  module ObjectServices
3
- def get_object(repository_id, object_id, filter, include_allowable_actions, include_relationships, rendition_filter, include_policy_ids, include_acl, succinct=false)
3
+ def get_object(repository_id, cmis_object_id, filter, include_allowable_actions, include_relationships, rendition_filter, include_policy_ids, include_acl, succinct=false)
4
4
  required = {succinct: succinct,
5
5
  cmisselector: 'object',
6
6
  repositoryId: repository_id,
7
- objectId: object_id}
7
+ objectId: cmis_object_id}
8
8
  optional = {filter: filter,
9
9
  includeAllowableActions: include_allowable_actions,
10
10
  includeRelationships: include_relationships,
@@ -14,11 +14,11 @@ module YACCL
14
14
  perform_request(required, optional)
15
15
  end
16
16
 
17
- def get_properties(repository_id, object_id, filter, succinct=false)
17
+ def get_properties(repository_id, cmis_object_id, filter, succinct=false)
18
18
  required = {succinct: succinct,
19
19
  cmisselector: 'properties',
20
20
  repositoryId: repository_id,
21
- objectId: object_id}
21
+ objectId: cmis_object_id}
22
22
  optional = {filter: filter}
23
23
  perform_request(required, optional)
24
24
  end
@@ -99,19 +99,19 @@ module YACCL
99
99
  perform_request(required, optional)
100
100
  end
101
101
 
102
- def get_allowable_actions(repository_id, object_id, succinct=false)
102
+ def get_allowable_actions(repository_id, cmis_object_id, succinct=false)
103
103
  required = {succinct: succinct,
104
104
  cmisselector: 'allowableActions',
105
105
  repositoryId: repository_id,
106
- objectId: object_id}
106
+ objectId: cmis_object_id}
107
107
  perform_request(required)
108
108
  end
109
109
 
110
- def get_renditions(repository_id, object_id, rendition_filter, max_items, skip_count, succinct=false)
110
+ def get_renditions(repository_id, cmis_object_id, rendition_filter, max_items, skip_count, succinct=false)
111
111
  required = {succinct: succinct,
112
112
  cmisselector: 'renditions',
113
113
  repositoryId: repository_id,
114
- objectId: object_id}
114
+ objectId: cmis_object_id}
115
115
  optional = {renditionFilter: rendition_filter,
116
116
  maxItems: max_items,
117
117
  skipCount: skip_count}
@@ -122,46 +122,46 @@ module YACCL
122
122
  raise 'Not supported.'
123
123
  end
124
124
 
125
- def get_content_stream(repository_id, object_id, stream_id, offset, length, succinct=false)
125
+ def get_content_stream(repository_id, cmis_object_id, stream_id, offset, length, succinct=false)
126
126
  required = {succinct: succinct,
127
127
  cmisselector: 'content',
128
128
  repositoryId: repository_id,
129
- objectId: object_id}
129
+ objectId: cmis_object_id}
130
130
  optional = {streamId: stream_id,
131
131
  offset: offset,
132
132
  length: length}
133
133
  perform_request(required, optional)
134
134
  end
135
135
 
136
- def update_properties(repository_id, object_id, change_token, properties, succinct=false)
136
+ def update_properties(repository_id, cmis_object_id, change_token, properties, succinct=false)
137
137
  required = {succinct: succinct,
138
138
  cmisaction: 'update',
139
139
  repositoryId: repository_id,
140
- objectId: object_id,
140
+ objectId: cmis_object_id,
141
141
  properties: properties}
142
142
  optional = {changeToken: change_token}
143
143
  perform_request(required, optional)
144
144
  end
145
145
 
146
- def bulk_update_properties(repository_id, object_ids_and_change_tokens, properties, add_secondary_type_ids, remove_secondary_type_ids, succinct=false)
146
+ def bulk_update_properties(repository_id, cmis_object_ids_and_change_tokens, properties, add_secondary_type_ids, remove_secondary_type_ids, succinct=false)
147
147
  # TODO
148
148
  end
149
149
 
150
- def move_object(repository_id, object_id, target_folder_id, source_folder_id, succinct=false)
150
+ def move_object(repository_id, cmis_object_id, target_folder_id, source_folder_id, succinct=false)
151
151
  required = {succinct: succinct,
152
152
  cmisaction: 'move',
153
153
  repositoryId: repository_id,
154
- objectId: object_id,
154
+ objectId: cmis_object_id,
155
155
  targetFolderId: target_folder_id,
156
156
  sourceFolderId: source_folder_id}
157
157
  perform_request(required)
158
158
  end
159
159
 
160
- def delete_object(repository_id, object_id, all_versions, succinct=false)
160
+ def delete_object(repository_id, cmis_object_id, all_versions, succinct=false)
161
161
  required = {succinct: succinct,
162
162
  cmisaction: 'delete',
163
163
  repositoryId: repository_id,
164
- objectId: object_id}
164
+ objectId: cmis_object_id}
165
165
  optional = {allVersions: all_versions}
166
166
  perform_request(required, optional)
167
167
  end
@@ -177,31 +177,31 @@ module YACCL
177
177
  perform_request(required, optional)
178
178
  end
179
179
 
180
- def set_content_stream(repository_id, object_id, overwrite_flag, change_token, content, succinct=false)
180
+ def set_content_stream(repository_id, cmis_object_id, overwrite_flag, change_token, content, succinct=false)
181
181
  required = {succinct: succinct,
182
182
  cmisaction: 'setContent',
183
183
  repositoryId: repository_id,
184
- objectId: object_id,
184
+ objectId: cmis_object_id,
185
185
  content: content}
186
186
  optional = {overwriteFlag: overwrite_flag,
187
187
  changeToken:change_token}
188
188
  perform_request(required, optional)
189
189
  end
190
190
 
191
- def delete_content_stream(repository_id, object_id, change_token, succinct=false)
191
+ def delete_content_stream(repository_id, cmis_object_id, change_token, succinct=false)
192
192
  required = {succinct: succinct,
193
193
  cmisaction: 'deleteContent',
194
194
  repositoryId: repository_id,
195
- objectId: object_id}
195
+ objectId: cmis_object_id}
196
196
  optional = {changeToken: change_token}
197
197
  perform_request(required, optional)
198
198
  end
199
199
 
200
- def append_content_stream(repository_id, object_id, change_token, content, is_last_chunk, succinct=false)
200
+ def append_content_stream(repository_id, cmis_object_id, change_token, content, is_last_chunk, succinct=false)
201
201
  required = {succinct: succinct,
202
202
  cmisaction: 'appendContent',
203
203
  repositoryId: repository_id,
204
- objectId: object_id,
204
+ objectId: cmis_object_id,
205
205
  content: content}
206
206
  optional = {isLastChunk: is_last_chunk,
207
207
  changeToken: change_token}
@@ -1,28 +1,28 @@
1
1
  module YACCL
2
2
  module PolicyServices
3
- def apply_policy(repository_id, policy_id, object_id, succinct=false)
3
+ def apply_policy(repository_id, policy_id, cmis_object_id, succinct=false)
4
4
  required = {succinct: succinct,
5
5
  cmisaction: 'applyPolicy',
6
6
  repositoryId: repository_id,
7
7
  policyId: policy_id,
8
- objectId: object_id}
8
+ objectId: cmis_object_id}
9
9
  perform_request(required)
10
10
  end
11
11
 
12
- def remove_policy(repository_id, policy_id, object_id, succinct=false)
12
+ def remove_policy(repository_id, policy_id, cmis_object_id, succinct=false)
13
13
  required = {succinct: succinct,
14
14
  cmisaction: 'removePolicy',
15
15
  repositoryId: repository_id,
16
16
  policyId: policy_id,
17
- objectId: object_id}
17
+ objectId: cmis_object_id}
18
18
  perform_request(required)
19
19
  end
20
20
 
21
- def get_applied_policies(repository_id, object_id, filter, succinct=false)
21
+ def get_applied_policies(repository_id, cmis_object_id, filter, succinct=false)
22
22
  required = {succinct: succinct,
23
23
  cmisselector: 'policies',
24
24
  repositoryId: repository_id,
25
- objectId: object_id}
25
+ objectId: cmis_object_id}
26
26
  optional = {filter: filter}
27
27
  perform_request(required, optional)
28
28
  end
@@ -1,10 +1,10 @@
1
1
  module YACCL
2
2
  module RelationshipServices
3
- def get_object_relationships(repository_id, object_id, include_sub_relationship_types, relationship_direction, type_id, filter, include_allowable_actions, max_items, skip_count, succinct=false)
3
+ def get_object_relationships(repository_id, cmis_object_id, include_sub_relationship_types, relationship_direction, type_id, filter, include_allowable_actions, max_items, skip_count, succinct=false)
4
4
  required = {succinct: succinct,
5
5
  cmisselector: 'relationships',
6
6
  repositoryId: repository_id,
7
- objectId: object_id}
7
+ objectId: cmis_object_id}
8
8
  optional = {includeSubRelationshipTypes: include_sub_relationship_types,
9
9
  relationshipDirection: relationship_direction,
10
10
  typeId: type_id,
@@ -1,26 +1,26 @@
1
1
  module YACCL
2
2
  module VersioningServices # TODO Check 'version_series_id' confusion.
3
- def check_out(repository_id, object_id, succinct=false)
3
+ def check_out(repository_id, cmis_object_id, succinct=false)
4
4
  required = {succinct: succinct,
5
5
  cmisaction: 'checkOut',
6
6
  repositoryId: repository_id,
7
- objectId: object_id}
7
+ objectId: cmis_object_id}
8
8
  perform_request(required)
9
9
  end
10
10
 
11
- def cancel_check_out(repository_id, object_id, succinct=false)
11
+ def cancel_check_out(repository_id, cmis_object_id, succinct=false)
12
12
  required = {succinct: succinct,
13
13
  cmisaction: 'cancelCheckOut',
14
14
  repositoryId: repository_id,
15
- objectId: object_id}
15
+ objectId: cmis_object_id}
16
16
  perform_request(required)
17
17
  end
18
18
 
19
- def check_in(repository_id, object_id, major, properties, content, checkin_comment, policies, add_aces, remove_aces, succinct=false)
19
+ def check_in(repository_id, cmis_object_id, major, properties, content, checkin_comment, policies, add_aces, remove_aces, succinct=false)
20
20
  required = {succinct: succinct,
21
21
  cmisaction: 'checkIn',
22
22
  repositoryId: repository_id,
23
- objectId: object_id}
23
+ objectId: cmis_object_id}
24
24
  optional = {major: major,
25
25
  properties: properties,
26
26
  content: content,
data/lib/yaccl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module YACCL
2
- VERSION = '0.0.37'
2
+ VERSION = '0.1.0'
3
3
  end
@@ -19,7 +19,7 @@ describe YACCL::Model::Folder do
19
19
  new_object.name = 'folder1'
20
20
  new_object.object_type_id = 'cmis:folder'
21
21
  folder = @repo.root.create(new_object)
22
- folder.parent.object_id.should eq @repo.root_folder_id
22
+ folder.parent.cmis_object_id.should eq @repo.root_folder_id
23
23
  folder.delete
24
24
  end
25
25
 
@@ -39,14 +39,14 @@ describe YACCL::Model::Repository do
39
39
  it 'root' do
40
40
  root = @repo.root
41
41
  root.should be_a_kind_of YACCL::Model::Folder
42
- root.object_id.should eq @repo.root_folder_id
42
+ root.cmis_object_id.should eq @repo.root_folder_id
43
43
  end
44
44
 
45
45
  it 'object' do
46
46
  id = @repo.root_folder_id
47
47
  object = @repo.object(id)
48
48
  object.should be_a_kind_of YACCL::Model::Folder
49
- object.object_id.should eq id
49
+ object.cmis_object_id.should eq id
50
50
  end
51
51
 
52
52
  it 'type - document' do
@@ -14,37 +14,37 @@ describe YACCL::NavigationServices do
14
14
  root = @repo.root
15
15
  f1 = create_folder(root)
16
16
 
17
- root_children = YACCL::Services.get_children('testrepo', root.object_id, nil, nil, nil, nil, nil, nil, nil, nil)
17
+ root_children = YACCL::Services.get_children('testrepo', root.cmis_object_id, nil, nil, nil, nil, nil, nil, nil, nil)
18
18
  root_children[:objects].length.should be 1
19
- root_children[:objects].first[:object][:succinctProperties][:'cmis:objectId'].should eq f1.object_id
19
+ root_children[:objects].first[:object][:succinctProperties][:'cmis:objectId'].should eq f1.cmis_object_id
20
20
  end
21
21
 
22
22
  it 'folder in folder - get parents' do
23
23
  root = @repo.root
24
24
 
25
25
  f1 = create_folder(root)
26
- f1_parents = YACCL::Services.get_object_parents('testrepo', f1.object_id, nil, nil, nil, nil, nil)
26
+ f1_parents = YACCL::Services.get_object_parents('testrepo', f1.cmis_object_id, nil, nil, nil, nil, nil)
27
27
  f1_parents.length.should eq 1
28
- f1_parents.first[:object][:succinctProperties][:'cmis:objectId'].should eq root.object_id
28
+ f1_parents.first[:object][:succinctProperties][:'cmis:objectId'].should eq root.cmis_object_id
29
29
 
30
30
  f2 = create_folder(f1)
31
- f2_parents = YACCL::Services.get_object_parents('testrepo', f2.object_id, nil, nil, nil, nil, nil)
31
+ f2_parents = YACCL::Services.get_object_parents('testrepo', f2.cmis_object_id, nil, nil, nil, nil, nil)
32
32
  f2_parents.length.should eq 1
33
- f2_parents.first[:object][:succinctProperties][:'cmis:objectId'].should eq f1.object_id
33
+ f2_parents.first[:object][:succinctProperties][:'cmis:objectId'].should eq f1.cmis_object_id
34
34
  end
35
35
 
36
36
  it 'document in folder - get parents' do
37
37
  root = @repo.root
38
38
 
39
39
  f1 = create_folder(root)
40
- f1_parents = YACCL::Services.get_object_parents('testrepo', f1.object_id, nil, nil, nil, nil, nil)
40
+ f1_parents = YACCL::Services.get_object_parents('testrepo', f1.cmis_object_id, nil, nil, nil, nil, nil)
41
41
  f1_parents.length.should eq 1
42
- f1_parents.first[:object][:succinctProperties][:'cmis:objectId'].should eq root.object_id
42
+ f1_parents.first[:object][:succinctProperties][:'cmis:objectId'].should eq root.cmis_object_id
43
43
 
44
44
  doc = create_document(f1)
45
- doc_parents = YACCL::Services.get_object_parents('testrepo', doc.object_id, nil, nil, nil, nil, nil)
45
+ doc_parents = YACCL::Services.get_object_parents('testrepo', doc.cmis_object_id, nil, nil, nil, nil, nil)
46
46
  doc_parents.length.should eq 1
47
- doc_parents.first[:object][:succinctProperties][:'cmis:objectId'].should eq f1.object_id
47
+ doc_parents.first[:object][:succinctProperties][:'cmis:objectId'].should eq f1.cmis_object_id
48
48
  end
49
49
 
50
50
  def create_folder(folder)
@@ -14,9 +14,9 @@ describe YACCL::NavigationServices do
14
14
  root = @repo.root
15
15
 
16
16
  properties = {'cmis:objectTypeId' => 'cmis:document', 'cmis:name' => 'document'}
17
- YACCL::Services.create_document('testrepo', properties, root.object_id, nil, nil, nil, nil, nil)
17
+ YACCL::Services.create_document('testrepo', properties, root.cmis_object_id, nil, nil, nil, nil, nil)
18
18
 
19
- root_children = YACCL::Services.get_children('testrepo', root.object_id, nil, nil, nil, nil, nil, nil, nil, nil)
19
+ root_children = YACCL::Services.get_children('testrepo', root.cmis_object_id, nil, nil, nil, nil, nil, nil, nil, nil)
20
20
  root_children[:objects].length.should be 1
21
21
  end
22
22
 
@@ -25,7 +25,7 @@ describe YACCL::NavigationServices do
25
25
 
26
26
  properties = {'cmis:objectTypeId' => 'cmis:document', 'cmis:name' => 'document'}
27
27
  content = { stream: StringIO.new('Apples are green.'), mime_type: 'text/plain', filename: 'apples.txt' }
28
- doc = YACCL::Services.create_document('testrepo', properties, root.object_id, content, nil, nil, nil, nil)
28
+ doc = YACCL::Services.create_document('testrepo', properties, root.cmis_object_id, content, nil, nil, nil, nil)
29
29
  doc_id = doc[:succinctProperties][:'cmis:objectId']
30
30
 
31
31
  YACCL::Services.get_content_stream('testrepo', doc_id, nil, nil, nil).should eq 'Apples are green.'
@@ -35,7 +35,7 @@ describe YACCL::NavigationServices do
35
35
  root = @repo.root
36
36
 
37
37
  properties = {'cmis:objectTypeId' => 'cmis:document', 'cmis:name' => 'document'}
38
- doc = YACCL::Services.create_document('testrepo', properties, root.object_id, nil, nil, nil, nil, nil)
38
+ doc = YACCL::Services.create_document('testrepo', properties, root.cmis_object_id, nil, nil, nil, nil, nil)
39
39
  doc_id = doc[:succinctProperties][:'cmis:objectId']
40
40
 
41
41
  lambda { YACCL::Services.get_content_stream('testrepo', doc_id, nil, nil, nil) }.should raise_exception
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaccl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.37
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenneth Geerts
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-14 00:00:00.000000000 Z
12
+ date: 2014-01-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: typhoeus