alfresco_api 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (522) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +351 -0
  4. data/Rakefile +8 -0
  5. data/alfresco_api.gemspec +45 -0
  6. data/docs/ActivitiesApi.md +74 -0
  7. data/docs/Activity.md +14 -0
  8. data/docs/ActivityEntry.md +8 -0
  9. data/docs/ActivityPaging.md +8 -0
  10. data/docs/ActivityPagingList.md +9 -0
  11. data/docs/Association.md +9 -0
  12. data/docs/AssociationBody.md +9 -0
  13. data/docs/AssociationEntry.md +8 -0
  14. data/docs/AssociationInfo.md +8 -0
  15. data/docs/AuditApi.md +495 -0
  16. data/docs/AuditApp.md +10 -0
  17. data/docs/AuditAppEntry.md +8 -0
  18. data/docs/AuditAppPaging.md +8 -0
  19. data/docs/AuditAppPagingList.md +9 -0
  20. data/docs/AuditBodyUpdate.md +8 -0
  21. data/docs/AuditEntry.md +12 -0
  22. data/docs/AuditEntryEntry.md +8 -0
  23. data/docs/AuditEntryPaging.md +8 -0
  24. data/docs/AuditEntryPagingList.md +9 -0
  25. data/docs/ChildAssociation.md +9 -0
  26. data/docs/ChildAssociationBody.md +9 -0
  27. data/docs/ChildAssociationEntry.md +8 -0
  28. data/docs/ChildAssociationInfo.md +9 -0
  29. data/docs/ClientBody.md +8 -0
  30. data/docs/Comment.md +16 -0
  31. data/docs/CommentBody.md +8 -0
  32. data/docs/CommentEntry.md +8 -0
  33. data/docs/CommentPaging.md +8 -0
  34. data/docs/CommentPagingList.md +9 -0
  35. data/docs/CommentsApi.md +251 -0
  36. data/docs/Company.md +15 -0
  37. data/docs/ContentInfo.md +11 -0
  38. data/docs/DeletedNode.md +27 -0
  39. data/docs/DeletedNodeEntry.md +8 -0
  40. data/docs/DeletedNodesPaging.md +8 -0
  41. data/docs/DeletedNodesPagingList.md +9 -0
  42. data/docs/Download.md +13 -0
  43. data/docs/DownloadBodyCreate.md +8 -0
  44. data/docs/DownloadEntry.md +8 -0
  45. data/docs/DownloadsApi.md +177 -0
  46. data/docs/Error.md +8 -0
  47. data/docs/ErrorError.md +13 -0
  48. data/docs/Favorite.md +10 -0
  49. data/docs/FavoriteBodyCreate.md +8 -0
  50. data/docs/FavoriteEntry.md +8 -0
  51. data/docs/FavoritePaging.md +8 -0
  52. data/docs/FavoritePagingList.md +9 -0
  53. data/docs/FavoriteSite.md +8 -0
  54. data/docs/FavoriteSiteBodyCreate.md +8 -0
  55. data/docs/FavoriteSiteEntry.md +8 -0
  56. data/docs/FavoritesApi.md +496 -0
  57. data/docs/Group.md +12 -0
  58. data/docs/GroupBodyCreate.md +10 -0
  59. data/docs/GroupBodyUpdate.md +8 -0
  60. data/docs/GroupEntry.md +8 -0
  61. data/docs/GroupMember.md +10 -0
  62. data/docs/GroupMemberEntry.md +8 -0
  63. data/docs/GroupMemberPaging.md +8 -0
  64. data/docs/GroupMemberPagingList.md +9 -0
  65. data/docs/GroupMembershipBodyCreate.md +9 -0
  66. data/docs/GroupPaging.md +8 -0
  67. data/docs/GroupPagingList.md +9 -0
  68. data/docs/GroupsApi.md +564 -0
  69. data/docs/NetworkQuota.md +10 -0
  70. data/docs/NetworksApi.md +189 -0
  71. data/docs/Node.md +25 -0
  72. data/docs/NodeAssociation.md +26 -0
  73. data/docs/NodeAssociationEntry.md +8 -0
  74. data/docs/NodeAssociationPaging.md +8 -0
  75. data/docs/NodeAssociationPagingList.md +10 -0
  76. data/docs/NodeBodyCopy.md +9 -0
  77. data/docs/NodeBodyCreate.md +15 -0
  78. data/docs/NodeBodyCreateAssociation.md +8 -0
  79. data/docs/NodeBodyLock.md +10 -0
  80. data/docs/NodeBodyMove.md +9 -0
  81. data/docs/NodeBodyUpdate.md +12 -0
  82. data/docs/NodeChildAssociation.md +26 -0
  83. data/docs/NodeChildAssociationEntry.md +8 -0
  84. data/docs/NodeChildAssociationPaging.md +8 -0
  85. data/docs/NodeChildAssociationPagingList.md +10 -0
  86. data/docs/NodeEntry.md +8 -0
  87. data/docs/NodePaging.md +8 -0
  88. data/docs/NodePagingList.md +10 -0
  89. data/docs/NodesApi.md +1206 -0
  90. data/docs/Pagination.md +12 -0
  91. data/docs/PasswordResetBody.md +10 -0
  92. data/docs/PathElement.md +11 -0
  93. data/docs/PathInfo.md +10 -0
  94. data/docs/PeopleApi.md +530 -0
  95. data/docs/PermissionElement.md +10 -0
  96. data/docs/PermissionsBodyUpdate.md +9 -0
  97. data/docs/PermissionsInfo.md +11 -0
  98. data/docs/Person.md +27 -0
  99. data/docs/PersonBodyCreate.md +26 -0
  100. data/docs/PersonBodyUpdate.md +26 -0
  101. data/docs/PersonEntry.md +8 -0
  102. data/docs/PersonNetwork.md +14 -0
  103. data/docs/PersonNetworkEntry.md +8 -0
  104. data/docs/PersonNetworkPaging.md +8 -0
  105. data/docs/PersonNetworkPagingList.md +9 -0
  106. data/docs/PersonPaging.md +8 -0
  107. data/docs/PersonPagingList.md +9 -0
  108. data/docs/Preference.md +9 -0
  109. data/docs/PreferenceEntry.md +8 -0
  110. data/docs/PreferencePaging.md +8 -0
  111. data/docs/PreferencePagingList.md +9 -0
  112. data/docs/PreferencesApi.md +131 -0
  113. data/docs/QueriesApi.md +206 -0
  114. data/docs/Rating.md +11 -0
  115. data/docs/RatingAggregate.md +9 -0
  116. data/docs/RatingBody.md +9 -0
  117. data/docs/RatingEntry.md +8 -0
  118. data/docs/RatingPaging.md +8 -0
  119. data/docs/RatingPagingList.md +9 -0
  120. data/docs/RatingsApi.md +248 -0
  121. data/docs/Rendition.md +10 -0
  122. data/docs/RenditionBodyCreate.md +8 -0
  123. data/docs/RenditionEntry.md +8 -0
  124. data/docs/RenditionPaging.md +8 -0
  125. data/docs/RenditionPagingList.md +9 -0
  126. data/docs/RenditionsApi.md +243 -0
  127. data/docs/RevertBody.md +9 -0
  128. data/docs/SharedLink.md +19 -0
  129. data/docs/SharedLinkBodyCreate.md +9 -0
  130. data/docs/SharedLinkBodyEmail.md +11 -0
  131. data/docs/SharedLinkEntry.md +8 -0
  132. data/docs/SharedLinkPaging.md +8 -0
  133. data/docs/SharedLinkPagingList.md +9 -0
  134. data/docs/SharedlinksApi.md +530 -0
  135. data/docs/Site.md +14 -0
  136. data/docs/SiteBodyCreate.md +11 -0
  137. data/docs/SiteBodyUpdate.md +10 -0
  138. data/docs/SiteContainer.md +9 -0
  139. data/docs/SiteContainerEntry.md +8 -0
  140. data/docs/SiteContainerPaging.md +8 -0
  141. data/docs/SiteContainerPagingList.md +9 -0
  142. data/docs/SiteEntry.md +8 -0
  143. data/docs/SiteMember.md +10 -0
  144. data/docs/SiteMemberEntry.md +8 -0
  145. data/docs/SiteMemberPaging.md +8 -0
  146. data/docs/SiteMemberPagingList.md +9 -0
  147. data/docs/SiteMembershipBodyCreate.md +9 -0
  148. data/docs/SiteMembershipBodyUpdate.md +8 -0
  149. data/docs/SiteMembershipRequest.md +11 -0
  150. data/docs/SiteMembershipRequestBodyCreate.md +10 -0
  151. data/docs/SiteMembershipRequestBodyUpdate.md +8 -0
  152. data/docs/SiteMembershipRequestEntry.md +8 -0
  153. data/docs/SiteMembershipRequestPaging.md +8 -0
  154. data/docs/SiteMembershipRequestPagingList.md +9 -0
  155. data/docs/SitePaging.md +8 -0
  156. data/docs/SitePagingList.md +9 -0
  157. data/docs/SiteRole.md +11 -0
  158. data/docs/SiteRoleEntry.md +8 -0
  159. data/docs/SiteRolePaging.md +8 -0
  160. data/docs/SiteRolePagingList.md +9 -0
  161. data/docs/SitesApi.md +1225 -0
  162. data/docs/Tag.md +9 -0
  163. data/docs/TagBody.md +8 -0
  164. data/docs/TagEntry.md +8 -0
  165. data/docs/TagPaging.md +8 -0
  166. data/docs/TagPagingList.md +9 -0
  167. data/docs/TagsApi.md +365 -0
  168. data/docs/TrashcanApi.md +474 -0
  169. data/docs/UserInfo.md +9 -0
  170. data/docs/Version.md +18 -0
  171. data/docs/VersionEntry.md +8 -0
  172. data/docs/VersionPaging.md +8 -0
  173. data/docs/VersionPagingList.md +9 -0
  174. data/docs/VersionsApi.md +311 -0
  175. data/git_push.sh +55 -0
  176. data/lib/alfresco_api.rb +208 -0
  177. data/lib/alfresco_api/api/activities_api.rb +101 -0
  178. data/lib/alfresco_api/api/audit_api.rb +558 -0
  179. data/lib/alfresco_api/api/comments_api.rb +289 -0
  180. data/lib/alfresco_api/api/downloads_api.rb +193 -0
  181. data/lib/alfresco_api/api/favorites_api.rb +555 -0
  182. data/lib/alfresco_api/api/groups_api.rb +627 -0
  183. data/lib/alfresco_api/api/networks_api.rb +217 -0
  184. data/lib/alfresco_api/api/nodes_api.rb +1314 -0
  185. data/lib/alfresco_api/api/people_api.rb +572 -0
  186. data/lib/alfresco_api/api/preferences_api.rb +159 -0
  187. data/lib/alfresco_api/api/queries_api.rb +260 -0
  188. data/lib/alfresco_api/api/ratings_api.rb +283 -0
  189. data/lib/alfresco_api/api/renditions_api.rb +271 -0
  190. data/lib/alfresco_api/api/sharedlinks_api.rb +570 -0
  191. data/lib/alfresco_api/api/sites_api.rb +1342 -0
  192. data/lib/alfresco_api/api/tags_api.rb +407 -0
  193. data/lib/alfresco_api/api/trashcan_api.rb +507 -0
  194. data/lib/alfresco_api/api/versions_api.rb +355 -0
  195. data/lib/alfresco_api/api_client.rb +389 -0
  196. data/lib/alfresco_api/api_error.rb +38 -0
  197. data/lib/alfresco_api/configuration.rb +209 -0
  198. data/lib/alfresco_api/models/activity.rb +271 -0
  199. data/lib/alfresco_api/models/activity_entry.rb +193 -0
  200. data/lib/alfresco_api/models/activity_paging.rb +188 -0
  201. data/lib/alfresco_api/models/activity_paging_list.rb +209 -0
  202. data/lib/alfresco_api/models/association.rb +207 -0
  203. data/lib/alfresco_api/models/association_body.rb +207 -0
  204. data/lib/alfresco_api/models/association_entry.rb +193 -0
  205. data/lib/alfresco_api/models/association_info.rb +193 -0
  206. data/lib/alfresco_api/models/audit_app.rb +213 -0
  207. data/lib/alfresco_api/models/audit_app_entry.rb +188 -0
  208. data/lib/alfresco_api/models/audit_app_paging.rb +188 -0
  209. data/lib/alfresco_api/models/audit_app_paging_list.rb +199 -0
  210. data/lib/alfresco_api/models/audit_body_update.rb +188 -0
  211. data/lib/alfresco_api/models/audit_entry.rb +246 -0
  212. data/lib/alfresco_api/models/audit_entry_entry.rb +188 -0
  213. data/lib/alfresco_api/models/audit_entry_paging.rb +188 -0
  214. data/lib/alfresco_api/models/audit_entry_paging_list.rb +199 -0
  215. data/lib/alfresco_api/models/child_association.rb +207 -0
  216. data/lib/alfresco_api/models/child_association_body.rb +207 -0
  217. data/lib/alfresco_api/models/child_association_entry.rb +193 -0
  218. data/lib/alfresco_api/models/child_association_info.rb +207 -0
  219. data/lib/alfresco_api/models/client_body.rb +194 -0
  220. data/lib/alfresco_api/models/comment.rb +305 -0
  221. data/lib/alfresco_api/models/comment_body.rb +193 -0
  222. data/lib/alfresco_api/models/comment_entry.rb +193 -0
  223. data/lib/alfresco_api/models/comment_paging.rb +188 -0
  224. data/lib/alfresco_api/models/comment_paging_list.rb +209 -0
  225. data/lib/alfresco_api/models/company.rb +251 -0
  226. data/lib/alfresco_api/models/content_info.rb +230 -0
  227. data/lib/alfresco_api/models/deleted_node.rb +440 -0
  228. data/lib/alfresco_api/models/deleted_node_entry.rb +188 -0
  229. data/lib/alfresco_api/models/deleted_nodes_paging.rb +188 -0
  230. data/lib/alfresco_api/models/deleted_nodes_paging_list.rb +199 -0
  231. data/lib/alfresco_api/models/download.rb +274 -0
  232. data/lib/alfresco_api/models/download_body_create.rb +195 -0
  233. data/lib/alfresco_api/models/download_entry.rb +193 -0
  234. data/lib/alfresco_api/models/error.rb +188 -0
  235. data/lib/alfresco_api/models/error_error.rb +253 -0
  236. data/lib/alfresco_api/models/favorite.rb +218 -0
  237. data/lib/alfresco_api/models/favorite_body_create.rb +193 -0
  238. data/lib/alfresco_api/models/favorite_entry.rb +193 -0
  239. data/lib/alfresco_api/models/favorite_paging.rb +188 -0
  240. data/lib/alfresco_api/models/favorite_paging_list.rb +209 -0
  241. data/lib/alfresco_api/models/favorite_site.rb +193 -0
  242. data/lib/alfresco_api/models/favorite_site_body_create.rb +193 -0
  243. data/lib/alfresco_api/models/favorite_site_entry.rb +193 -0
  244. data/lib/alfresco_api/models/group.rb +245 -0
  245. data/lib/alfresco_api/models/group_body_create.rb +218 -0
  246. data/lib/alfresco_api/models/group_body_update.rb +193 -0
  247. data/lib/alfresco_api/models/group_entry.rb +193 -0
  248. data/lib/alfresco_api/models/group_member.rb +254 -0
  249. data/lib/alfresco_api/models/group_member_entry.rb +193 -0
  250. data/lib/alfresco_api/models/group_member_paging.rb +188 -0
  251. data/lib/alfresco_api/models/group_member_paging_list.rb +199 -0
  252. data/lib/alfresco_api/models/group_membership_body_create.rb +240 -0
  253. data/lib/alfresco_api/models/group_paging.rb +188 -0
  254. data/lib/alfresco_api/models/group_paging_list.rb +199 -0
  255. data/lib/alfresco_api/models/network_quota.rb +221 -0
  256. data/lib/alfresco_api/models/node.rb +412 -0
  257. data/lib/alfresco_api/models/node_association.rb +421 -0
  258. data/lib/alfresco_api/models/node_association_entry.rb +193 -0
  259. data/lib/alfresco_api/models/node_association_paging.rb +188 -0
  260. data/lib/alfresco_api/models/node_association_paging_list.rb +208 -0
  261. data/lib/alfresco_api/models/node_body_copy.rb +219 -0
  262. data/lib/alfresco_api/models/node_body_create.rb +289 -0
  263. data/lib/alfresco_api/models/node_body_create_association.rb +188 -0
  264. data/lib/alfresco_api/models/node_body_lock.rb +271 -0
  265. data/lib/alfresco_api/models/node_body_move.rb +219 -0
  266. data/lib/alfresco_api/models/node_body_update.rb +245 -0
  267. data/lib/alfresco_api/models/node_child_association.rb +421 -0
  268. data/lib/alfresco_api/models/node_child_association_entry.rb +193 -0
  269. data/lib/alfresco_api/models/node_child_association_paging.rb +188 -0
  270. data/lib/alfresco_api/models/node_child_association_paging_list.rb +208 -0
  271. data/lib/alfresco_api/models/node_entry.rb +193 -0
  272. data/lib/alfresco_api/models/node_paging.rb +188 -0
  273. data/lib/alfresco_api/models/node_paging_list.rb +208 -0
  274. data/lib/alfresco_api/models/pagination.rb +249 -0
  275. data/lib/alfresco_api/models/password_reset_body.rb +224 -0
  276. data/lib/alfresco_api/models/path_element.rb +217 -0
  277. data/lib/alfresco_api/models/path_info.rb +208 -0
  278. data/lib/alfresco_api/models/permission_element.rb +241 -0
  279. data/lib/alfresco_api/models/permissions_body_update.rb +199 -0
  280. data/lib/alfresco_api/models/permissions_info.rb +221 -0
  281. data/lib/alfresco_api/models/person.rb +387 -0
  282. data/lib/alfresco_api/models/person_body_create.rb +378 -0
  283. data/lib/alfresco_api/models/person_body_update.rb +354 -0
  284. data/lib/alfresco_api/models/person_entry.rb +193 -0
  285. data/lib/alfresco_api/models/person_network.rb +289 -0
  286. data/lib/alfresco_api/models/person_network_entry.rb +193 -0
  287. data/lib/alfresco_api/models/person_network_paging.rb +188 -0
  288. data/lib/alfresco_api/models/person_network_paging_list.rb +209 -0
  289. data/lib/alfresco_api/models/person_paging.rb +188 -0
  290. data/lib/alfresco_api/models/person_paging_list.rb +199 -0
  291. data/lib/alfresco_api/models/preference.rb +204 -0
  292. data/lib/alfresco_api/models/preference_entry.rb +193 -0
  293. data/lib/alfresco_api/models/preference_paging.rb +188 -0
  294. data/lib/alfresco_api/models/preference_paging_list.rb +209 -0
  295. data/lib/alfresco_api/models/rating.rb +221 -0
  296. data/lib/alfresco_api/models/rating_aggregate.rb +202 -0
  297. data/lib/alfresco_api/models/rating_body.rb +244 -0
  298. data/lib/alfresco_api/models/rating_entry.rb +193 -0
  299. data/lib/alfresco_api/models/rating_paging.rb +188 -0
  300. data/lib/alfresco_api/models/rating_paging_list.rb +209 -0
  301. data/lib/alfresco_api/models/rendition.rb +239 -0
  302. data/lib/alfresco_api/models/rendition_body_create.rb +193 -0
  303. data/lib/alfresco_api/models/rendition_entry.rb +193 -0
  304. data/lib/alfresco_api/models/rendition_paging.rb +188 -0
  305. data/lib/alfresco_api/models/rendition_paging_list.rb +199 -0
  306. data/lib/alfresco_api/models/revert_body.rb +197 -0
  307. data/lib/alfresco_api/models/shared_link.rb +310 -0
  308. data/lib/alfresco_api/models/shared_link_body_create.rb +202 -0
  309. data/lib/alfresco_api/models/shared_link_body_email.rb +217 -0
  310. data/lib/alfresco_api/models/shared_link_entry.rb +193 -0
  311. data/lib/alfresco_api/models/shared_link_paging.rb +188 -0
  312. data/lib/alfresco_api/models/shared_link_paging_list.rb +209 -0
  313. data/lib/alfresco_api/models/site.rb +307 -0
  314. data/lib/alfresco_api/models/site_body_create.rb +260 -0
  315. data/lib/alfresco_api/models/site_body_update.rb +239 -0
  316. data/lib/alfresco_api/models/site_container.rb +207 -0
  317. data/lib/alfresco_api/models/site_container_entry.rb +193 -0
  318. data/lib/alfresco_api/models/site_container_paging.rb +188 -0
  319. data/lib/alfresco_api/models/site_container_paging_list.rb +209 -0
  320. data/lib/alfresco_api/models/site_entry.rb +193 -0
  321. data/lib/alfresco_api/models/site_member.rb +254 -0
  322. data/lib/alfresco_api/models/site_member_entry.rb +193 -0
  323. data/lib/alfresco_api/models/site_member_paging.rb +188 -0
  324. data/lib/alfresco_api/models/site_member_paging_list.rb +209 -0
  325. data/lib/alfresco_api/models/site_membership_body_create.rb +240 -0
  326. data/lib/alfresco_api/models/site_membership_body_update.rb +226 -0
  327. data/lib/alfresco_api/models/site_membership_request.rb +230 -0
  328. data/lib/alfresco_api/models/site_membership_request_body_create.rb +211 -0
  329. data/lib/alfresco_api/models/site_membership_request_body_update.rb +188 -0
  330. data/lib/alfresco_api/models/site_membership_request_entry.rb +193 -0
  331. data/lib/alfresco_api/models/site_membership_request_paging.rb +188 -0
  332. data/lib/alfresco_api/models/site_membership_request_paging_list.rb +209 -0
  333. data/lib/alfresco_api/models/site_paging.rb +188 -0
  334. data/lib/alfresco_api/models/site_paging_list.rb +209 -0
  335. data/lib/alfresco_api/models/site_role.rb +268 -0
  336. data/lib/alfresco_api/models/site_role_entry.rb +193 -0
  337. data/lib/alfresco_api/models/site_role_paging.rb +188 -0
  338. data/lib/alfresco_api/models/site_role_paging_list.rb +209 -0
  339. data/lib/alfresco_api/models/tag.rb +207 -0
  340. data/lib/alfresco_api/models/tag_body.rb +193 -0
  341. data/lib/alfresco_api/models/tag_entry.rb +193 -0
  342. data/lib/alfresco_api/models/tag_paging.rb +188 -0
  343. data/lib/alfresco_api/models/tag_paging_list.rb +209 -0
  344. data/lib/alfresco_api/models/user_info.rb +207 -0
  345. data/lib/alfresco_api/models/version.rb +337 -0
  346. data/lib/alfresco_api/models/version_entry.rb +188 -0
  347. data/lib/alfresco_api/models/version_paging.rb +188 -0
  348. data/lib/alfresco_api/models/version_paging_list.rb +199 -0
  349. data/lib/alfresco_api/version.rb +15 -0
  350. data/spec/api/activities_api_spec.rb +52 -0
  351. data/spec/api/audit_api_spec.rb +152 -0
  352. data/spec/api/comments_api_spec.rb +92 -0
  353. data/spec/api/downloads_api_spec.rb +73 -0
  354. data/spec/api/favorites_api_spec.rb +151 -0
  355. data/spec/api/groups_api_spec.rb +170 -0
  356. data/spec/api/networks_api_spec.rb +77 -0
  357. data/spec/api/nodes_api_spec.rb +327 -0
  358. data/spec/api/people_api_spec.rb +157 -0
  359. data/spec/api/preferences_api_spec.rb +64 -0
  360. data/spec/api/queries_api_spec.rb +86 -0
  361. data/spec/api/ratings_api_spec.rb +91 -0
  362. data/spec/api/renditions_api_spec.rb +90 -0
  363. data/spec/api/sharedlinks_api_spec.rb +157 -0
  364. data/spec/api/sites_api_spec.rb +323 -0
  365. data/spec/api/tags_api_spec.rb +118 -0
  366. data/spec/api/trashcan_api_spec.rb +143 -0
  367. data/spec/api/versions_api_spec.rb +107 -0
  368. data/spec/api_client_spec.rb +226 -0
  369. data/spec/configuration_spec.rb +42 -0
  370. data/spec/models/activity_entry_spec.rb +42 -0
  371. data/spec/models/activity_paging_list_spec.rb +48 -0
  372. data/spec/models/activity_paging_spec.rb +42 -0
  373. data/spec/models/activity_spec.rb +78 -0
  374. data/spec/models/association_body_spec.rb +48 -0
  375. data/spec/models/association_entry_spec.rb +42 -0
  376. data/spec/models/association_info_spec.rb +42 -0
  377. data/spec/models/association_spec.rb +48 -0
  378. data/spec/models/audit_app_entry_spec.rb +42 -0
  379. data/spec/models/audit_app_paging_list_spec.rb +48 -0
  380. data/spec/models/audit_app_paging_spec.rb +42 -0
  381. data/spec/models/audit_app_spec.rb +54 -0
  382. data/spec/models/audit_body_update_spec.rb +42 -0
  383. data/spec/models/audit_entry_entry_spec.rb +42 -0
  384. data/spec/models/audit_entry_paging_list_spec.rb +48 -0
  385. data/spec/models/audit_entry_paging_spec.rb +42 -0
  386. data/spec/models/audit_entry_spec.rb +66 -0
  387. data/spec/models/child_association_body_spec.rb +48 -0
  388. data/spec/models/child_association_entry_spec.rb +42 -0
  389. data/spec/models/child_association_info_spec.rb +48 -0
  390. data/spec/models/child_association_spec.rb +48 -0
  391. data/spec/models/client_body_spec.rb +42 -0
  392. data/spec/models/comment_body_spec.rb +42 -0
  393. data/spec/models/comment_entry_spec.rb +42 -0
  394. data/spec/models/comment_paging_list_spec.rb +48 -0
  395. data/spec/models/comment_paging_spec.rb +42 -0
  396. data/spec/models/comment_spec.rb +90 -0
  397. data/spec/models/company_spec.rb +84 -0
  398. data/spec/models/content_info_spec.rb +60 -0
  399. data/spec/models/deleted_node_entry_spec.rb +42 -0
  400. data/spec/models/deleted_node_spec.rb +156 -0
  401. data/spec/models/deleted_nodes_paging_list_spec.rb +48 -0
  402. data/spec/models/deleted_nodes_paging_spec.rb +42 -0
  403. data/spec/models/download_body_create_spec.rb +42 -0
  404. data/spec/models/download_entry_spec.rb +42 -0
  405. data/spec/models/download_spec.rb +76 -0
  406. data/spec/models/error_error_spec.rb +72 -0
  407. data/spec/models/error_spec.rb +42 -0
  408. data/spec/models/favorite_body_create_spec.rb +42 -0
  409. data/spec/models/favorite_entry_spec.rb +42 -0
  410. data/spec/models/favorite_paging_list_spec.rb +48 -0
  411. data/spec/models/favorite_paging_spec.rb +42 -0
  412. data/spec/models/favorite_site_body_create_spec.rb +42 -0
  413. data/spec/models/favorite_site_entry_spec.rb +42 -0
  414. data/spec/models/favorite_site_spec.rb +42 -0
  415. data/spec/models/favorite_spec.rb +54 -0
  416. data/spec/models/group_body_create_spec.rb +54 -0
  417. data/spec/models/group_body_update_spec.rb +42 -0
  418. data/spec/models/group_entry_spec.rb +42 -0
  419. data/spec/models/group_member_entry_spec.rb +42 -0
  420. data/spec/models/group_member_paging_list_spec.rb +48 -0
  421. data/spec/models/group_member_paging_spec.rb +42 -0
  422. data/spec/models/group_member_spec.rb +58 -0
  423. data/spec/models/group_membership_body_create_spec.rb +52 -0
  424. data/spec/models/group_paging_list_spec.rb +48 -0
  425. data/spec/models/group_paging_spec.rb +42 -0
  426. data/spec/models/group_spec.rb +66 -0
  427. data/spec/models/network_quota_spec.rb +54 -0
  428. data/spec/models/node_association_entry_spec.rb +42 -0
  429. data/spec/models/node_association_paging_list_spec.rb +54 -0
  430. data/spec/models/node_association_paging_spec.rb +42 -0
  431. data/spec/models/node_association_spec.rb +150 -0
  432. data/spec/models/node_body_copy_spec.rb +48 -0
  433. data/spec/models/node_body_create_association_spec.rb +42 -0
  434. data/spec/models/node_body_create_spec.rb +84 -0
  435. data/spec/models/node_body_lock_spec.rb +62 -0
  436. data/spec/models/node_body_move_spec.rb +48 -0
  437. data/spec/models/node_body_update_spec.rb +66 -0
  438. data/spec/models/node_child_association_entry_spec.rb +42 -0
  439. data/spec/models/node_child_association_paging_list_spec.rb +54 -0
  440. data/spec/models/node_child_association_paging_spec.rb +42 -0
  441. data/spec/models/node_child_association_spec.rb +150 -0
  442. data/spec/models/node_entry_spec.rb +42 -0
  443. data/spec/models/node_paging_list_spec.rb +54 -0
  444. data/spec/models/node_paging_spec.rb +42 -0
  445. data/spec/models/node_spec.rb +144 -0
  446. data/spec/models/pagination_spec.rb +66 -0
  447. data/spec/models/password_reset_body_spec.rb +54 -0
  448. data/spec/models/path_element_spec.rb +60 -0
  449. data/spec/models/path_info_spec.rb +54 -0
  450. data/spec/models/permission_element_spec.rb +58 -0
  451. data/spec/models/permissions_body_update_spec.rb +48 -0
  452. data/spec/models/permissions_info_spec.rb +60 -0
  453. data/spec/models/person_body_create_spec.rb +150 -0
  454. data/spec/models/person_body_update_spec.rb +150 -0
  455. data/spec/models/person_entry_spec.rb +42 -0
  456. data/spec/models/person_network_entry_spec.rb +42 -0
  457. data/spec/models/person_network_paging_list_spec.rb +48 -0
  458. data/spec/models/person_network_paging_spec.rb +42 -0
  459. data/spec/models/person_network_spec.rb +82 -0
  460. data/spec/models/person_paging_list_spec.rb +48 -0
  461. data/spec/models/person_paging_spec.rb +42 -0
  462. data/spec/models/person_spec.rb +156 -0
  463. data/spec/models/preference_entry_spec.rb +42 -0
  464. data/spec/models/preference_paging_list_spec.rb +48 -0
  465. data/spec/models/preference_paging_spec.rb +42 -0
  466. data/spec/models/preference_spec.rb +48 -0
  467. data/spec/models/rating_aggregate_spec.rb +48 -0
  468. data/spec/models/rating_body_spec.rb +52 -0
  469. data/spec/models/rating_entry_spec.rb +42 -0
  470. data/spec/models/rating_paging_list_spec.rb +48 -0
  471. data/spec/models/rating_paging_spec.rb +42 -0
  472. data/spec/models/rating_spec.rb +60 -0
  473. data/spec/models/rendition_body_create_spec.rb +42 -0
  474. data/spec/models/rendition_entry_spec.rb +42 -0
  475. data/spec/models/rendition_paging_list_spec.rb +48 -0
  476. data/spec/models/rendition_paging_spec.rb +42 -0
  477. data/spec/models/rendition_spec.rb +58 -0
  478. data/spec/models/revert_body_spec.rb +48 -0
  479. data/spec/models/shared_link_body_create_spec.rb +48 -0
  480. data/spec/models/shared_link_body_email_spec.rb +60 -0
  481. data/spec/models/shared_link_entry_spec.rb +42 -0
  482. data/spec/models/shared_link_paging_list_spec.rb +48 -0
  483. data/spec/models/shared_link_paging_spec.rb +42 -0
  484. data/spec/models/shared_link_spec.rb +108 -0
  485. data/spec/models/site_body_create_spec.rb +64 -0
  486. data/spec/models/site_body_update_spec.rb +58 -0
  487. data/spec/models/site_container_entry_spec.rb +42 -0
  488. data/spec/models/site_container_paging_list_spec.rb +48 -0
  489. data/spec/models/site_container_paging_spec.rb +42 -0
  490. data/spec/models/site_container_spec.rb +48 -0
  491. data/spec/models/site_entry_spec.rb +42 -0
  492. data/spec/models/site_member_entry_spec.rb +42 -0
  493. data/spec/models/site_member_paging_list_spec.rb +48 -0
  494. data/spec/models/site_member_paging_spec.rb +42 -0
  495. data/spec/models/site_member_spec.rb +58 -0
  496. data/spec/models/site_membership_body_create_spec.rb +52 -0
  497. data/spec/models/site_membership_body_update_spec.rb +46 -0
  498. data/spec/models/site_membership_request_body_create_spec.rb +54 -0
  499. data/spec/models/site_membership_request_body_update_spec.rb +42 -0
  500. data/spec/models/site_membership_request_entry_spec.rb +42 -0
  501. data/spec/models/site_membership_request_paging_list_spec.rb +48 -0
  502. data/spec/models/site_membership_request_paging_spec.rb +42 -0
  503. data/spec/models/site_membership_request_spec.rb +60 -0
  504. data/spec/models/site_paging_list_spec.rb +48 -0
  505. data/spec/models/site_paging_spec.rb +42 -0
  506. data/spec/models/site_role_entry_spec.rb +42 -0
  507. data/spec/models/site_role_paging_list_spec.rb +48 -0
  508. data/spec/models/site_role_paging_spec.rb +42 -0
  509. data/spec/models/site_role_spec.rb +64 -0
  510. data/spec/models/site_spec.rb +86 -0
  511. data/spec/models/tag_body_spec.rb +42 -0
  512. data/spec/models/tag_entry_spec.rb +42 -0
  513. data/spec/models/tag_paging_list_spec.rb +48 -0
  514. data/spec/models/tag_paging_spec.rb +42 -0
  515. data/spec/models/tag_spec.rb +48 -0
  516. data/spec/models/user_info_spec.rb +48 -0
  517. data/spec/models/version_entry_spec.rb +42 -0
  518. data/spec/models/version_paging_list_spec.rb +48 -0
  519. data/spec/models/version_paging_spec.rb +42 -0
  520. data/spec/models/version_spec.rb +102 -0
  521. data/spec/spec_helper.rb +111 -0
  522. metadata +918 -0
@@ -0,0 +1,217 @@
1
+ =begin
2
+ #Alfresco Content Services REST API
3
+
4
+ #**Core API** Provides access to the core features of Alfresco Content Services.
5
+
6
+ OpenAPI spec version: 1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module AlfrescoAPI
16
+ class NetworksApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Get a network
24
+ # Gets information for a network **networkId**.
25
+ # @param network_id The identifier of a network.
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
28
+ # @return [PersonNetworkEntry]
29
+ def get_network(network_id, opts = {})
30
+ data, _status_code, _headers = get_network_with_http_info(network_id, opts)
31
+ return data
32
+ end
33
+
34
+ # Get a network
35
+ # Gets information for a network **networkId**.
36
+ # @param network_id The identifier of a network.
37
+ # @param [Hash] opts the optional parameters
38
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
39
+ # @return [Array<(PersonNetworkEntry, Fixnum, Hash)>] PersonNetworkEntry data, response status code and response headers
40
+ def get_network_with_http_info(network_id, opts = {})
41
+ if @api_client.config.debugging
42
+ @api_client.config.logger.debug "Calling API: NetworksApi.get_network ..."
43
+ end
44
+ # verify the required parameter 'network_id' is set
45
+ if @api_client.config.client_side_validation && network_id.nil?
46
+ fail ArgumentError, "Missing the required parameter 'network_id' when calling NetworksApi.get_network"
47
+ end
48
+ # resource path
49
+ local_var_path = "/networks/{networkId}".sub('{' + 'networkId' + '}', network_id.to_s)
50
+
51
+ # query parameters
52
+ query_params = {}
53
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
54
+
55
+ # header parameters
56
+ header_params = {}
57
+ # HTTP header 'Accept' (if needed)
58
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
59
+ # HTTP header 'Content-Type'
60
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
61
+
62
+ # form parameters
63
+ form_params = {}
64
+
65
+ # http body (model)
66
+ post_body = nil
67
+ auth_names = ['basicAuth']
68
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
69
+ :header_params => header_params,
70
+ :query_params => query_params,
71
+ :form_params => form_params,
72
+ :body => post_body,
73
+ :auth_names => auth_names,
74
+ :return_type => 'PersonNetworkEntry')
75
+ if @api_client.config.debugging
76
+ @api_client.config.logger.debug "API called: NetworksApi#get_network\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
77
+ end
78
+ return data, status_code, headers
79
+ end
80
+
81
+ # Get network information
82
+ # Gets network information on a single network specified by **networkId** for **personId**. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
83
+ # @param person_id The identifier of a person.
84
+ # @param network_id The identifier of a network.
85
+ # @param [Hash] opts the optional parameters
86
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
87
+ # @return [PersonNetworkEntry]
88
+ def get_network_for_person(person_id, network_id, opts = {})
89
+ data, _status_code, _headers = get_network_for_person_with_http_info(person_id, network_id, opts)
90
+ return data
91
+ end
92
+
93
+ # Get network information
94
+ # Gets network information on a single network specified by **networkId** for **personId**. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; to specify the currently authenticated user.
95
+ # @param person_id The identifier of a person.
96
+ # @param network_id The identifier of a network.
97
+ # @param [Hash] opts the optional parameters
98
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
99
+ # @return [Array<(PersonNetworkEntry, Fixnum, Hash)>] PersonNetworkEntry data, response status code and response headers
100
+ def get_network_for_person_with_http_info(person_id, network_id, opts = {})
101
+ if @api_client.config.debugging
102
+ @api_client.config.logger.debug "Calling API: NetworksApi.get_network_for_person ..."
103
+ end
104
+ # verify the required parameter 'person_id' is set
105
+ if @api_client.config.client_side_validation && person_id.nil?
106
+ fail ArgumentError, "Missing the required parameter 'person_id' when calling NetworksApi.get_network_for_person"
107
+ end
108
+ # verify the required parameter 'network_id' is set
109
+ if @api_client.config.client_side_validation && network_id.nil?
110
+ fail ArgumentError, "Missing the required parameter 'network_id' when calling NetworksApi.get_network_for_person"
111
+ end
112
+ # resource path
113
+ local_var_path = "/people/{personId}/networks/{networkId}".sub('{' + 'personId' + '}', person_id.to_s).sub('{' + 'networkId' + '}', network_id.to_s)
114
+
115
+ # query parameters
116
+ query_params = {}
117
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
118
+
119
+ # header parameters
120
+ header_params = {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
123
+ # HTTP header 'Content-Type'
124
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
125
+
126
+ # form parameters
127
+ form_params = {}
128
+
129
+ # http body (model)
130
+ post_body = nil
131
+ auth_names = ['basicAuth']
132
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => 'PersonNetworkEntry')
139
+ if @api_client.config.debugging
140
+ @api_client.config.logger.debug "API called: NetworksApi#get_network_for_person\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
141
+ end
142
+ return data, status_code, headers
143
+ end
144
+
145
+ # List network membership
146
+ # Gets a list of network memberships for person **personId**. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
147
+ # @param person_id The identifier of a person.
148
+ # @param [Hash] opts the optional parameters
149
+ # @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. (default to 0)
150
+ # @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100)
151
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
152
+ # @return [PersonNetworkPaging]
153
+ def list_networks_for_person(person_id, opts = {})
154
+ data, _status_code, _headers = list_networks_for_person_with_http_info(person_id, opts)
155
+ return data
156
+ end
157
+
158
+ # List network membership
159
+ # Gets a list of network memberships for person **personId**. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; to specify the currently authenticated user.
160
+ # @param person_id The identifier of a person.
161
+ # @param [Hash] opts the optional parameters
162
+ # @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0.
163
+ # @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100.
164
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
165
+ # @return [Array<(PersonNetworkPaging, Fixnum, Hash)>] PersonNetworkPaging data, response status code and response headers
166
+ def list_networks_for_person_with_http_info(person_id, opts = {})
167
+ if @api_client.config.debugging
168
+ @api_client.config.logger.debug "Calling API: NetworksApi.list_networks_for_person ..."
169
+ end
170
+ # verify the required parameter 'person_id' is set
171
+ if @api_client.config.client_side_validation && person_id.nil?
172
+ fail ArgumentError, "Missing the required parameter 'person_id' when calling NetworksApi.list_networks_for_person"
173
+ end
174
+ if @api_client.config.client_side_validation && !opts[:'skip_count'].nil? && opts[:'skip_count'] < 0
175
+ fail ArgumentError, 'invalid value for "opts[:"skip_count"]" when calling NetworksApi.list_networks_for_person, must be greater than or equal to 0.'
176
+ end
177
+
178
+ if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] < 1
179
+ fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling NetworksApi.list_networks_for_person, must be greater than or equal to 1.'
180
+ end
181
+
182
+ # resource path
183
+ local_var_path = "/people/{personId}/networks".sub('{' + 'personId' + '}', person_id.to_s)
184
+
185
+ # query parameters
186
+ query_params = {}
187
+ query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil?
188
+ query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil?
189
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
190
+
191
+ # header parameters
192
+ header_params = {}
193
+ # HTTP header 'Accept' (if needed)
194
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
195
+ # HTTP header 'Content-Type'
196
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
197
+
198
+ # form parameters
199
+ form_params = {}
200
+
201
+ # http body (model)
202
+ post_body = nil
203
+ auth_names = ['basicAuth']
204
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
205
+ :header_params => header_params,
206
+ :query_params => query_params,
207
+ :form_params => form_params,
208
+ :body => post_body,
209
+ :auth_names => auth_names,
210
+ :return_type => 'PersonNetworkPaging')
211
+ if @api_client.config.debugging
212
+ @api_client.config.logger.debug "API called: NetworksApi#list_networks_for_person\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
213
+ end
214
+ return data, status_code, headers
215
+ end
216
+ end
217
+ end
@@ -0,0 +1,1314 @@
1
+ =begin
2
+ #Alfresco Content Services REST API
3
+
4
+ #**Core API** Provides access to the core features of Alfresco Content Services.
5
+
6
+ OpenAPI spec version: 1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module AlfrescoAPI
16
+ class NodesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Copy a node
24
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Copies the node **nodeId** to the parent folder node **targetParentId**. You specify the **targetParentId** in the request body. The new node has the same name as the source node unless you specify a new **name** in the request body. If the source **nodeId** is a folder, then all of its children are also copied. If the source **nodeId** is a file, it's properties, aspects and tags are copied, it's ratings, comments and locks are not.
25
+ # @param node_id The identifier of a node.
26
+ # @param node_body_copy The targetParentId and, optionally, a new name which should include the file extension.
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * association * isLink * isLocked * path * permissions
29
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
30
+ # @return [NodeEntry]
31
+ def copy_node(node_id, node_body_copy, opts = {})
32
+ data, _status_code, _headers = copy_node_with_http_info(node_id, node_body_copy, opts)
33
+ return data
34
+ end
35
+
36
+ # Copy a node
37
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Copies the node **nodeId** to the parent folder node **targetParentId**. You specify the **targetParentId** in the request body. The new node has the same name as the source node unless you specify a new **name** in the request body. If the source **nodeId** is a folder, then all of its children are also copied. If the source **nodeId** is a file, it&#39;s properties, aspects and tags are copied, it&#39;s ratings, comments and locks are not.
38
+ # @param node_id The identifier of a node.
39
+ # @param node_body_copy The targetParentId and, optionally, a new name which should include the file extension.
40
+ # @param [Hash] opts the optional parameters
41
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * association * isLink * isLocked * path * permissions
42
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
43
+ # @return [Array<(NodeEntry, Fixnum, Hash)>] NodeEntry data, response status code and response headers
44
+ def copy_node_with_http_info(node_id, node_body_copy, opts = {})
45
+ if @api_client.config.debugging
46
+ @api_client.config.logger.debug "Calling API: NodesApi.copy_node ..."
47
+ end
48
+ # verify the required parameter 'node_id' is set
49
+ if @api_client.config.client_side_validation && node_id.nil?
50
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.copy_node"
51
+ end
52
+ # verify the required parameter 'node_body_copy' is set
53
+ if @api_client.config.client_side_validation && node_body_copy.nil?
54
+ fail ArgumentError, "Missing the required parameter 'node_body_copy' when calling NodesApi.copy_node"
55
+ end
56
+ # resource path
57
+ local_var_path = "/nodes/{nodeId}/copy".sub('{' + 'nodeId' + '}', node_id.to_s)
58
+
59
+ # query parameters
60
+ query_params = {}
61
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
62
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
63
+
64
+ # header parameters
65
+ header_params = {}
66
+ # HTTP header 'Accept' (if needed)
67
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
68
+ # HTTP header 'Content-Type'
69
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
70
+
71
+ # form parameters
72
+ form_params = {}
73
+
74
+ # http body (model)
75
+ post_body = @api_client.object_to_http_body(node_body_copy)
76
+ auth_names = ['basicAuth']
77
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
78
+ :header_params => header_params,
79
+ :query_params => query_params,
80
+ :form_params => form_params,
81
+ :body => post_body,
82
+ :auth_names => auth_names,
83
+ :return_type => 'NodeEntry')
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: NodesApi#copy_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Create node association
91
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Create an association, with the given association type, between the source **nodeId** and a target node. **Note:** You can create more than one association by specifying a list of associations in the JSON body like this: ```JSON [ { \"targetId\": \"string\", \"assocType\": \"string\" }, { \"targetId\": \"string\", \"assocType\": \"string\" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ```
92
+ # @param node_id The identifier of a source node.
93
+ # @param association_body_create The target node id and assoc type.
94
+ # @param [Hash] opts the optional parameters
95
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
96
+ # @return [AssociationEntry]
97
+ def create_assocation(node_id, association_body_create, opts = {})
98
+ data, _status_code, _headers = create_assocation_with_http_info(node_id, association_body_create, opts)
99
+ return data
100
+ end
101
+
102
+ # Create node association
103
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Create an association, with the given association type, between the source **nodeId** and a target node. **Note:** You can create more than one association by specifying a list of associations in the JSON body like this: &#x60;&#x60;&#x60;JSON [ { \&quot;targetId\&quot;: \&quot;string\&quot;, \&quot;assocType\&quot;: \&quot;string\&quot; }, { \&quot;targetId\&quot;: \&quot;string\&quot;, \&quot;assocType\&quot;: \&quot;string\&quot; } ] &#x60;&#x60;&#x60; If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: &#x60;&#x60;&#x60;JSON { \&quot;list\&quot;: { \&quot;pagination\&quot;: { \&quot;count\&quot;: 2, \&quot;hasMoreItems\&quot;: false, \&quot;totalItems\&quot;: 2, \&quot;skipCount\&quot;: 0, \&quot;maxItems\&quot;: 100 }, \&quot;entries\&quot;: [ { \&quot;entry\&quot;: { ... } }, { \&quot;entry\&quot;: { ... } } ] } } &#x60;&#x60;&#x60;
104
+ # @param node_id The identifier of a source node.
105
+ # @param association_body_create The target node id and assoc type.
106
+ # @param [Hash] opts the optional parameters
107
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
108
+ # @return [Array<(AssociationEntry, Fixnum, Hash)>] AssociationEntry data, response status code and response headers
109
+ def create_assocation_with_http_info(node_id, association_body_create, opts = {})
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug "Calling API: NodesApi.create_assocation ..."
112
+ end
113
+ # verify the required parameter 'node_id' is set
114
+ if @api_client.config.client_side_validation && node_id.nil?
115
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.create_assocation"
116
+ end
117
+ # verify the required parameter 'association_body_create' is set
118
+ if @api_client.config.client_side_validation && association_body_create.nil?
119
+ fail ArgumentError, "Missing the required parameter 'association_body_create' when calling NodesApi.create_assocation"
120
+ end
121
+ # resource path
122
+ local_var_path = "/nodes/{nodeId}/targets".sub('{' + 'nodeId' + '}', node_id.to_s)
123
+
124
+ # query parameters
125
+ query_params = {}
126
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
127
+
128
+ # header parameters
129
+ header_params = {}
130
+ # HTTP header 'Accept' (if needed)
131
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
132
+ # HTTP header 'Content-Type'
133
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
134
+
135
+ # form parameters
136
+ form_params = {}
137
+
138
+ # http body (model)
139
+ post_body = @api_client.object_to_http_body(association_body_create)
140
+ auth_names = ['basicAuth']
141
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
142
+ :header_params => header_params,
143
+ :query_params => query_params,
144
+ :form_params => form_params,
145
+ :body => post_body,
146
+ :auth_names => auth_names,
147
+ :return_type => 'AssociationEntry')
148
+ if @api_client.config.debugging
149
+ @api_client.config.logger.debug "API called: NodesApi#create_assocation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
150
+ end
151
+ return data, status_code, headers
152
+ end
153
+
154
+ # Create a node
155
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Create a node and add it as a primary child of node **nodeId**. This endpoint supports both JSON and multipart/form-data (file upload). **Using multipart/form-data** Use the **filedata** field to represent the content to upload, for example, the following curl command will create a node with the contents of test.txt in the test user's home folder. ```curl -utest:test -X POST host:port/alfresco/api/-default-/public/alfresco/versions/1/nodes/-my-/children -F filedata=@test.txt``` You can use the **name** field to give an alternative name for the new file. You can use the **nodeType** field to create a specific type. The default is cm:content. You can use the **renditions** field to create renditions (e.g. doclib) asynchronously upon upload. Note that currently only one rendition can be requested. Also, as requesting rendition is a background process, any rendition failure (e.g. No transformer is currently available) will not fail the whole upload and has the potential to silently fail. Use **overwrite** to overwrite an existing file, matched by name. If the file is versionable, the existing content is replaced. When you overwrite existing content, you can set the **majorVersion** boolean field to **true** to indicate a major version should be created. The default for **majorVersion** is **false**. Setting **majorVersion** enables versioning of the node, if it is not already versioned. When you overwrite existing content, you can use the **comment** field to add a version comment that appears in the version history. This also enables versioning of this node, if it is not already versioned. You can set the **autoRename** boolean field to automatically resolve name clashes. If there is a name clash, then the API method tries to create a unique name using an integer suffix. You can use the **relativePath** field to specify the folder structure to create relative to the node **nodeId**. Folders in the **relativePath** that do not exist are created before the node is created. Any other field provided will be treated as a property to set on the newly created node. **Note:** setting properties of type d:content and d:category are not supported. **Using JSON** You must specify at least a **name** and **nodeType**. For example, to create a folder: ```JSON { \"name\":\"My Folder\", \"nodeType\":\"cm:folder\" } ``` You can create an empty file like this: ```JSON { \"name\":\"My text file.txt\", \"nodeType\":\"cm:content\" } ``` You can update binary content using the ```PUT /nodes/{nodeId}``` API method. You can create a folder, or other node, inside a folder hierarchy: ```JSON { \"name\":\"My Special Folder\", \"nodeType\":\"cm:folder\", \"relativePath\":\"X/Y/Z\" } ``` The **relativePath** specifies the folder structure to create relative to the node **nodeId**. Folders in the **relativePath** that do not exist are created before the node is created. You can set properties when you create a new node: ```JSON { \"name\":\"My Other Folder\", \"nodeType\":\"cm:folder\", \"properties\": { \"cm:title\":\"Folder title\", \"cm:description\":\"This is an important folder\" } } ``` Any missing aspects are applied automatically. For example, **cm:titled** in the JSON shown above. You can set aspects explicitly, if needed, using an **aspectNames** field. **Note:** setting properties of type d:content and d:category are not supported. Typically, for files and folders, the primary children are created within the parent folder using the default \"cm:contains\" assocType. If the content model allows then it is also possible to create primary children with a different assoc type. For example: ```JSON { \"name\":\"My Node\", \"nodeType\":\"my:specialNodeType\", \"association\": { \"assocType\":\"my:specialAssocType\" } } ``` Additional associations can be added after creating a node. You can also add associations at the time the node is created. This is required, for example, if the content model specifies that a node has mandatory associations to one or more existing nodes. You can optionally specify an array of **secondaryChildren** to create one or more secondary child associations, such that the newly created node acts as a parent node. You can optionally specify an array of **targets** to create one or more peer associations such that the newly created node acts as a source node. For example, to associate one or more secondary children at time of creation: ```JSON { \"name\":\"My Folder\", \"nodeType\":\"cm:folder\", \"secondaryChildren\": [ {\"childId\":\"abcde-01234-...\", \"assocType\":\"my:specialChildAssocType\"} ] } ``` For example, to associate one or more targets at time of creation: ```JSON { \"name\":\"My Folder\", \"nodeType\":\"cm:folder\", \"targets\": [ {\"targetId\":\"abcde-01234-...\", \"assocType\":\"my:specialPeerAssocType\"} ] } ``` **Note:** You can create more than one child by specifying a list of nodes in the JSON body. For example, the following JSON body creates two folders inside the specified **nodeId**, if the **nodeId** identifies a folder: ```JSON [ { \"name\":\"My Folder 1\", \"nodeType\":\"cm:folder\" }, { \"name\":\"My Folder 2\", \"nodeType\":\"cm:folder\" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ```
156
+ # @param node_id The identifier of a node. You can also use one of these well-known aliases: * -my- * -shared- * -root-
157
+ # @param node_body_create The node information to create.
158
+ # @param [Hash] opts the optional parameters
159
+ # @option opts [BOOLEAN] :auto_rename If true, then a name clash will cause an attempt to auto rename by finding a unique name using an integer suffix.
160
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * association * isLink * isLocked * path * permissions
161
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
162
+ # @return [NodeEntry]
163
+ def create_node(node_id, node_body_create, opts = {})
164
+ data, _status_code, _headers = create_node_with_http_info(node_id, node_body_create, opts)
165
+ return data
166
+ end
167
+
168
+ # Create a node
169
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Create a node and add it as a primary child of node **nodeId**. This endpoint supports both JSON and multipart/form-data (file upload). **Using multipart/form-data** Use the **filedata** field to represent the content to upload, for example, the following curl command will create a node with the contents of test.txt in the test user&#39;s home folder. &#x60;&#x60;&#x60;curl -utest:test -X POST host:port/alfresco/api/-default-/public/alfresco/versions/1/nodes/-my-/children -F filedata&#x3D;@test.txt&#x60;&#x60;&#x60; You can use the **name** field to give an alternative name for the new file. You can use the **nodeType** field to create a specific type. The default is cm:content. You can use the **renditions** field to create renditions (e.g. doclib) asynchronously upon upload. Note that currently only one rendition can be requested. Also, as requesting rendition is a background process, any rendition failure (e.g. No transformer is currently available) will not fail the whole upload and has the potential to silently fail. Use **overwrite** to overwrite an existing file, matched by name. If the file is versionable, the existing content is replaced. When you overwrite existing content, you can set the **majorVersion** boolean field to **true** to indicate a major version should be created. The default for **majorVersion** is **false**. Setting **majorVersion** enables versioning of the node, if it is not already versioned. When you overwrite existing content, you can use the **comment** field to add a version comment that appears in the version history. This also enables versioning of this node, if it is not already versioned. You can set the **autoRename** boolean field to automatically resolve name clashes. If there is a name clash, then the API method tries to create a unique name using an integer suffix. You can use the **relativePath** field to specify the folder structure to create relative to the node **nodeId**. Folders in the **relativePath** that do not exist are created before the node is created. Any other field provided will be treated as a property to set on the newly created node. **Note:** setting properties of type d:content and d:category are not supported. **Using JSON** You must specify at least a **name** and **nodeType**. For example, to create a folder: &#x60;&#x60;&#x60;JSON { \&quot;name\&quot;:\&quot;My Folder\&quot;, \&quot;nodeType\&quot;:\&quot;cm:folder\&quot; } &#x60;&#x60;&#x60; You can create an empty file like this: &#x60;&#x60;&#x60;JSON { \&quot;name\&quot;:\&quot;My text file.txt\&quot;, \&quot;nodeType\&quot;:\&quot;cm:content\&quot; } &#x60;&#x60;&#x60; You can update binary content using the &#x60;&#x60;&#x60;PUT /nodes/{nodeId}&#x60;&#x60;&#x60; API method. You can create a folder, or other node, inside a folder hierarchy: &#x60;&#x60;&#x60;JSON { \&quot;name\&quot;:\&quot;My Special Folder\&quot;, \&quot;nodeType\&quot;:\&quot;cm:folder\&quot;, \&quot;relativePath\&quot;:\&quot;X/Y/Z\&quot; } &#x60;&#x60;&#x60; The **relativePath** specifies the folder structure to create relative to the node **nodeId**. Folders in the **relativePath** that do not exist are created before the node is created. You can set properties when you create a new node: &#x60;&#x60;&#x60;JSON { \&quot;name\&quot;:\&quot;My Other Folder\&quot;, \&quot;nodeType\&quot;:\&quot;cm:folder\&quot;, \&quot;properties\&quot;: { \&quot;cm:title\&quot;:\&quot;Folder title\&quot;, \&quot;cm:description\&quot;:\&quot;This is an important folder\&quot; } } &#x60;&#x60;&#x60; Any missing aspects are applied automatically. For example, **cm:titled** in the JSON shown above. You can set aspects explicitly, if needed, using an **aspectNames** field. **Note:** setting properties of type d:content and d:category are not supported. Typically, for files and folders, the primary children are created within the parent folder using the default \&quot;cm:contains\&quot; assocType. If the content model allows then it is also possible to create primary children with a different assoc type. For example: &#x60;&#x60;&#x60;JSON { \&quot;name\&quot;:\&quot;My Node\&quot;, \&quot;nodeType\&quot;:\&quot;my:specialNodeType\&quot;, \&quot;association\&quot;: { \&quot;assocType\&quot;:\&quot;my:specialAssocType\&quot; } } &#x60;&#x60;&#x60; Additional associations can be added after creating a node. You can also add associations at the time the node is created. This is required, for example, if the content model specifies that a node has mandatory associations to one or more existing nodes. You can optionally specify an array of **secondaryChildren** to create one or more secondary child associations, such that the newly created node acts as a parent node. You can optionally specify an array of **targets** to create one or more peer associations such that the newly created node acts as a source node. For example, to associate one or more secondary children at time of creation: &#x60;&#x60;&#x60;JSON { \&quot;name\&quot;:\&quot;My Folder\&quot;, \&quot;nodeType\&quot;:\&quot;cm:folder\&quot;, \&quot;secondaryChildren\&quot;: [ {\&quot;childId\&quot;:\&quot;abcde-01234-...\&quot;, \&quot;assocType\&quot;:\&quot;my:specialChildAssocType\&quot;} ] } &#x60;&#x60;&#x60; For example, to associate one or more targets at time of creation: &#x60;&#x60;&#x60;JSON { \&quot;name\&quot;:\&quot;My Folder\&quot;, \&quot;nodeType\&quot;:\&quot;cm:folder\&quot;, \&quot;targets\&quot;: [ {\&quot;targetId\&quot;:\&quot;abcde-01234-...\&quot;, \&quot;assocType\&quot;:\&quot;my:specialPeerAssocType\&quot;} ] } &#x60;&#x60;&#x60; **Note:** You can create more than one child by specifying a list of nodes in the JSON body. For example, the following JSON body creates two folders inside the specified **nodeId**, if the **nodeId** identifies a folder: &#x60;&#x60;&#x60;JSON [ { \&quot;name\&quot;:\&quot;My Folder 1\&quot;, \&quot;nodeType\&quot;:\&quot;cm:folder\&quot; }, { \&quot;name\&quot;:\&quot;My Folder 2\&quot;, \&quot;nodeType\&quot;:\&quot;cm:folder\&quot; } ] &#x60;&#x60;&#x60; If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: &#x60;&#x60;&#x60;JSON { \&quot;list\&quot;: { \&quot;pagination\&quot;: { \&quot;count\&quot;: 2, \&quot;hasMoreItems\&quot;: false, \&quot;totalItems\&quot;: 2, \&quot;skipCount\&quot;: 0, \&quot;maxItems\&quot;: 100 }, \&quot;entries\&quot;: [ { \&quot;entry\&quot;: { ... } }, { \&quot;entry\&quot;: { ... } } ] } } &#x60;&#x60;&#x60;
170
+ # @param node_id The identifier of a node. You can also use one of these well-known aliases: * -my- * -shared- * -root-
171
+ # @param node_body_create The node information to create.
172
+ # @param [Hash] opts the optional parameters
173
+ # @option opts [BOOLEAN] :auto_rename If true, then a name clash will cause an attempt to auto rename by finding a unique name using an integer suffix.
174
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * association * isLink * isLocked * path * permissions
175
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
176
+ # @return [Array<(NodeEntry, Fixnum, Hash)>] NodeEntry data, response status code and response headers
177
+ def create_node_with_http_info(node_id, node_body_create, opts = {})
178
+ if @api_client.config.debugging
179
+ @api_client.config.logger.debug "Calling API: NodesApi.create_node ..."
180
+ end
181
+ # verify the required parameter 'node_id' is set
182
+ if @api_client.config.client_side_validation && node_id.nil?
183
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.create_node"
184
+ end
185
+ # verify the required parameter 'node_body_create' is set
186
+ if @api_client.config.client_side_validation && node_body_create.nil?
187
+ fail ArgumentError, "Missing the required parameter 'node_body_create' when calling NodesApi.create_node"
188
+ end
189
+ # resource path
190
+ local_var_path = "/nodes/{nodeId}/children".sub('{' + 'nodeId' + '}', node_id.to_s)
191
+
192
+ # query parameters
193
+ query_params = {}
194
+ query_params[:'autoRename'] = opts[:'auto_rename'] if !opts[:'auto_rename'].nil?
195
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
196
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
197
+
198
+ # header parameters
199
+ header_params = {}
200
+ # HTTP header 'Accept' (if needed)
201
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
202
+ # HTTP header 'Content-Type'
203
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])
204
+
205
+ # form parameters
206
+ form_params = {}
207
+
208
+ # http body (model)
209
+ post_body = @api_client.object_to_http_body(node_body_create)
210
+ auth_names = ['basicAuth']
211
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
212
+ :header_params => header_params,
213
+ :query_params => query_params,
214
+ :form_params => form_params,
215
+ :body => post_body,
216
+ :auth_names => auth_names,
217
+ :return_type => 'NodeEntry')
218
+ if @api_client.config.debugging
219
+ @api_client.config.logger.debug "API called: NodesApi#create_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
220
+ end
221
+ return data, status_code, headers
222
+ end
223
+
224
+ # Create secondary child
225
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Create a secondary child association, with the given association type, between the parent **nodeId** and a child node. **Note:** You can create more than one secondary child association by specifying a list of associations in the JSON body like this: ```JSON [ { \"childId\": \"string\", \"assocType\": \"string\" }, { \"childId\": \"string\", \"assocType\": \"string\" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ```
226
+ # @param node_id The identifier of a parent node.
227
+ # @param secondary_child_association_body_create The child node id and assoc type.
228
+ # @param [Hash] opts the optional parameters
229
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
230
+ # @return [ChildAssociationEntry]
231
+ def create_secondary_child_assocation(node_id, secondary_child_association_body_create, opts = {})
232
+ data, _status_code, _headers = create_secondary_child_assocation_with_http_info(node_id, secondary_child_association_body_create, opts)
233
+ return data
234
+ end
235
+
236
+ # Create secondary child
237
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Create a secondary child association, with the given association type, between the parent **nodeId** and a child node. **Note:** You can create more than one secondary child association by specifying a list of associations in the JSON body like this: &#x60;&#x60;&#x60;JSON [ { \&quot;childId\&quot;: \&quot;string\&quot;, \&quot;assocType\&quot;: \&quot;string\&quot; }, { \&quot;childId\&quot;: \&quot;string\&quot;, \&quot;assocType\&quot;: \&quot;string\&quot; } ] &#x60;&#x60;&#x60; If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: &#x60;&#x60;&#x60;JSON { \&quot;list\&quot;: { \&quot;pagination\&quot;: { \&quot;count\&quot;: 2, \&quot;hasMoreItems\&quot;: false, \&quot;totalItems\&quot;: 2, \&quot;skipCount\&quot;: 0, \&quot;maxItems\&quot;: 100 }, \&quot;entries\&quot;: [ { \&quot;entry\&quot;: { ... } }, { \&quot;entry\&quot;: { ... } } ] } } &#x60;&#x60;&#x60;
238
+ # @param node_id The identifier of a parent node.
239
+ # @param secondary_child_association_body_create The child node id and assoc type.
240
+ # @param [Hash] opts the optional parameters
241
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
242
+ # @return [Array<(ChildAssociationEntry, Fixnum, Hash)>] ChildAssociationEntry data, response status code and response headers
243
+ def create_secondary_child_assocation_with_http_info(node_id, secondary_child_association_body_create, opts = {})
244
+ if @api_client.config.debugging
245
+ @api_client.config.logger.debug "Calling API: NodesApi.create_secondary_child_assocation ..."
246
+ end
247
+ # verify the required parameter 'node_id' is set
248
+ if @api_client.config.client_side_validation && node_id.nil?
249
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.create_secondary_child_assocation"
250
+ end
251
+ # verify the required parameter 'secondary_child_association_body_create' is set
252
+ if @api_client.config.client_side_validation && secondary_child_association_body_create.nil?
253
+ fail ArgumentError, "Missing the required parameter 'secondary_child_association_body_create' when calling NodesApi.create_secondary_child_assocation"
254
+ end
255
+ # resource path
256
+ local_var_path = "/nodes/{nodeId}/secondary-children".sub('{' + 'nodeId' + '}', node_id.to_s)
257
+
258
+ # query parameters
259
+ query_params = {}
260
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
261
+
262
+ # header parameters
263
+ header_params = {}
264
+ # HTTP header 'Accept' (if needed)
265
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
266
+ # HTTP header 'Content-Type'
267
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
268
+
269
+ # form parameters
270
+ form_params = {}
271
+
272
+ # http body (model)
273
+ post_body = @api_client.object_to_http_body(secondary_child_association_body_create)
274
+ auth_names = ['basicAuth']
275
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
276
+ :header_params => header_params,
277
+ :query_params => query_params,
278
+ :form_params => form_params,
279
+ :body => post_body,
280
+ :auth_names => auth_names,
281
+ :return_type => 'ChildAssociationEntry')
282
+ if @api_client.config.debugging
283
+ @api_client.config.logger.debug "API called: NodesApi#create_secondary_child_assocation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
284
+ end
285
+ return data, status_code, headers
286
+ end
287
+
288
+ # Delete node association(s)
289
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Delete an association, or associations, from the source **nodeId* to a target node for the given association type. If the association type is **not** specified, then all peer associations, of any type, in the direction from source to target, are deleted. **Note:** After removal of the peer association, or associations, from source to target, the two nodes may still have peer associations in the other direction.
290
+ # @param node_id The identifier of a source node.
291
+ # @param target_id The identifier of a target node.
292
+ # @param [Hash] opts the optional parameters
293
+ # @option opts [String] :assoc_type Only delete associations of this type.
294
+ # @return [nil]
295
+ def delete_assocation(node_id, target_id, opts = {})
296
+ delete_assocation_with_http_info(node_id, target_id, opts)
297
+ return nil
298
+ end
299
+
300
+ # Delete node association(s)
301
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Delete an association, or associations, from the source **nodeId* to a target node for the given association type. If the association type is **not** specified, then all peer associations, of any type, in the direction from source to target, are deleted. **Note:** After removal of the peer association, or associations, from source to target, the two nodes may still have peer associations in the other direction.
302
+ # @param node_id The identifier of a source node.
303
+ # @param target_id The identifier of a target node.
304
+ # @param [Hash] opts the optional parameters
305
+ # @option opts [String] :assoc_type Only delete associations of this type.
306
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
307
+ def delete_assocation_with_http_info(node_id, target_id, opts = {})
308
+ if @api_client.config.debugging
309
+ @api_client.config.logger.debug "Calling API: NodesApi.delete_assocation ..."
310
+ end
311
+ # verify the required parameter 'node_id' is set
312
+ if @api_client.config.client_side_validation && node_id.nil?
313
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.delete_assocation"
314
+ end
315
+ # verify the required parameter 'target_id' is set
316
+ if @api_client.config.client_side_validation && target_id.nil?
317
+ fail ArgumentError, "Missing the required parameter 'target_id' when calling NodesApi.delete_assocation"
318
+ end
319
+ # resource path
320
+ local_var_path = "/nodes/{nodeId}/targets/{targetId}".sub('{' + 'nodeId' + '}', node_id.to_s).sub('{' + 'targetId' + '}', target_id.to_s)
321
+
322
+ # query parameters
323
+ query_params = {}
324
+ query_params[:'assocType'] = opts[:'assoc_type'] if !opts[:'assoc_type'].nil?
325
+
326
+ # header parameters
327
+ header_params = {}
328
+ # HTTP header 'Accept' (if needed)
329
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
330
+ # HTTP header 'Content-Type'
331
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
332
+
333
+ # form parameters
334
+ form_params = {}
335
+
336
+ # http body (model)
337
+ post_body = nil
338
+ auth_names = ['basicAuth']
339
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
340
+ :header_params => header_params,
341
+ :query_params => query_params,
342
+ :form_params => form_params,
343
+ :body => post_body,
344
+ :auth_names => auth_names)
345
+ if @api_client.config.debugging
346
+ @api_client.config.logger.debug "API called: NodesApi#delete_assocation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
347
+ end
348
+ return data, status_code, headers
349
+ end
350
+
351
+ # Delete a node
352
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Deletes the node **nodeId**. If **nodeId** is a folder, then its children are also deleted. Deleted nodes move to the trashcan unless the **permanent** query parameter is **true** and the current user is the owner of the node or an admin. Deleting a node deletes it from its primary parent and also from any secondary parents. Peer associations are also deleted, where the deleted node is either a source or target of an association. This applies recursively to any hierarchy of primary children of the deleted node. **Note:** If the node is not permanently deleted, and is later successfully restored to its former primary parent, then the primary child association is restored. This applies recursively for any primary children. No other secondary child associations or peer associations are restored for any of the nodes in the primary parent-child hierarchy of restored nodes, regardless of whether the original associations were to nodes inside or outside the restored hierarchy.
353
+ # @param node_id The identifier of a node.
354
+ # @param [Hash] opts the optional parameters
355
+ # @option opts [BOOLEAN] :permanent If **true** then the node is deleted permanently, without moving to the trashcan. Only the owner of the node or an admin can permanently delete the node. (default to false)
356
+ # @return [nil]
357
+ def delete_node(node_id, opts = {})
358
+ delete_node_with_http_info(node_id, opts)
359
+ return nil
360
+ end
361
+
362
+ # Delete a node
363
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Deletes the node **nodeId**. If **nodeId** is a folder, then its children are also deleted. Deleted nodes move to the trashcan unless the **permanent** query parameter is **true** and the current user is the owner of the node or an admin. Deleting a node deletes it from its primary parent and also from any secondary parents. Peer associations are also deleted, where the deleted node is either a source or target of an association. This applies recursively to any hierarchy of primary children of the deleted node. **Note:** If the node is not permanently deleted, and is later successfully restored to its former primary parent, then the primary child association is restored. This applies recursively for any primary children. No other secondary child associations or peer associations are restored for any of the nodes in the primary parent-child hierarchy of restored nodes, regardless of whether the original associations were to nodes inside or outside the restored hierarchy.
364
+ # @param node_id The identifier of a node.
365
+ # @param [Hash] opts the optional parameters
366
+ # @option opts [BOOLEAN] :permanent If **true** then the node is deleted permanently, without moving to the trashcan. Only the owner of the node or an admin can permanently delete the node.
367
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
368
+ def delete_node_with_http_info(node_id, opts = {})
369
+ if @api_client.config.debugging
370
+ @api_client.config.logger.debug "Calling API: NodesApi.delete_node ..."
371
+ end
372
+ # verify the required parameter 'node_id' is set
373
+ if @api_client.config.client_side_validation && node_id.nil?
374
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.delete_node"
375
+ end
376
+ # resource path
377
+ local_var_path = "/nodes/{nodeId}".sub('{' + 'nodeId' + '}', node_id.to_s)
378
+
379
+ # query parameters
380
+ query_params = {}
381
+ query_params[:'permanent'] = opts[:'permanent'] if !opts[:'permanent'].nil?
382
+
383
+ # header parameters
384
+ header_params = {}
385
+ # HTTP header 'Accept' (if needed)
386
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
387
+ # HTTP header 'Content-Type'
388
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
389
+
390
+ # form parameters
391
+ form_params = {}
392
+
393
+ # http body (model)
394
+ post_body = nil
395
+ auth_names = ['basicAuth']
396
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
397
+ :header_params => header_params,
398
+ :query_params => query_params,
399
+ :form_params => form_params,
400
+ :body => post_body,
401
+ :auth_names => auth_names)
402
+ if @api_client.config.debugging
403
+ @api_client.config.logger.debug "API called: NodesApi#delete_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
404
+ end
405
+ return data, status_code, headers
406
+ end
407
+
408
+ # Delete secondary child or children
409
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Delete secondary child associations between the parent **nodeId** and child nodes for the given association type. If the association type is **not** specified, then all secondary child associations, of any type in the direction from parent to secondary child, will be deleted. The child will still have a primary parent and may still be associated as a secondary child with other secondary parents.
410
+ # @param node_id The identifier of a parent node.
411
+ # @param child_id The identifier of a child node.
412
+ # @param [Hash] opts the optional parameters
413
+ # @option opts [String] :assoc_type Only delete associations of this type.
414
+ # @return [nil]
415
+ def delete_secondary_child_assocation(node_id, child_id, opts = {})
416
+ delete_secondary_child_assocation_with_http_info(node_id, child_id, opts)
417
+ return nil
418
+ end
419
+
420
+ # Delete secondary child or children
421
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Delete secondary child associations between the parent **nodeId** and child nodes for the given association type. If the association type is **not** specified, then all secondary child associations, of any type in the direction from parent to secondary child, will be deleted. The child will still have a primary parent and may still be associated as a secondary child with other secondary parents.
422
+ # @param node_id The identifier of a parent node.
423
+ # @param child_id The identifier of a child node.
424
+ # @param [Hash] opts the optional parameters
425
+ # @option opts [String] :assoc_type Only delete associations of this type.
426
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
427
+ def delete_secondary_child_assocation_with_http_info(node_id, child_id, opts = {})
428
+ if @api_client.config.debugging
429
+ @api_client.config.logger.debug "Calling API: NodesApi.delete_secondary_child_assocation ..."
430
+ end
431
+ # verify the required parameter 'node_id' is set
432
+ if @api_client.config.client_side_validation && node_id.nil?
433
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.delete_secondary_child_assocation"
434
+ end
435
+ # verify the required parameter 'child_id' is set
436
+ if @api_client.config.client_side_validation && child_id.nil?
437
+ fail ArgumentError, "Missing the required parameter 'child_id' when calling NodesApi.delete_secondary_child_assocation"
438
+ end
439
+ # resource path
440
+ local_var_path = "/nodes/{nodeId}/secondary-children/{childId}".sub('{' + 'nodeId' + '}', node_id.to_s).sub('{' + 'childId' + '}', child_id.to_s)
441
+
442
+ # query parameters
443
+ query_params = {}
444
+ query_params[:'assocType'] = opts[:'assoc_type'] if !opts[:'assoc_type'].nil?
445
+
446
+ # header parameters
447
+ header_params = {}
448
+ # HTTP header 'Accept' (if needed)
449
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
450
+ # HTTP header 'Content-Type'
451
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
452
+
453
+ # form parameters
454
+ form_params = {}
455
+
456
+ # http body (model)
457
+ post_body = nil
458
+ auth_names = ['basicAuth']
459
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
460
+ :header_params => header_params,
461
+ :query_params => query_params,
462
+ :form_params => form_params,
463
+ :body => post_body,
464
+ :auth_names => auth_names)
465
+ if @api_client.config.debugging
466
+ @api_client.config.logger.debug "API called: NodesApi#delete_secondary_child_assocation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
467
+ end
468
+ return data, status_code, headers
469
+ end
470
+
471
+ # Get a node
472
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Get information for node **nodeId**. You can use the **include** parameter to return additional information.
473
+ # @param node_id The identifier of a node. You can also use one of these well-known aliases: * -my- * -shared- * -root-
474
+ # @param [Hash] opts the optional parameters
475
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * association * isLink * isLocked * path * permissions
476
+ # @option opts [String] :relative_path A path relative to the **nodeId**. If you set this, information is returned on the node resolved by this path.
477
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
478
+ # @return [NodeEntry]
479
+ def get_node(node_id, opts = {})
480
+ data, _status_code, _headers = get_node_with_http_info(node_id, opts)
481
+ return data
482
+ end
483
+
484
+ # Get a node
485
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Get information for node **nodeId**. You can use the **include** parameter to return additional information.
486
+ # @param node_id The identifier of a node. You can also use one of these well-known aliases: * -my- * -shared- * -root-
487
+ # @param [Hash] opts the optional parameters
488
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * association * isLink * isLocked * path * permissions
489
+ # @option opts [String] :relative_path A path relative to the **nodeId**. If you set this, information is returned on the node resolved by this path.
490
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
491
+ # @return [Array<(NodeEntry, Fixnum, Hash)>] NodeEntry data, response status code and response headers
492
+ def get_node_with_http_info(node_id, opts = {})
493
+ if @api_client.config.debugging
494
+ @api_client.config.logger.debug "Calling API: NodesApi.get_node ..."
495
+ end
496
+ # verify the required parameter 'node_id' is set
497
+ if @api_client.config.client_side_validation && node_id.nil?
498
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.get_node"
499
+ end
500
+ # resource path
501
+ local_var_path = "/nodes/{nodeId}".sub('{' + 'nodeId' + '}', node_id.to_s)
502
+
503
+ # query parameters
504
+ query_params = {}
505
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
506
+ query_params[:'relativePath'] = opts[:'relative_path'] if !opts[:'relative_path'].nil?
507
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
508
+
509
+ # header parameters
510
+ header_params = {}
511
+ # HTTP header 'Accept' (if needed)
512
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
513
+ # HTTP header 'Content-Type'
514
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
515
+
516
+ # form parameters
517
+ form_params = {}
518
+
519
+ # http body (model)
520
+ post_body = nil
521
+ auth_names = ['basicAuth']
522
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
523
+ :header_params => header_params,
524
+ :query_params => query_params,
525
+ :form_params => form_params,
526
+ :body => post_body,
527
+ :auth_names => auth_names,
528
+ :return_type => 'NodeEntry')
529
+ if @api_client.config.debugging
530
+ @api_client.config.logger.debug "API called: NodesApi#get_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
531
+ end
532
+ return data, status_code, headers
533
+ end
534
+
535
+ # Get node content
536
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets the content of the node with identifier **nodeId**.
537
+ # @param node_id The identifier of a node.
538
+ # @param [Hash] opts the optional parameters
539
+ # @option opts [BOOLEAN] :attachment **true** enables a web browser to download the file as an attachment. **false** means a web browser may preview the file in a new tab or window, but not download the file. You can only set this parameter to **false** if the content type of the file is in the supported list; for example, certain image files and PDF files. If the content type is not supported for preview, then a value of **false** is ignored, and the attachment will be returned in the response. (default to true)
540
+ # @option opts [DateTime] :if_modified_since Only returns the content if it has been modified since the date provided. Use the date format defined by HTTP. For example, &#x60;Wed, 09 Mar 2016 16:56:34 GMT&#x60;.
541
+ # @return [nil]
542
+ def get_node_content(node_id, opts = {})
543
+ get_node_content_with_http_info(node_id, opts)
544
+ return nil
545
+ end
546
+
547
+ # Get node content
548
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets the content of the node with identifier **nodeId**.
549
+ # @param node_id The identifier of a node.
550
+ # @param [Hash] opts the optional parameters
551
+ # @option opts [BOOLEAN] :attachment **true** enables a web browser to download the file as an attachment. **false** means a web browser may preview the file in a new tab or window, but not download the file. You can only set this parameter to **false** if the content type of the file is in the supported list; for example, certain image files and PDF files. If the content type is not supported for preview, then a value of **false** is ignored, and the attachment will be returned in the response.
552
+ # @option opts [DateTime] :if_modified_since Only returns the content if it has been modified since the date provided. Use the date format defined by HTTP. For example, &#x60;Wed, 09 Mar 2016 16:56:34 GMT&#x60;.
553
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
554
+ def get_node_content_with_http_info(node_id, opts = {})
555
+ if @api_client.config.debugging
556
+ @api_client.config.logger.debug "Calling API: NodesApi.get_node_content ..."
557
+ end
558
+ # verify the required parameter 'node_id' is set
559
+ if @api_client.config.client_side_validation && node_id.nil?
560
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.get_node_content"
561
+ end
562
+ # resource path
563
+ local_var_path = "/nodes/{nodeId}/content".sub('{' + 'nodeId' + '}', node_id.to_s)
564
+
565
+ # query parameters
566
+ query_params = {}
567
+ query_params[:'attachment'] = opts[:'attachment'] if !opts[:'attachment'].nil?
568
+
569
+ # header parameters
570
+ header_params = {}
571
+ # HTTP header 'Accept' (if needed)
572
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
573
+ # HTTP header 'Content-Type'
574
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
575
+ header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?
576
+
577
+ # form parameters
578
+ form_params = {}
579
+
580
+ # http body (model)
581
+ post_body = nil
582
+ auth_names = ['basicAuth']
583
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
584
+ :header_params => header_params,
585
+ :query_params => query_params,
586
+ :form_params => form_params,
587
+ :body => post_body,
588
+ :auth_names => auth_names)
589
+ if @api_client.config.debugging
590
+ @api_client.config.logger.debug "API called: NodesApi#get_node_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
591
+ end
592
+ return data, status_code, headers
593
+ end
594
+
595
+ # List node children
596
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of children of the parent node **nodeId**. Minimal information for each child is returned by default. You can use the **include** parameter to return additional information. The list of child nodes includes primary children and secondary children, if there are any. You can use the **include** parameter (include=association) to return child association details for each child, including the **assocTyp**e and the **isPrimary** flag. The default sort order for the returned list is for folders to be sorted before files, and by ascending name. You can override the default using **orderBy** to specify one or more fields to sort by. The default order is always ascending, but you can use an optional **ASC** or **DESC** modifier to specify an ascending or descending sort order. For example, specifying ```orderBy=name DESC``` returns a mixed folder/file list in descending **name** order. You can use any of the following fields to order the results: * isFolder * name * mimeType * nodeType * sizeInBytes * modifiedAt * createdAt * modifiedByUser * createdByUser
597
+ # @param node_id The identifier of a node. You can also use one of these well-known aliases: * -my- * -shared- * -root-
598
+ # @param [Hash] opts the optional parameters
599
+ # @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. (default to 0)
600
+ # @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100)
601
+ # @option opts [Array<String>] :order_by A string to control the order of the entities returned in a list. You can use the **orderBy** parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the **ASC** and **DESC** keywords for any field.
602
+ # @option opts [String] :where Optionally filter the list. Here are some examples: * &#x60;&#x60;&#x60;where&#x3D;(isFolder&#x3D;true)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(isFile&#x3D;true)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(nodeType&#x3D;&#39;my:specialNodeType&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(nodeType&#x3D;&#39;my:specialNodeType INCLUDESUBTYPES&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(isPrimary&#x3D;true)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(assocType&#x3D;&#39;my:specialAssocType&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(isPrimary&#x3D;false and assocType&#x3D;&#39;my:specialAssocType&#39;)&#x60;&#x60;&#x60;
603
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * aspectNames * association * isLink * isLocked * path * properties * permissions
604
+ # @option opts [String] :relative_path Return information on children in the folder resolved by this path. The path is relative to **nodeId**.
605
+ # @option opts [BOOLEAN] :include_source Also include **source** in addition to **entries** with folder information on the parent node – either the specified parent **nodeId**, or as resolved by **relativePath**.
606
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
607
+ # @return [NodeChildAssociationPaging]
608
+ def list_node_children(node_id, opts = {})
609
+ data, _status_code, _headers = list_node_children_with_http_info(node_id, opts)
610
+ return data
611
+ end
612
+
613
+ # List node children
614
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of children of the parent node **nodeId**. Minimal information for each child is returned by default. You can use the **include** parameter to return additional information. The list of child nodes includes primary children and secondary children, if there are any. You can use the **include** parameter (include&#x3D;association) to return child association details for each child, including the **assocTyp**e and the **isPrimary** flag. The default sort order for the returned list is for folders to be sorted before files, and by ascending name. You can override the default using **orderBy** to specify one or more fields to sort by. The default order is always ascending, but you can use an optional **ASC** or **DESC** modifier to specify an ascending or descending sort order. For example, specifying &#x60;&#x60;&#x60;orderBy&#x3D;name DESC&#x60;&#x60;&#x60; returns a mixed folder/file list in descending **name** order. You can use any of the following fields to order the results: * isFolder * name * mimeType * nodeType * sizeInBytes * modifiedAt * createdAt * modifiedByUser * createdByUser
615
+ # @param node_id The identifier of a node. You can also use one of these well-known aliases: * -my- * -shared- * -root-
616
+ # @param [Hash] opts the optional parameters
617
+ # @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0.
618
+ # @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100.
619
+ # @option opts [Array<String>] :order_by A string to control the order of the entities returned in a list. You can use the **orderBy** parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the **ASC** and **DESC** keywords for any field.
620
+ # @option opts [String] :where Optionally filter the list. Here are some examples: * &#x60;&#x60;&#x60;where&#x3D;(isFolder&#x3D;true)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(isFile&#x3D;true)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(nodeType&#x3D;&#39;my:specialNodeType&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(nodeType&#x3D;&#39;my:specialNodeType INCLUDESUBTYPES&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(isPrimary&#x3D;true)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(assocType&#x3D;&#39;my:specialAssocType&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(isPrimary&#x3D;false and assocType&#x3D;&#39;my:specialAssocType&#39;)&#x60;&#x60;&#x60;
621
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * aspectNames * association * isLink * isLocked * path * properties * permissions
622
+ # @option opts [String] :relative_path Return information on children in the folder resolved by this path. The path is relative to **nodeId**.
623
+ # @option opts [BOOLEAN] :include_source Also include **source** in addition to **entries** with folder information on the parent node – either the specified parent **nodeId**, or as resolved by **relativePath**.
624
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
625
+ # @return [Array<(NodeChildAssociationPaging, Fixnum, Hash)>] NodeChildAssociationPaging data, response status code and response headers
626
+ def list_node_children_with_http_info(node_id, opts = {})
627
+ if @api_client.config.debugging
628
+ @api_client.config.logger.debug "Calling API: NodesApi.list_node_children ..."
629
+ end
630
+ # verify the required parameter 'node_id' is set
631
+ if @api_client.config.client_side_validation && node_id.nil?
632
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.list_node_children"
633
+ end
634
+ if @api_client.config.client_side_validation && !opts[:'skip_count'].nil? && opts[:'skip_count'] < 0
635
+ fail ArgumentError, 'invalid value for "opts[:"skip_count"]" when calling NodesApi.list_node_children, must be greater than or equal to 0.'
636
+ end
637
+
638
+ if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] < 1
639
+ fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling NodesApi.list_node_children, must be greater than or equal to 1.'
640
+ end
641
+
642
+ # resource path
643
+ local_var_path = "/nodes/{nodeId}/children".sub('{' + 'nodeId' + '}', node_id.to_s)
644
+
645
+ # query parameters
646
+ query_params = {}
647
+ query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil?
648
+ query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil?
649
+ query_params[:'orderBy'] = @api_client.build_collection_param(opts[:'order_by'], :csv) if !opts[:'order_by'].nil?
650
+ query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
651
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
652
+ query_params[:'relativePath'] = opts[:'relative_path'] if !opts[:'relative_path'].nil?
653
+ query_params[:'includeSource'] = opts[:'include_source'] if !opts[:'include_source'].nil?
654
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
655
+
656
+ # header parameters
657
+ header_params = {}
658
+ # HTTP header 'Accept' (if needed)
659
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
660
+ # HTTP header 'Content-Type'
661
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
662
+
663
+ # form parameters
664
+ form_params = {}
665
+
666
+ # http body (model)
667
+ post_body = nil
668
+ auth_names = ['basicAuth']
669
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
670
+ :header_params => header_params,
671
+ :query_params => query_params,
672
+ :form_params => form_params,
673
+ :body => post_body,
674
+ :auth_names => auth_names,
675
+ :return_type => 'NodeChildAssociationPaging')
676
+ if @api_client.config.debugging
677
+ @api_client.config.logger.debug "API called: NodesApi#list_node_children\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
678
+ end
679
+ return data, status_code, headers
680
+ end
681
+
682
+ # List parents
683
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of parent nodes that are associated with the current child **nodeId**. The list includes both the primary parent and any secondary parents.
684
+ # @param node_id The identifier of a child node. You can also use one of these well-known aliases: * -my- * -shared- * -root-
685
+ # @param [Hash] opts the optional parameters
686
+ # @option opts [String] :where Optionally filter the list by **assocType** and/or **isPrimary**. Here are some example filters: * &#x60;&#x60;&#x60;where&#x3D;(assocType&#x3D;&#39;my:specialAssocType&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(isPrimary&#x3D;true)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(isPrimary&#x3D;false and assocType&#x3D;&#39;my:specialAssocType&#39;)&#x60;&#x60;&#x60;
687
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * aspectNames * isLink * isLocked * path * properties
688
+ # @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. (default to 0)
689
+ # @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100)
690
+ # @option opts [BOOLEAN] :include_source Also include **source** (in addition to **entries**) with folder information on **nodeId**
691
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
692
+ # @return [NodeAssociationPaging]
693
+ def list_parents(node_id, opts = {})
694
+ data, _status_code, _headers = list_parents_with_http_info(node_id, opts)
695
+ return data
696
+ end
697
+
698
+ # List parents
699
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of parent nodes that are associated with the current child **nodeId**. The list includes both the primary parent and any secondary parents.
700
+ # @param node_id The identifier of a child node. You can also use one of these well-known aliases: * -my- * -shared- * -root-
701
+ # @param [Hash] opts the optional parameters
702
+ # @option opts [String] :where Optionally filter the list by **assocType** and/or **isPrimary**. Here are some example filters: * &#x60;&#x60;&#x60;where&#x3D;(assocType&#x3D;&#39;my:specialAssocType&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(isPrimary&#x3D;true)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(isPrimary&#x3D;false and assocType&#x3D;&#39;my:specialAssocType&#39;)&#x60;&#x60;&#x60;
703
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * aspectNames * isLink * isLocked * path * properties
704
+ # @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0.
705
+ # @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100.
706
+ # @option opts [BOOLEAN] :include_source Also include **source** (in addition to **entries**) with folder information on **nodeId**
707
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
708
+ # @return [Array<(NodeAssociationPaging, Fixnum, Hash)>] NodeAssociationPaging data, response status code and response headers
709
+ def list_parents_with_http_info(node_id, opts = {})
710
+ if @api_client.config.debugging
711
+ @api_client.config.logger.debug "Calling API: NodesApi.list_parents ..."
712
+ end
713
+ # verify the required parameter 'node_id' is set
714
+ if @api_client.config.client_side_validation && node_id.nil?
715
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.list_parents"
716
+ end
717
+ if @api_client.config.client_side_validation && !opts[:'skip_count'].nil? && opts[:'skip_count'] < 0
718
+ fail ArgumentError, 'invalid value for "opts[:"skip_count"]" when calling NodesApi.list_parents, must be greater than or equal to 0.'
719
+ end
720
+
721
+ if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] < 1
722
+ fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling NodesApi.list_parents, must be greater than or equal to 1.'
723
+ end
724
+
725
+ # resource path
726
+ local_var_path = "/nodes/{nodeId}/parents".sub('{' + 'nodeId' + '}', node_id.to_s)
727
+
728
+ # query parameters
729
+ query_params = {}
730
+ query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
731
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
732
+ query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil?
733
+ query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil?
734
+ query_params[:'includeSource'] = opts[:'include_source'] if !opts[:'include_source'].nil?
735
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
736
+
737
+ # header parameters
738
+ header_params = {}
739
+ # HTTP header 'Accept' (if needed)
740
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
741
+ # HTTP header 'Content-Type'
742
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
743
+
744
+ # form parameters
745
+ form_params = {}
746
+
747
+ # http body (model)
748
+ post_body = nil
749
+ auth_names = ['basicAuth']
750
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
751
+ :header_params => header_params,
752
+ :query_params => query_params,
753
+ :form_params => form_params,
754
+ :body => post_body,
755
+ :auth_names => auth_names,
756
+ :return_type => 'NodeAssociationPaging')
757
+ if @api_client.config.debugging
758
+ @api_client.config.logger.debug "API called: NodesApi#list_parents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
759
+ end
760
+ return data, status_code, headers
761
+ end
762
+
763
+ # List secondary children
764
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of secondary child nodes that are associated with the current parent **nodeId**, via a secondary child association.
765
+ # @param node_id The identifier of a parent node. You can also use one of these well-known aliases: * -my- * -shared- * -root-
766
+ # @param [Hash] opts the optional parameters
767
+ # @option opts [String] :where Optionally filter the list by assocType. Here&#39;s an example: * &#x60;&#x60;&#x60;where&#x3D;(assocType&#x3D;&#39;my:specialAssocType&#39;)&#x60;&#x60;&#x60;
768
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * aspectNames * isLink * isLocked * path * properties
769
+ # @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. (default to 0)
770
+ # @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100)
771
+ # @option opts [BOOLEAN] :include_source Also include **source** (in addition to **entries**) with folder information on **nodeId**
772
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
773
+ # @return [NodeChildAssociationPaging]
774
+ def list_secondary_children(node_id, opts = {})
775
+ data, _status_code, _headers = list_secondary_children_with_http_info(node_id, opts)
776
+ return data
777
+ end
778
+
779
+ # List secondary children
780
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of secondary child nodes that are associated with the current parent **nodeId**, via a secondary child association.
781
+ # @param node_id The identifier of a parent node. You can also use one of these well-known aliases: * -my- * -shared- * -root-
782
+ # @param [Hash] opts the optional parameters
783
+ # @option opts [String] :where Optionally filter the list by assocType. Here&#39;s an example: * &#x60;&#x60;&#x60;where&#x3D;(assocType&#x3D;&#39;my:specialAssocType&#39;)&#x60;&#x60;&#x60;
784
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * aspectNames * isLink * isLocked * path * properties
785
+ # @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0.
786
+ # @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100.
787
+ # @option opts [BOOLEAN] :include_source Also include **source** (in addition to **entries**) with folder information on **nodeId**
788
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
789
+ # @return [Array<(NodeChildAssociationPaging, Fixnum, Hash)>] NodeChildAssociationPaging data, response status code and response headers
790
+ def list_secondary_children_with_http_info(node_id, opts = {})
791
+ if @api_client.config.debugging
792
+ @api_client.config.logger.debug "Calling API: NodesApi.list_secondary_children ..."
793
+ end
794
+ # verify the required parameter 'node_id' is set
795
+ if @api_client.config.client_side_validation && node_id.nil?
796
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.list_secondary_children"
797
+ end
798
+ if @api_client.config.client_side_validation && !opts[:'skip_count'].nil? && opts[:'skip_count'] < 0
799
+ fail ArgumentError, 'invalid value for "opts[:"skip_count"]" when calling NodesApi.list_secondary_children, must be greater than or equal to 0.'
800
+ end
801
+
802
+ if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] < 1
803
+ fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling NodesApi.list_secondary_children, must be greater than or equal to 1.'
804
+ end
805
+
806
+ # resource path
807
+ local_var_path = "/nodes/{nodeId}/secondary-children".sub('{' + 'nodeId' + '}', node_id.to_s)
808
+
809
+ # query parameters
810
+ query_params = {}
811
+ query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
812
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
813
+ query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil?
814
+ query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil?
815
+ query_params[:'includeSource'] = opts[:'include_source'] if !opts[:'include_source'].nil?
816
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
817
+
818
+ # header parameters
819
+ header_params = {}
820
+ # HTTP header 'Accept' (if needed)
821
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
822
+ # HTTP header 'Content-Type'
823
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
824
+
825
+ # form parameters
826
+ form_params = {}
827
+
828
+ # http body (model)
829
+ post_body = nil
830
+ auth_names = ['basicAuth']
831
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
832
+ :header_params => header_params,
833
+ :query_params => query_params,
834
+ :form_params => form_params,
835
+ :body => post_body,
836
+ :auth_names => auth_names,
837
+ :return_type => 'NodeChildAssociationPaging')
838
+ if @api_client.config.debugging
839
+ @api_client.config.logger.debug "API called: NodesApi#list_secondary_children\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
840
+ end
841
+ return data, status_code, headers
842
+ end
843
+
844
+ # List source associations
845
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of source nodes that are associated with the current target **nodeId**.
846
+ # @param node_id The identifier of a target node.
847
+ # @param [Hash] opts the optional parameters
848
+ # @option opts [String] :where Optionally filter the list by **assocType**. Here&#39;s an example: * &#x60;&#x60;&#x60;where&#x3D;(assocType&#x3D;&#39;my:specialAssocType&#39;)&#x60;&#x60;&#x60;
849
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * aspectNames * isLink * isLocked * path * properties
850
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
851
+ # @return [NodeAssociationPaging]
852
+ def list_source_associations(node_id, opts = {})
853
+ data, _status_code, _headers = list_source_associations_with_http_info(node_id, opts)
854
+ return data
855
+ end
856
+
857
+ # List source associations
858
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of source nodes that are associated with the current target **nodeId**.
859
+ # @param node_id The identifier of a target node.
860
+ # @param [Hash] opts the optional parameters
861
+ # @option opts [String] :where Optionally filter the list by **assocType**. Here&#39;s an example: * &#x60;&#x60;&#x60;where&#x3D;(assocType&#x3D;&#39;my:specialAssocType&#39;)&#x60;&#x60;&#x60;
862
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * aspectNames * isLink * isLocked * path * properties
863
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
864
+ # @return [Array<(NodeAssociationPaging, Fixnum, Hash)>] NodeAssociationPaging data, response status code and response headers
865
+ def list_source_associations_with_http_info(node_id, opts = {})
866
+ if @api_client.config.debugging
867
+ @api_client.config.logger.debug "Calling API: NodesApi.list_source_associations ..."
868
+ end
869
+ # verify the required parameter 'node_id' is set
870
+ if @api_client.config.client_side_validation && node_id.nil?
871
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.list_source_associations"
872
+ end
873
+ # resource path
874
+ local_var_path = "/nodes/{nodeId}/sources".sub('{' + 'nodeId' + '}', node_id.to_s)
875
+
876
+ # query parameters
877
+ query_params = {}
878
+ query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
879
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
880
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
881
+
882
+ # header parameters
883
+ header_params = {}
884
+ # HTTP header 'Accept' (if needed)
885
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
886
+ # HTTP header 'Content-Type'
887
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
888
+
889
+ # form parameters
890
+ form_params = {}
891
+
892
+ # http body (model)
893
+ post_body = nil
894
+ auth_names = ['basicAuth']
895
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
896
+ :header_params => header_params,
897
+ :query_params => query_params,
898
+ :form_params => form_params,
899
+ :body => post_body,
900
+ :auth_names => auth_names,
901
+ :return_type => 'NodeAssociationPaging')
902
+ if @api_client.config.debugging
903
+ @api_client.config.logger.debug "API called: NodesApi#list_source_associations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
904
+ end
905
+ return data, status_code, headers
906
+ end
907
+
908
+ # List target associations
909
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of target nodes that are associated with the current source **nodeId**.
910
+ # @param node_id The identifier of a source node.
911
+ # @param [Hash] opts the optional parameters
912
+ # @option opts [String] :where Optionally filter the list by **assocType**. Here&#39;s an example: * &#x60;&#x60;&#x60;where&#x3D;(assocType&#x3D;&#39;my:specialAssocType&#39;)&#x60;&#x60;&#x60;
913
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * aspectNames * isLink * isLocked * path * properties
914
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
915
+ # @return [NodeAssociationPaging]
916
+ def list_target_associations(node_id, opts = {})
917
+ data, _status_code, _headers = list_target_associations_with_http_info(node_id, opts)
918
+ return data
919
+ end
920
+
921
+ # List target associations
922
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of target nodes that are associated with the current source **nodeId**.
923
+ # @param node_id The identifier of a source node.
924
+ # @param [Hash] opts the optional parameters
925
+ # @option opts [String] :where Optionally filter the list by **assocType**. Here&#39;s an example: * &#x60;&#x60;&#x60;where&#x3D;(assocType&#x3D;&#39;my:specialAssocType&#39;)&#x60;&#x60;&#x60;
926
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * aspectNames * isLink * isLocked * path * properties
927
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
928
+ # @return [Array<(NodeAssociationPaging, Fixnum, Hash)>] NodeAssociationPaging data, response status code and response headers
929
+ def list_target_associations_with_http_info(node_id, opts = {})
930
+ if @api_client.config.debugging
931
+ @api_client.config.logger.debug "Calling API: NodesApi.list_target_associations ..."
932
+ end
933
+ # verify the required parameter 'node_id' is set
934
+ if @api_client.config.client_side_validation && node_id.nil?
935
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.list_target_associations"
936
+ end
937
+ # resource path
938
+ local_var_path = "/nodes/{nodeId}/targets".sub('{' + 'nodeId' + '}', node_id.to_s)
939
+
940
+ # query parameters
941
+ query_params = {}
942
+ query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
943
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
944
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
945
+
946
+ # header parameters
947
+ header_params = {}
948
+ # HTTP header 'Accept' (if needed)
949
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
950
+ # HTTP header 'Content-Type'
951
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
952
+
953
+ # form parameters
954
+ form_params = {}
955
+
956
+ # http body (model)
957
+ post_body = nil
958
+ auth_names = ['basicAuth']
959
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
960
+ :header_params => header_params,
961
+ :query_params => query_params,
962
+ :form_params => form_params,
963
+ :body => post_body,
964
+ :auth_names => auth_names,
965
+ :return_type => 'NodeAssociationPaging')
966
+ if @api_client.config.debugging
967
+ @api_client.config.logger.debug "API called: NodesApi#list_target_associations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
968
+ end
969
+ return data, status_code, headers
970
+ end
971
+
972
+ # Lock a node
973
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Places a lock on node **nodeId**. **Note:** you can only lock files. More specifically, a node can only be locked if it is of type `cm:content` or a subtype of `cm:content`. The lock is owned by the current user, and prevents other users or processes from making updates to the node until the lock is released. If the **timeToExpire** is not set or is zero, then the lock never expires. Otherwise, the **timeToExpire** is the number of seconds before the lock expires. When a lock expires, the lock is released. If the node is already locked, and the user is the lock owner, then the lock is renewed with the new **timeToExpire**. By default, a lock is applied that allows the owner to update or delete the node. You can use **type** to change the lock type to one of the following: * **ALLOW_OWNER_CHANGES** (default) changes to the node can be made only by the lock owner. This enum is the same value as the deprecated WRITE_LOCK described in `org.alfresco.service.cmr.lock.LockType` in the Alfresco Public Java API. This is the default value. * **FULL** no changes by any user are allowed. This enum is the same value as the deprecated READ_ONLY_LOCK described in `org.alfresco.service.cmr.lock.LockType` in the Alfresco Public Java API. By default, a lock is persisted in the database. You can create a volatile in-memory lock by setting the **lifetime** property to EPHEMERAL. You might choose use EPHEMERAL locks, for example, if you are taking frequent short-term locks that you don't need to be kept over a restart of the repository. In this case you don't need the overhead of writing the locks to the database. If a lock on the node cannot be taken, then an error is returned.
974
+ # @param node_id The identifier of a node.
975
+ # @param node_body_lock Lock details.
976
+ # @param [Hash] opts the optional parameters
977
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * association * isLink * isLocked * path * permissions
978
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
979
+ # @return [NodeEntry]
980
+ def lock_node(node_id, node_body_lock, opts = {})
981
+ data, _status_code, _headers = lock_node_with_http_info(node_id, node_body_lock, opts)
982
+ return data
983
+ end
984
+
985
+ # Lock a node
986
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Places a lock on node **nodeId**. **Note:** you can only lock files. More specifically, a node can only be locked if it is of type &#x60;cm:content&#x60; or a subtype of &#x60;cm:content&#x60;. The lock is owned by the current user, and prevents other users or processes from making updates to the node until the lock is released. If the **timeToExpire** is not set or is zero, then the lock never expires. Otherwise, the **timeToExpire** is the number of seconds before the lock expires. When a lock expires, the lock is released. If the node is already locked, and the user is the lock owner, then the lock is renewed with the new **timeToExpire**. By default, a lock is applied that allows the owner to update or delete the node. You can use **type** to change the lock type to one of the following: * **ALLOW_OWNER_CHANGES** (default) changes to the node can be made only by the lock owner. This enum is the same value as the deprecated WRITE_LOCK described in &#x60;org.alfresco.service.cmr.lock.LockType&#x60; in the Alfresco Public Java API. This is the default value. * **FULL** no changes by any user are allowed. This enum is the same value as the deprecated READ_ONLY_LOCK described in &#x60;org.alfresco.service.cmr.lock.LockType&#x60; in the Alfresco Public Java API. By default, a lock is persisted in the database. You can create a volatile in-memory lock by setting the **lifetime** property to EPHEMERAL. You might choose use EPHEMERAL locks, for example, if you are taking frequent short-term locks that you don&#39;t need to be kept over a restart of the repository. In this case you don&#39;t need the overhead of writing the locks to the database. If a lock on the node cannot be taken, then an error is returned.
987
+ # @param node_id The identifier of a node.
988
+ # @param node_body_lock Lock details.
989
+ # @param [Hash] opts the optional parameters
990
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * association * isLink * isLocked * path * permissions
991
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
992
+ # @return [Array<(NodeEntry, Fixnum, Hash)>] NodeEntry data, response status code and response headers
993
+ def lock_node_with_http_info(node_id, node_body_lock, opts = {})
994
+ if @api_client.config.debugging
995
+ @api_client.config.logger.debug "Calling API: NodesApi.lock_node ..."
996
+ end
997
+ # verify the required parameter 'node_id' is set
998
+ if @api_client.config.client_side_validation && node_id.nil?
999
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.lock_node"
1000
+ end
1001
+ # verify the required parameter 'node_body_lock' is set
1002
+ if @api_client.config.client_side_validation && node_body_lock.nil?
1003
+ fail ArgumentError, "Missing the required parameter 'node_body_lock' when calling NodesApi.lock_node"
1004
+ end
1005
+ # resource path
1006
+ local_var_path = "/nodes/{nodeId}/lock".sub('{' + 'nodeId' + '}', node_id.to_s)
1007
+
1008
+ # query parameters
1009
+ query_params = {}
1010
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
1011
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1012
+
1013
+ # header parameters
1014
+ header_params = {}
1015
+ # HTTP header 'Accept' (if needed)
1016
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1017
+ # HTTP header 'Content-Type'
1018
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1019
+
1020
+ # form parameters
1021
+ form_params = {}
1022
+
1023
+ # http body (model)
1024
+ post_body = @api_client.object_to_http_body(node_body_lock)
1025
+ auth_names = ['basicAuth']
1026
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1027
+ :header_params => header_params,
1028
+ :query_params => query_params,
1029
+ :form_params => form_params,
1030
+ :body => post_body,
1031
+ :auth_names => auth_names,
1032
+ :return_type => 'NodeEntry')
1033
+ if @api_client.config.debugging
1034
+ @api_client.config.logger.debug "API called: NodesApi#lock_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1035
+ end
1036
+ return data, status_code, headers
1037
+ end
1038
+
1039
+ # Move a node
1040
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Move the node **nodeId** to the parent folder node **targetParentId**. The **targetParentId** is specified in the in request body. The moved node retains its name unless you specify a new **name** in the request body. If the source **nodeId** is a folder, then its children are also moved. The move will effectively change the primary parent.
1041
+ # @param node_id The identifier of a node.
1042
+ # @param node_body_move The targetParentId and, optionally, a new name which should include the file extension.
1043
+ # @param [Hash] opts the optional parameters
1044
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * association * isLink * isLocked * path * permissions
1045
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
1046
+ # @return [NodeEntry]
1047
+ def move_node(node_id, node_body_move, opts = {})
1048
+ data, _status_code, _headers = move_node_with_http_info(node_id, node_body_move, opts)
1049
+ return data
1050
+ end
1051
+
1052
+ # Move a node
1053
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Move the node **nodeId** to the parent folder node **targetParentId**. The **targetParentId** is specified in the in request body. The moved node retains its name unless you specify a new **name** in the request body. If the source **nodeId** is a folder, then its children are also moved. The move will effectively change the primary parent.
1054
+ # @param node_id The identifier of a node.
1055
+ # @param node_body_move The targetParentId and, optionally, a new name which should include the file extension.
1056
+ # @param [Hash] opts the optional parameters
1057
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * association * isLink * isLocked * path * permissions
1058
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
1059
+ # @return [Array<(NodeEntry, Fixnum, Hash)>] NodeEntry data, response status code and response headers
1060
+ def move_node_with_http_info(node_id, node_body_move, opts = {})
1061
+ if @api_client.config.debugging
1062
+ @api_client.config.logger.debug "Calling API: NodesApi.move_node ..."
1063
+ end
1064
+ # verify the required parameter 'node_id' is set
1065
+ if @api_client.config.client_side_validation && node_id.nil?
1066
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.move_node"
1067
+ end
1068
+ # verify the required parameter 'node_body_move' is set
1069
+ if @api_client.config.client_side_validation && node_body_move.nil?
1070
+ fail ArgumentError, "Missing the required parameter 'node_body_move' when calling NodesApi.move_node"
1071
+ end
1072
+ # resource path
1073
+ local_var_path = "/nodes/{nodeId}/move".sub('{' + 'nodeId' + '}', node_id.to_s)
1074
+
1075
+ # query parameters
1076
+ query_params = {}
1077
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
1078
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1079
+
1080
+ # header parameters
1081
+ header_params = {}
1082
+ # HTTP header 'Accept' (if needed)
1083
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1084
+ # HTTP header 'Content-Type'
1085
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1086
+
1087
+ # form parameters
1088
+ form_params = {}
1089
+
1090
+ # http body (model)
1091
+ post_body = @api_client.object_to_http_body(node_body_move)
1092
+ auth_names = ['basicAuth']
1093
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1094
+ :header_params => header_params,
1095
+ :query_params => query_params,
1096
+ :form_params => form_params,
1097
+ :body => post_body,
1098
+ :auth_names => auth_names,
1099
+ :return_type => 'NodeEntry')
1100
+ if @api_client.config.debugging
1101
+ @api_client.config.logger.debug "API called: NodesApi#move_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1102
+ end
1103
+ return data, status_code, headers
1104
+ end
1105
+
1106
+ # Unlock a node
1107
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Deletes a lock on node **nodeId**. The current user must be the owner of the locks or have admin rights, otherwise an error is returned. If a lock on the node cannot be released, then an error is returned.
1108
+ # @param node_id The identifier of a node.
1109
+ # @param [Hash] opts the optional parameters
1110
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * association * isLink * isLocked * path * permissions
1111
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
1112
+ # @return [NodeEntry]
1113
+ def unlock_node(node_id, opts = {})
1114
+ data, _status_code, _headers = unlock_node_with_http_info(node_id, opts)
1115
+ return data
1116
+ end
1117
+
1118
+ # Unlock a node
1119
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Deletes a lock on node **nodeId**. The current user must be the owner of the locks or have admin rights, otherwise an error is returned. If a lock on the node cannot be released, then an error is returned.
1120
+ # @param node_id The identifier of a node.
1121
+ # @param [Hash] opts the optional parameters
1122
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * association * isLink * isLocked * path * permissions
1123
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
1124
+ # @return [Array<(NodeEntry, Fixnum, Hash)>] NodeEntry data, response status code and response headers
1125
+ def unlock_node_with_http_info(node_id, opts = {})
1126
+ if @api_client.config.debugging
1127
+ @api_client.config.logger.debug "Calling API: NodesApi.unlock_node ..."
1128
+ end
1129
+ # verify the required parameter 'node_id' is set
1130
+ if @api_client.config.client_side_validation && node_id.nil?
1131
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.unlock_node"
1132
+ end
1133
+ # resource path
1134
+ local_var_path = "/nodes/{nodeId}/unlock".sub('{' + 'nodeId' + '}', node_id.to_s)
1135
+
1136
+ # query parameters
1137
+ query_params = {}
1138
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
1139
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1140
+
1141
+ # header parameters
1142
+ header_params = {}
1143
+ # HTTP header 'Accept' (if needed)
1144
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1145
+ # HTTP header 'Content-Type'
1146
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1147
+
1148
+ # form parameters
1149
+ form_params = {}
1150
+
1151
+ # http body (model)
1152
+ post_body = nil
1153
+ auth_names = ['basicAuth']
1154
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1155
+ :header_params => header_params,
1156
+ :query_params => query_params,
1157
+ :form_params => form_params,
1158
+ :body => post_body,
1159
+ :auth_names => auth_names,
1160
+ :return_type => 'NodeEntry')
1161
+ if @api_client.config.debugging
1162
+ @api_client.config.logger.debug "API called: NodesApi#unlock_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1163
+ end
1164
+ return data, status_code, headers
1165
+ end
1166
+
1167
+ # Update a node
1168
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Updates the node **nodeId**. For example, you can rename a file or folder: ```JSON { \"name\":\"My new name\" } ``` You can also set or update one or more properties: ```JSON { \"properties\": { \"cm:title\":\"Folder title\" } } ``` **Note:** setting properties of type d:content and d:category are not supported. **Note:** if you want to add or remove aspects, then you must use **GET /nodes/{nodeId}** first to get the complete set of *aspectNames*. You can add (or remove) *locallySet* permissions, if any, in addition to any inherited permissions. You can also optionally disable (or re-enable) inherited permissions via *isInheritanceEnabled* flag: ```JSON { \"permissions\": { \"isInheritanceEnabled\": false, \"locallySet\": [ {\"authorityId\": \"GROUP_special\", \"name\": \"Read\", \"accessStatus\":\"DENIED\"}, {\"authorityId\": \"testuser\", \"name\": \"Contributor\", \"accessStatus\":\"ALLOWED\"} ] } } ``` **Note:** if you want to add or remove locally set permissions then you must use **GET /nodes/{nodeId}** first to get the complete set of *locallySet* permissions. **Note:** Currently there is no optimistic locking for updates, so they are applied in \"last one wins\" order.
1169
+ # @param node_id The identifier of a node.
1170
+ # @param node_body_update The node information to update.
1171
+ # @param [Hash] opts the optional parameters
1172
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * association * isLink * isLocked * path * permissions
1173
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
1174
+ # @return [NodeEntry]
1175
+ def update_node(node_id, node_body_update, opts = {})
1176
+ data, _status_code, _headers = update_node_with_http_info(node_id, node_body_update, opts)
1177
+ return data
1178
+ end
1179
+
1180
+ # Update a node
1181
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Updates the node **nodeId**. For example, you can rename a file or folder: &#x60;&#x60;&#x60;JSON { \&quot;name\&quot;:\&quot;My new name\&quot; } &#x60;&#x60;&#x60; You can also set or update one or more properties: &#x60;&#x60;&#x60;JSON { \&quot;properties\&quot;: { \&quot;cm:title\&quot;:\&quot;Folder title\&quot; } } &#x60;&#x60;&#x60; **Note:** setting properties of type d:content and d:category are not supported. **Note:** if you want to add or remove aspects, then you must use **GET /nodes/{nodeId}** first to get the complete set of *aspectNames*. You can add (or remove) *locallySet* permissions, if any, in addition to any inherited permissions. You can also optionally disable (or re-enable) inherited permissions via *isInheritanceEnabled* flag: &#x60;&#x60;&#x60;JSON { \&quot;permissions\&quot;: { \&quot;isInheritanceEnabled\&quot;: false, \&quot;locallySet\&quot;: [ {\&quot;authorityId\&quot;: \&quot;GROUP_special\&quot;, \&quot;name\&quot;: \&quot;Read\&quot;, \&quot;accessStatus\&quot;:\&quot;DENIED\&quot;}, {\&quot;authorityId\&quot;: \&quot;testuser\&quot;, \&quot;name\&quot;: \&quot;Contributor\&quot;, \&quot;accessStatus\&quot;:\&quot;ALLOWED\&quot;} ] } } &#x60;&#x60;&#x60; **Note:** if you want to add or remove locally set permissions then you must use **GET /nodes/{nodeId}** first to get the complete set of *locallySet* permissions. **Note:** Currently there is no optimistic locking for updates, so they are applied in \&quot;last one wins\&quot; order.
1182
+ # @param node_id The identifier of a node.
1183
+ # @param node_body_update The node information to update.
1184
+ # @param [Hash] opts the optional parameters
1185
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * association * isLink * isLocked * path * permissions
1186
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
1187
+ # @return [Array<(NodeEntry, Fixnum, Hash)>] NodeEntry data, response status code and response headers
1188
+ def update_node_with_http_info(node_id, node_body_update, opts = {})
1189
+ if @api_client.config.debugging
1190
+ @api_client.config.logger.debug "Calling API: NodesApi.update_node ..."
1191
+ end
1192
+ # verify the required parameter 'node_id' is set
1193
+ if @api_client.config.client_side_validation && node_id.nil?
1194
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.update_node"
1195
+ end
1196
+ # verify the required parameter 'node_body_update' is set
1197
+ if @api_client.config.client_side_validation && node_body_update.nil?
1198
+ fail ArgumentError, "Missing the required parameter 'node_body_update' when calling NodesApi.update_node"
1199
+ end
1200
+ # resource path
1201
+ local_var_path = "/nodes/{nodeId}".sub('{' + 'nodeId' + '}', node_id.to_s)
1202
+
1203
+ # query parameters
1204
+ query_params = {}
1205
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
1206
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1207
+
1208
+ # header parameters
1209
+ header_params = {}
1210
+ # HTTP header 'Accept' (if needed)
1211
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1212
+ # HTTP header 'Content-Type'
1213
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1214
+
1215
+ # form parameters
1216
+ form_params = {}
1217
+
1218
+ # http body (model)
1219
+ post_body = @api_client.object_to_http_body(node_body_update)
1220
+ auth_names = ['basicAuth']
1221
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1222
+ :header_params => header_params,
1223
+ :query_params => query_params,
1224
+ :form_params => form_params,
1225
+ :body => post_body,
1226
+ :auth_names => auth_names,
1227
+ :return_type => 'NodeEntry')
1228
+ if @api_client.config.debugging
1229
+ @api_client.config.logger.debug "API called: NodesApi#update_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1230
+ end
1231
+ return data, status_code, headers
1232
+ end
1233
+
1234
+ # Update node content
1235
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Updates the content of the node with identifier **nodeId**. The request body for this endpoint can be any text or binary stream. The **majorVersion** and **comment** parameters can be used to control versioning behaviour. If the content is versionable, a new minor version is created by default. Optionally a new **name** parameter can also be specified that must be unique within the parent folder. If specified and valid then this will rename the node. If invalid then an error is returned and the content is not updated. **Note:** This API method accepts any content type, but for testing with this tool text based content can be provided. This is because the OpenAPI Specification does not allow a wildcard to be provided or the ability for tooling to accept an arbitrary file.
1236
+ # @param node_id The identifier of a node.
1237
+ # @param content_body_update The binary content
1238
+ # @param [Hash] opts the optional parameters
1239
+ # @option opts [BOOLEAN] :major_version If **true**, create a major version. Setting this parameter also enables versioning of this node, if it is not already versioned. (default to false)
1240
+ # @option opts [String] :comment Add a version comment which will appear in version history. Setting this parameter also enables versioning of this node, if it is not already versioned.
1241
+ # @option opts [String] :name Optional new name. This should include the file extension. The name must not contain spaces or the following special characters: * \&quot; &lt; &gt; \\ / ? : and |. The character &#x60;.&#x60; must not be used at the end of the name.
1242
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * association * isLink * isLocked * path * permissions
1243
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
1244
+ # @return [NodeEntry]
1245
+ def update_node_content(node_id, content_body_update, opts = {})
1246
+ data, _status_code, _headers = update_node_content_with_http_info(node_id, content_body_update, opts)
1247
+ return data
1248
+ end
1249
+
1250
+ # Update node content
1251
+ # **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Updates the content of the node with identifier **nodeId**. The request body for this endpoint can be any text or binary stream. The **majorVersion** and **comment** parameters can be used to control versioning behaviour. If the content is versionable, a new minor version is created by default. Optionally a new **name** parameter can also be specified that must be unique within the parent folder. If specified and valid then this will rename the node. If invalid then an error is returned and the content is not updated. **Note:** This API method accepts any content type, but for testing with this tool text based content can be provided. This is because the OpenAPI Specification does not allow a wildcard to be provided or the ability for tooling to accept an arbitrary file.
1252
+ # @param node_id The identifier of a node.
1253
+ # @param content_body_update The binary content
1254
+ # @param [Hash] opts the optional parameters
1255
+ # @option opts [BOOLEAN] :major_version If **true**, create a major version. Setting this parameter also enables versioning of this node, if it is not already versioned.
1256
+ # @option opts [String] :comment Add a version comment which will appear in version history. Setting this parameter also enables versioning of this node, if it is not already versioned.
1257
+ # @option opts [String] :name Optional new name. This should include the file extension. The name must not contain spaces or the following special characters: * \&quot; &lt; &gt; \\ / ? : and |. The character &#x60;.&#x60; must not be used at the end of the name.
1258
+ # @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * association * isLink * isLocked * path * permissions
1259
+ # @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
1260
+ # @return [Array<(NodeEntry, Fixnum, Hash)>] NodeEntry data, response status code and response headers
1261
+ def update_node_content_with_http_info(node_id, content_body_update, opts = {})
1262
+ if @api_client.config.debugging
1263
+ @api_client.config.logger.debug "Calling API: NodesApi.update_node_content ..."
1264
+ end
1265
+ # verify the required parameter 'node_id' is set
1266
+ if @api_client.config.client_side_validation && node_id.nil?
1267
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling NodesApi.update_node_content"
1268
+ end
1269
+ # verify the required parameter 'content_body_update' is set
1270
+ if @api_client.config.client_side_validation && content_body_update.nil?
1271
+ fail ArgumentError, "Missing the required parameter 'content_body_update' when calling NodesApi.update_node_content"
1272
+ end
1273
+ if @api_client.config.client_side_validation && !opts[:'name'].nil? && opts[:'name'] !~ Regexp.new(/^(?!(.*[\\\"\\*\\\\\\>\\<\\?\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))/)
1274
+ fail ArgumentError, "invalid value for 'opts[:\"name\"]' when calling NodesApi.update_node_content, must conform to the pattern /^(?!(.*[\\\"\\*\\\\\\>\\<\\?\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))/."
1275
+ end
1276
+
1277
+ # resource path
1278
+ local_var_path = "/nodes/{nodeId}/content".sub('{' + 'nodeId' + '}', node_id.to_s)
1279
+
1280
+ # query parameters
1281
+ query_params = {}
1282
+ query_params[:'majorVersion'] = opts[:'major_version'] if !opts[:'major_version'].nil?
1283
+ query_params[:'comment'] = opts[:'comment'] if !opts[:'comment'].nil?
1284
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
1285
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
1286
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
1287
+
1288
+ # header parameters
1289
+ header_params = {}
1290
+ # HTTP header 'Accept' (if needed)
1291
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1292
+ # HTTP header 'Content-Type'
1293
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])
1294
+
1295
+ # form parameters
1296
+ form_params = {}
1297
+
1298
+ # http body (model)
1299
+ post_body = @api_client.object_to_http_body(content_body_update)
1300
+ auth_names = ['basicAuth']
1301
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1302
+ :header_params => header_params,
1303
+ :query_params => query_params,
1304
+ :form_params => form_params,
1305
+ :body => post_body,
1306
+ :auth_names => auth_names,
1307
+ :return_type => 'NodeEntry')
1308
+ if @api_client.config.debugging
1309
+ @api_client.config.logger.debug "API called: NodesApi#update_node_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1310
+ end
1311
+ return data, status_code, headers
1312
+ end
1313
+ end
1314
+ end