Commit 8f96850bcdba8fb430dd75c103924af477a57b62

Authored by Jarrett Jordaan
1 parent 4631ab27

Updated cmis properties

Commited by:Jarrett Jordaan

Reviewed by:Paul Barrett
lib/api/ktcmis/classes/CMISPropertyCollection.inc.php
@@ -46,6 +46,7 @@ @@ -46,6 +46,7 @@
46 abstract class CMISPropertyCollection { 46 abstract class CMISPropertyCollection {
47 47
48 static $ObjectId; 48 static $ObjectId;
  49 + static $BaseType;
49 static $URI; 50 static $URI;
50 static $ObjectTypeId; 51 static $ObjectTypeId;
51 static $CreatedBy; 52 static $CreatedBy;
@@ -59,11 +60,15 @@ abstract class CMISPropertyCollection { @@ -59,11 +60,15 @@ abstract class CMISPropertyCollection {
59 60
60 function __construct() 61 function __construct()
61 { 62 {
62 - $this->propertyTypes = array('ObjectId' => 'propertyId', 'BaseType' => 'propertyString',  
63 - 'ObjectTypeId' => 'propertyString', 'CreatedBy' => 'propertyString',  
64 - 'CreationDate' => 'propertyDateTime', 'LastModifiedBy' => 'propertyString',  
65 - 'LastModificationDate' => 'propertyDateTime', 'Name' => 'propertyString',  
66 - 'ParentId' => 'propertyId'); 63 + $this->propertyTypes = array('ObjectId' => 'propertyId',
  64 + 'BaseType' => 'propertyString',
  65 + 'ObjectTypeId' => 'propertyString',
  66 + 'CreatedBy' => 'propertyString',
  67 + 'CreationDate' => 'propertyDateTime',
  68 + 'LastModifiedBy' => 'propertyString',
  69 + 'LastModificationDate' => 'propertyDateTime',
  70 + 'Name' => 'propertyString',
  71 + 'ParentId' => 'propertyId');
67 } 72 }
68 73
69 /** 74 /**
lib/api/ktcmis/objecttypes/CMISDocumentObject.inc.php
@@ -119,6 +119,8 @@ class CMISDocumentObject extends CMISBaseObject { @@ -119,6 +119,8 @@ class CMISDocumentObject extends CMISBaseObject {
119 $this->_setPropertyInternal('URI', $uri); 119 $this->_setPropertyInternal('URI', $uri);
120 // TODO what is this? Assuming it is the object type id, and not OUR document type? 120 // TODO what is this? Assuming it is the object type id, and not OUR document type?
121 $this->_setPropertyInternal('ObjectTypeId', $this->getAttribute('typeId')); 121 $this->_setPropertyInternal('ObjectTypeId', $this->getAttribute('typeId'));
  122 + // Needed to distinguish type
  123 + $this->_setPropertyInternal('BaseType', strtolower($this->getAttribute('typeId')));
122 $this->_setPropertyInternal('CreatedBy', $objectProperties['created_by']); 124 $this->_setPropertyInternal('CreatedBy', $objectProperties['created_by']);
123 $this->_setPropertyInternal('CreationDate', $objectProperties['created_date']); 125 $this->_setPropertyInternal('CreationDate', $objectProperties['created_date']);
124 $this->_setPropertyInternal('LastModifiedBy', $objectProperties['modified_by']); 126 $this->_setPropertyInternal('LastModifiedBy', $objectProperties['modified_by']);
lib/api/ktcmis/objecttypes/CMISFolderObject.inc.php
@@ -97,6 +97,8 @@ class CMISFolderObject extends CMISBaseObject { @@ -97,6 +97,8 @@ class CMISFolderObject extends CMISBaseObject {
97 $this->_setPropertyInternal('URI', $uri); 97 $this->_setPropertyInternal('URI', $uri);
98 // TODO what is this? Assuming it is the object type id, and not OUR document type? 98 // TODO what is this? Assuming it is the object type id, and not OUR document type?
99 $this->_setPropertyInternal('ObjectTypeId', $this->getAttribute('typeId')); 99 $this->_setPropertyInternal('ObjectTypeId', $this->getAttribute('typeId'));
  100 + // Needed to distinguish type
  101 + $this->_setPropertyInternal('BaseType', strtolower($this->getAttribute('typeId')));
100 $this->_setPropertyInternal('CreatedBy', $objectProperties['created_by']); 102 $this->_setPropertyInternal('CreatedBy', $objectProperties['created_by']);
101 // TODO cannot currently retrieve via ktapi or regular folder code - add as with created by 103 // TODO cannot currently retrieve via ktapi or regular folder code - add as with created by
102 $this->_setPropertyInternal('CreationDate', $objectProperties['created_date']); 104 $this->_setPropertyInternal('CreationDate', $objectProperties['created_date']);
lib/api/ktcmis/util/CMISUtil.inc.php
@@ -224,6 +224,8 @@ class CMISUtil { @@ -224,6 +224,8 @@ class CMISUtil {
224 // TODO additional properties to be returned 224 // TODO additional properties to be returned
225 $hierarchy[$key]['properties']['ObjectId'] = array('type' => $properties->getFieldType('ObjectId'), 225 $hierarchy[$key]['properties']['ObjectId'] = array('type' => $properties->getFieldType('ObjectId'),
226 'value' => $properties->getValue('ObjectId')); 226 'value' => $properties->getValue('ObjectId'));
  227 + $hierarchy[$key]['properties']['BaseType'] = array('type' => $properties->getFieldType('BaseType'),
  228 + 'value' => $properties->getValue('BaseType'));
227 $hierarchy[$key]['properties']['ObjectTypeId'] = array('type' => $properties->getFieldType('ObjectTypeId'), 229 $hierarchy[$key]['properties']['ObjectTypeId'] = array('type' => $properties->getFieldType('ObjectTypeId'),
228 'value' => $properties->getValue('ObjectTypeId')); 230 'value' => $properties->getValue('ObjectTypeId'));
229 $hierarchy[$key]['properties']['Name'] = array('type' => $properties->getFieldType('Name'), 231 $hierarchy[$key]['properties']['Name'] = array('type' => $properties->getFieldType('Name'),