Commit 7261621a05bc48ff055fff4b050b9ecf9b6cdcb7

Authored by Paul Barrett
1 parent 3fb10316

Update CMIS capabilities definition

Committed by: Paul Barrett
lib/api/ktcmis/classes/CMISRepositoryCapabilities.inc.php
... ... @@ -46,20 +46,34 @@
46 46 */
47 47  
48 48 class CMISRepositoryCapabilities {
49   -
50   - // boolean values
51   - protected $capabilityMultifiling;
52   - protected $capabilityUnfiling;
53   - protected $capabilityVersionSpecificFiling;
54   - protected $capabilityPWCUpdateable;
55   - protected $capabilityPWCSearchable;
56   - protected $capabilityAllVersionsSearchable;
57   -
58   - // non-boolean values
59   - // TODO these should be defined as classes/enums which will only accept the defined values when set
60   - protected $capabilityQuery;
61   - protected $capabilityFullText;
62   - protected $capabilityJoin;
  49 +
  50 + // TODO we need an enum equivalent class which can be used to define acceptable values for all which are not boolean
  51 +
  52 + // navigation capabilities
  53 + protected $capabilityGetDescendants; // true/false
  54 + protected $capabilityGetFolderTree; // true/false
  55 +
  56 + // object capabilities
  57 + protected $capabilityContentStreamUpdatability; // none/anytime/pwconly
  58 + protected $capabilityChanges; // none/objectidsonly/properties/all
  59 + protected $capabilityRenditions; // none/read
  60 +
  61 + // filing capabilities
  62 + protected $capabilityMultifiling; // true/false
  63 + protected $capabilityUnfiling; // true/false
  64 + protected $capabilityVersionSpecificFiling; // true/false
  65 +
  66 + // versioning capabilities
  67 + protected $capabilityPWCUpdateable; // true/false
  68 + protected $capabilityPWCSearchable; // true/false
  69 + protected $capabilityAllVersionsSearchable; // true/false
  70 +
  71 + // query capabilities
  72 + protected $capabilityQuery; // none/metadataonly/fulltextonly/bothseparate/bothcombined
  73 + protected $capabilityJoin; // none/inneronly/innerandouter
  74 +
  75 + // acl capabilities
  76 + protected $capabilityACL; // none/discover/manage
63 77  
64 78 /**
65 79 * Set a single field value
... ... @@ -67,90 +81,105 @@ class CMISRepositoryCapabilities {
67 81 * @param string $field
68 82 * @param string/int $value
69 83 * @return a collection of repository entries
  84 + *
  85 + * TODO when we have the enum class in place we will need to check whether the value is of type enum and call its set function
  86 + * to ensure that the rules are followed
70 87 */
71 88 function setFieldValue($field, $value)
72 89 {
73 90 $this->{$field} = ($value == 'true' ? true : ($value == 'false' ? false : $value));
74 91 }
75   -
  92 +
76 93 /**
77 94 * Gets the value of the capabilityMultifiling property.
78 95 *
79 96 */
80   - public function hasCapabilityMultifiling() {
81   - return $this->capabilityMultifiling;
  97 + public function hasCapabilityGetDescendants() {
  98 + return $this->capabilityGetDescendants;
82 99 }
83   -
  100 +
84 101 /**
85   - * Sets the value of the capabilityMultifiling property.
  102 + * Gets the value of the capabilityMultifiling property.
86 103 *
87 104 */
88   - public function setCapabilityMultifiling($value) {
89   - $this->capabilityMultifiling = $value;
  105 + public function hasCapabilityGetFolderTree() {
  106 + return $this->capabilityGetFolderTree;
90 107 }
91   -
  108 +
92 109 /**
93   - * Gets the value of the capabilityUnfiling property.
  110 + * Gets the value of the capabilityContentStreamUpdatability property.
  111 + *
  112 + * @return
  113 + * possible object is
  114 + * {@link EnumCapabilityContentStreamUpdatability }
94 115 *
95 116 */
96   - public function hasCapabilityUnfiling() {
97   - return $this->capabilityUnfiling;
  117 + public function getCapabilityContentStreamUpdatability() {
  118 + return $this->capabilityContentStreamUpdatability;
98 119 }
99   -
  120 +
100 121 /**
101   - * Sets the value of the capabilityUnfiling property.
  122 + * Gets the value of the capabilityChanges property.
  123 + *
  124 + * @return
  125 + * possible object is
  126 + * {@link EnumCapabilityChanges }
102 127 *
103 128 */
104   - public function setCapabilityUnfiling($value) {
105   - $this->capabilityUnfiling = $value;
  129 + public function getCapabilityChanges() {
  130 + return $this->capabilityChanges;
106 131 }
107   -
  132 +
108 133 /**
109   - * Gets the value of the capabilityVersionSpecificFiling property.
  134 + * Gets the value of the capabilityRenditions property.
  135 + *
  136 + * @return
  137 + * possible object is
  138 + * {@link EnumCapabilityRenditions }
110 139 *
111 140 */
112   - public function hasCapabilityVersionSpecificFiling() {
113   - return $this->capabilityVersionSpecificFiling;
  141 + public function getCapabilityRenditions() {
  142 + return $this->capabilityRenditions;
114 143 }
115   -
  144 +
116 145 /**
117   - * Sets the value of the capabilityVersionSpecificFiling property.
  146 + * Gets the value of the capabilityMultifiling property.
118 147 *
119 148 */
120   - public function setCapabilityVersionSpecificFiling($value) {
121   - $this->capabilityVersionSpecificFiling = $value;
  149 + public function hasCapabilityMultifiling() {
  150 + return $this->capabilityMultifiling;
122 151 }
123 152  
124 153 /**
125   - * Gets the value of the capabilityPWCUpdateable property.
  154 + * Gets the value of the capabilityUnfiling property.
126 155 *
127 156 */
128   - public function hasCapabilityPWCUpdateable() {
129   - return $this->capabilityPWCUpdateable;
  157 + public function hasCapabilityUnfiling() {
  158 + return $this->capabilityUnfiling;
130 159 }
131   -
  160 +
132 161 /**
133   - * Sets the value of the capabilityPWCUpdateable property.
  162 + * Gets the value of the capabilityVersionSpecificFiling property.
134 163 *
135 164 */
136   - public function setCapabilityPWCUpdateable($value) {
137   - $this->capabilityPWCUpdateable = $value;
  165 + public function hasCapabilityVersionSpecificFiling() {
  166 + return $this->capabilityVersionSpecificFiling;
138 167 }
139 168  
140 169 /**
141   - * Gets the value of the capabilityPWCSearchable property.
  170 + * Gets the value of the capabilityPWCUpdateable property.
142 171 *
143 172 */
144   - public function hasCapabilityPWCSearchable() {
145   - return $this->capabilityPWCSearchable;
  173 + public function hasCapabilityPWCUpdateable() {
  174 + return $this->capabilityPWCUpdateable;
146 175 }
147 176  
148 177 /**
149   - * Sets the value of the capabilityPWCSearchable property.
  178 + * Gets the value of the capabilityPWCSearchable property.
150 179 *
151 180 */
152   - public function setCapabilityPWCSearchable($value) {
153   - $this->capabilityPWCSearchable = $value;
  181 + public function hasCapabilityPWCSearchable() {
  182 + return $this->capabilityPWCSearchable;
154 183 }
155 184  
156 185 /**
... ... @@ -160,15 +189,7 @@ class CMISRepositoryCapabilities {
160 189 public function hasCapabilityAllVersionsSearchable() {
161 190 return $this->capabilityAllVersionsSearchable;
162 191 }
163   -
164   - /**
165   - * Sets the value of the capabilityAllVersionsSearchable property.
166   - *
167   - */
168   - public function setCapabilityAllVersionsSearchable($value) {
169   - $this->capabilityAllVersionsSearchable = $value;
170   - }
171   -
  192 +
172 193 /**
173 194 * Gets the value of the capabilityQuery property.
174 195 *
... ... @@ -182,18 +203,6 @@ class CMISRepositoryCapabilities {
182 203 }
183 204  
184 205 /**
185   - * Sets the value of the capabilityQuery property.
186   - *
187   - * @param value
188   - * allowed object is
189   - * {@link EnumCapabilityQuery }
190   - *
191   - */
192   - public function setCapabilityQuery($value) {
193   - $this->capabilityQuery = $value;
194   - }
195   -
196   - /**
197 206 * Gets the value of the capabilityJoin property.
198 207 *
199 208 * @return
... ... @@ -206,39 +215,15 @@ class CMISRepositoryCapabilities {
206 215 }
207 216  
208 217 /**
209   - * Sets the value of the capabilityJoin property.
210   - *
211   - * @param value
212   - * allowed object is
213   - * {@link EnumCapabilityJoin }
214   - *
215   - */
216   - public function setCapabilityJoin($value) {
217   - $this->capabilityJoin = $value;
218   - }
219   -
220   - /**
221   - * Gets the value of the capabilityFullText property.
  218 + * Gets the value of the capabilityACL property.
222 219 *
223 220 * @return
224 221 * possible object is
225   - * {@link EnumCapabilityFullText }
226   - *
227   - */
228   - public function getCapabilityFullText() {
229   - return $this->capabilityFullText;
230   - }
231   -
232   - /**
233   - * Sets the value of the capabilityFullText property.
234   - *
235   - * @param value
236   - * allowed object is
237   - * {@link EnumCapabilityFullText }
  222 + * {@link EnumCapabilityACL }
238 223 *
239 224 */
240   - public function setCapabilityFullText($value) {
241   - $this->capabilityFullText = $value;
  225 + public function getCapabilityACL() {
  226 + return $this->capabilityACL;
242 227 }
243 228  
244 229 // /**
... ...
lib/api/ktcmis/config/repositories.xml
... ... @@ -40,9 +40,9 @@
40 40 <capabilityPWCUpdateable>false</capabilityPWCUpdateable>
41 41 <capabilityPWCSearchable>false</capabilityPWCSearchable>
42 42 <capabilityAllVersionsSearchable>false</capabilityAllVersionsSearchable>
43   - <capabilityQuery>None</capabilityQuery>
44   - <capabilityJoin>NoJoin</capabilityJoin>
45   - <capabilityACL>none</capabilityACL>
  43 + <capabilityQuery>none</capabilityQuery>
  44 + <capabilityJoin>none</capabilityJoin>
  45 + <capabilityACL>none</capabilityACL>
46 46 </repositoryCapabilities>
47 47 <supportedTypes>
48 48 <objectType>Document</objectType>
... ...