Commit c885e9085a303c7a45fd5867f538699c5b360e36

Authored by Charl Joseph Mert
1 parent 3db79943

Update KT CMIS implementation to 1.0 compliance

PT:2295472

Partial commit that includes changes to some atompub responses.

Committed by: Charl Joseph Mert
Reviewed by: Paul Barrett
webservice/atompub/cmis/index.php
... ... @@ -101,12 +101,12 @@ if ($workspace == 'servicedocument')
101 101 */
102 102 // TODO consider a registerServices function which will, dependant on what is requested, register the appropriate services, keep the logic out of the index file
103 103 $APP->registerService('dms', 'folder', 'KT_cmis_atom_service_folder', 'Root Folder Children Collection',
104   - array(rawurlencode($APP->repositoryInfo['rootFolderId']), 'children'), 'rootchildren');
  104 + array(rawurlencode($APP->repositoryInfo['rootFolderId']), 'children'), 'root');
105 105 $APP->registerService('dms', 'folder', 'KT_cmis_atom_service_folder', 'Root Folder Children Collection',
106 106 array(rawurlencode($APP->repositoryInfo['rootFolderId']), 'descendants'), 'rootdescendants');
107 107 $APP->registerService('dms', 'checkedout', 'KT_cmis_atom_service_checkedout', 'Checked Out Document Collection', null,
108 108 'checkedout', 'application/atom+xml;type=entry');
109   -$APP->registerService('dms', 'types', 'KT_cmis_atom_service_types', 'Object Type Collection', null, 'typeschildren');
  109 +$APP->registerService('dms', 'types', 'KT_cmis_atom_service_types', 'Object Type Collection', null, 'types');
110 110 $APP->registerService('dms', 'types', 'KT_cmis_atom_service_types', 'Object Type Collection', null, 'typesdescendants');
111 111  
112 112 if ($workspace != 'servicedocument')
... ...
webservice/classes/atompub/cmis/KT_cmis_atom_responseFeed.inc.php
... ... @@ -19,7 +19,8 @@ class KT_cmis_atom_responseFeed extends KT_atom_responseFeed {
19 19  
20 20 // append additional tags
21 21 $this->feed->appendChild($this->newAttr('xmlns:app', 'http://www.w3.org/2007/app'));
22   - $this->feed->appendChild($this->newAttr('xmlns:cmis', 'http://docs.oasis-open.org/ns/cmis/core/200901'));
  22 + $this->feed->appendChild($this->newAttr('xmlns:cmis', 'http://docs.oasis-open.org/ns/cmis/core/200908'));
  23 + $this->feed->appendChild($this->newAttr('xmlns:cmisra', 'http://docs.oasis-open.org/ns/cmis/restatom/200908/'));
23 24  
24 25 // require the workspace for creating links within responses
25 26 $queryArray = split('/', trim($_SERVER['QUERY_STRING'], '/'));
... ... @@ -93,4 +94,4 @@ class KT_cmis_atom_ResponseFeed_PUT extends KT_cmis_atom_responseFeed{}
93 94 class KT_cmis_atom_ResponseFeed_POST extends KT_cmis_atom_responseFeed{}
94 95 class KT_cmis_atom_ResponseFeed_DELETE extends KT_cmis_atom_responseFeed{}
95 96  
96   -?>
97 97 \ No newline at end of file
  98 +?>
... ...
webservice/classes/atompub/cmis/KT_cmis_atom_server.inc.php
... ... @@ -83,7 +83,7 @@ class KT_cmis_atom_server extends KT_atom_server {
83 83 $ws->appendChild($service->newAttr('cmis:repositoryRelationship', $this->repositoryInfo['repositoryRelationship']));
84 84  
85 85 // repository information
86   - $element = $service->newElement('cmis:repositoryInfo');
  86 + $element = $service->newElement('cmisra:repositoryInfo');
87 87 foreach($this->repositoryInfo as $key => $repoData)
88 88 {
89 89 if ($key == 'rootFolderId') {
... ...
webservice/classes/atompub/cmis/KT_cmis_atom_serviceDoc.inc.php
... ... @@ -71,7 +71,8 @@ class KT_cmis_atom_serviceDoc extends KT_atom_serviceDoc {
71 71 $service = $this->newElement('service');
72 72 $service->appendChild($this->newAttr('xmlns', 'http://www.w3.org/2007/app'));
73 73 $service->appendChild($this->newAttr('xmlns:atom', 'http://www.w3.org/2005/Atom'));
74   - $service->appendChild($this->newAttr('xmlns:cmis', 'http://docs.oasis-open.org/ns/cmis/core/200901'));
  74 + $service->appendChild($this->newAttr('xmlns:cmis', 'http://docs.oasis-open.org/ns/cmis/core/200908'));
  75 + $service->appendChild($this->newAttr('xmlns:cmisra', 'http://docs.oasis-open.org/ns/cmis/restatom/200908/'));
75 76 $this->service =& $service;
76 77 $this->DOM->appendChild($this->service);
77 78 }
... ... @@ -80,7 +81,7 @@ class KT_cmis_atom_serviceDoc extends KT_atom_serviceDoc {
80 81 {
81 82 $collection=$this->newElement('collection');
82 83 $collection->appendChild($this->newAttr('href', $url));
83   - $collection->appendChild($this->newAttr('cmis:collectionType', $cmisCollectionType));
  84 + $collection->appendChild($this->newAttr('cmisra:collectionType', $cmisCollectionType));
84 85 $collection->appendChild($this->newElement('atom:title', $title));
85 86 if (!is_null($accept)) {
86 87 $collection->appendChild($this->newElement('accept', $accept));
... ... @@ -123,4 +124,4 @@ class KT_cmis_atom_serviceDoc extends KT_atom_serviceDoc {
123 124 */
124 125  
125 126  
126   -?>
127 127 \ No newline at end of file
  128 +?>
... ...