forked from soundasleep/cmis
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcmis.api.inc
executable file
·201 lines (153 loc) · 7.06 KB
/
cmis.api.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<?php
/**
* @file
* CMIS 0.5 client implementation
*
* @todo
* Document all CMIS calls
* Update methods signatures to match CMIS specs
*/
/*
* Repository services
*/
function cmisapi_getRepositories($endpoint_service) {
return cmis_vendor_invoke('getRepositories', $endpoint_service);
}
function cmisapi_getRepositoryInfo() {
return cmis_vendor_invoke('getRepositoryInfo');
}
function cmisapi_getTypes($repositoryId, $typeId = NULL) {
return cmis_vendor_invoke('getTypes', $repositoryId, $typeId);
}
function cmisapi_getTypeDefinition($repositoryId, $typeId, $options = array()) {
return cmis_vendor_invoke('getTypeDefinition', $repositoryId, $typeId, $options);
}
function cmisapi_getObjectTypeDefinition($repositoryId, $objectId) {
return cmis_vendor_invoke('getObjectTypeDefinition', $repositoryId, $objectId);
}
/*
* Navigation servicies
*/
function cmisapi_getFolderTree($repositoryId, $folderId, $depth, $options = array()) {
return cmis_vendor_invoke('getFolderTree', $repositoryId, $folderId, $depth, $options);
}
function cmisapi_getDescendants($repositoryId, $folderId) {
return cmis_vendor_invoke('getDescendants', $repositoryId, $folderId);
}
function cmisapi_getChildren($repositoryId, $objectId, $options = array()) {
return cmis_vendor_invoke('getChildren', $repositoryId, $objectId, $options);
}
function cmisapi_getFolderParent($repositoryId, $objectId, $options = array()) {
return cmis_vendor_invoke('getFolderParent', $repositoryId, $objectId, $options);
}
function cmisapi_getObjectParents($repositoryId, $objectId, $options = array()) {
return cmis_vendor_invoke('getObjectParents', $repositoryId, $objectId, $options);
}
function cmisapi_getCheckedOutDocs($repositoryId, $options = array()) {
return cmis_vendor_invoke('getCheckedOutDocs', $repositoryId, $options);
}
/*
* Object services
*/
function cmisapi_getObject($repositoryId, $objectId, $options = array()) {
return cmis_vendor_invoke('getObject', $repositoryId, $objectId, $options);
}
function cmisapi_getObjectByPath($repositoryId, $path, $options = array()) {
return cmis_vendor_invoke('getObjectByPath', $repositoryId, $path, $options);
}
function cmisapi_createDocument($repositoryId, $folderId, $fileName, $properties=array(), $content=null, $contentType = "application/octet-stream", $options = array()) {
return cmis_vendor_invoke('createDocument', $repositoryId, $folderId, $fileName, $properties, $content, $contentType, $options);
}
function cmisapi_createFolder($repositoryId, $folderId, $folderName, $properties=array(),$options=array()) {
return cmis_vendor_invoke('createFolder', $repositoryId, $folderId, $folderName, $properties, $options);
}
function cmisapi_createRelationship($repositoryId, $typeId, $properties, $sourceObjectId, $targetObjectId) {
return cmis_vendor_invoke('createRelationship', $repositoryId, $typeId, $properties, $sourceObjectId, $targetObjectId);
}
function cmisapi_createPolicy($repositoryId, $typeId, $properties, $folderId) {
return cmis_vendor_invoke('createPolicy', $repositoryId, $typeId, $properties, $folderId);
}
function cmisapi_getAllowableActions($repositoryId, $objectId, $options = array()) {
return cmis_vendor_invoke('getAllowableActions', $repositoryId, $objectId, $options);
}
function cmisapi_getRenditions($repositoryId, $objectId, $options = array()) {
return cmis_vendor_invoke('getProperties', $repositoryId, $objectId, $options);
}
function cmisapi_getProperties($repositoryId, $objectId, $options = array()) {
return cmis_vendor_invoke('getProperties', $repositoryId, $objectId, $options);
}
function cmisapi_getContentStream($repositoryId, $objectId, $options = array()) {
return cmis_vendor_invoke('getContentStream', $repositoryId, $objectId, $options);
}
function cmisapi_updateProperties($repositoryId, $objectId, $properties = array(), $options = array(), $aspects = array()) {
return cmis_vendor_invoke('updateProperties', $repositoryId, $objectId, $properties, $options, $aspects);
}
function cmisapi_moveObject($repositoryId, $objectId, $targetFolderId, $sourceFolderId = NULL, $options = array()) {
return cmis_vendor_invoke('moveObject', $repositoryId, $objectId, $targetFolderId, $sourceFolderId, $options);
}
function cmisapi_deleteObject($repositoryId, $objectId, $options = array()) {
return cmis_vendor_invoke('deleteObject', $repositoryId, $objectId, $options);
}
function cmisapi_deleteTree($repositoryId, $folderId, $unfileNonfolderObjects) {
return cmis_vendor_invoke('deleteTree', $repositoryId, $folderId, $unfileNonfolderObjects);
}
function cmisapi_setContentStream($repositoryId, $objectId, $content = NULL, $contentType = NULL, $options = array()) {
return cmis_vendor_invoke('setContentStream', $repositoryId, $objectId, $content, $contentType, $options);
}
function cmisapi_deleteContentStream($repositoryId, $objectId, $options = array()) {
return cmis_vendor_invoke('deleteContentStream', $repositoryId, $objectId, $options);
}
/*
* Multi-filling services
*/
function cmisapi_addObjectToFolder($repositoryId, $objectId, $folderId) {
return cmis_vendor_invoke('addObjectToFolder', $repositoryId, $objectId, $folderId);
}
function cmisapi_removeObjectFromFolder($repositoryId, $objectId, $folderId = NULL) {
return cmis_vendor_invoke('removeObjectFromFolder', $repositoryId, $objectId, $folderId);
}
/*
* Discovery servicies
*/
function cmisapi_query($repositoryId, $statement, $options = array()) {
return cmis_vendor_invoke('query', $repositoryId, $statement, $options);
}
/*
* Versioning services
*/
function cmisapi_checkOut($repositoryId, $documentId) {
return cmis_vendor_invoke('checkOut', $repositoryId, $objectId);
}
function cmisapi_cancelCheckOut($repositoryId, $documentId) {
return cmis_vendor_invoke('cancelCheckOut', $repositoryId, $objectId);
}
function cmisapi_checkIn($repositoryId, $documentId, $major = NULL, $bag = NULL, $content = NULL, $checkinComment = NULL) {
return cmis_vendor_invoke('checkIn', $repositoryId, $documentId, $major, $bag, $content, $checkinComment);
}
function cmisapi_getPropertiesOfLatestVersion($repositoryId, $versionSeriesId) {
return cmis_vendor_invoke('getPropertiesOfLatestVersion', $repositoryId, $versionSeriesId);
}
function cmisapi_getAllVersions($repositoryId, $versionSeriesId) {
return cmis_vendor_invoke('getAllVersions', $repositoryId, $versionSeriesId);
}
function cmisapi_deleteAllVersions($repositoryId, $versionSeriesId) {
return cmis_vendor_invoke('deleteAllVersions', $repositoryId, $versionSeriesId);
}
/*
* Relationships services
*/
function cmisapi_getRelationships($repositoryId, $objectId) {
return cmis_vendor_invoke('getRelationships', $repositoryId, $objectId);
}
/*
* Policy services
*/
function cmisapi_applyPolicy($repositoryId, $policyId, $objectId) {
return cmis_vendor_invoke('applyPolicy', $repositoryId, $policyId, $objectId);
}
function cmisapi_removePolicy($repositoryId, $policyId, $objectId) {
return cmis_vendor_invoke('removePolicy', $repositoryId, $policyId, $objectId);
}
function cmisapi_getAppliedPolicies($repositoryId, $objectId) {
return cmis_vendor_invoke('getAppliedPolicies', $repositoryId, $objectId);
}