Commit 363a6f5e4a73114c7a34bd9c9b65fadd851be2c0
1 parent
3f3c7020
Remove unnecessary webservice level classes, phase 2, after stash apply git did not delete files
Committed by: Paul Barrett
Showing
3 changed files
with
0 additions
and
389 deletions
webservice/classes/atompub/cmis/NavigationService.inc.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | -require_once KT_LIB_DIR . '/api/ktcmis/ktNavigationService.inc.php'; | |
| 4 | - | |
| 5 | -/** | |
| 6 | - * CMIS Service class which hooks into the KnowledgeTree interface | |
| 7 | - * for processing of CMIS queries and responses via atompub/webservices | |
| 8 | - */ | |
| 9 | - | |
| 10 | -class NavigationService extends KTNavigationService { | |
| 11 | - | |
| 12 | - /** | |
| 13 | - * Get descendents of the specified folder, up to the depth indicated | |
| 14 | - * | |
| 15 | - * @param string $repositoryId | |
| 16 | - * @param string $folderId | |
| 17 | - * @param boolean $includeAllowableActions | |
| 18 | - * @param boolean $includeRelationships | |
| 19 | - * @param string $typeID | |
| 20 | - * @param int $depth | |
| 21 | - * @param string $filter | |
| 22 | - * @return cmisObjectType[] | |
| 23 | - */ | |
| 24 | - public function getDescendants($repositoryId, $folderId, $includeAllowableActions, $includeRelationships, | |
| 25 | - $depth = 1, $typeID = 'Any', $filter = '') | |
| 26 | - { | |
| 27 | - $result = parent::getDescendants($repositoryId, $folderId, $includeAllowableActions, | |
| 28 | - $includeRelationships, $depth, $typeID, $filter); | |
| 29 | - | |
| 30 | - if ($result['status_code'] == 0) | |
| 31 | - { | |
| 32 | - return $result['results']; | |
| 33 | - } | |
| 34 | - } | |
| 35 | - | |
| 36 | - /** | |
| 37 | - * Get direct children of the specified folder | |
| 38 | - * | |
| 39 | - * @param string $repositoryId | |
| 40 | - * @param string $folderId | |
| 41 | - * @param boolean $includeAllowableActions | |
| 42 | - * @param boolean $includeRelationships | |
| 43 | - * @param string $typeID | |
| 44 | - * @param string $filter | |
| 45 | - * @param int $maxItems | |
| 46 | - * @param int $skipCount | |
| 47 | - * @return cmisObjectType[] | |
| 48 | - */ | |
| 49 | - public function getChildren($repositoryId, $folderId, $includeAllowableActions, $includeRelationships, | |
| 50 | - $typeID = 'Any', $filter = '', $maxItems = 0, $skipCount = 0) | |
| 51 | - { | |
| 52 | - $result = parent::getChildren($repositoryId, $folderId, $includeAllowableActions, $includeRelationships, | |
| 53 | - $typeID, $filter, $maxItems, $skipCount); | |
| 54 | - | |
| 55 | - if ($result['status_code'] == 0) | |
| 56 | - { | |
| 57 | - return $result['results']; | |
| 58 | - } | |
| 59 | - } | |
| 60 | - | |
| 61 | - /** | |
| 62 | - * Gets the parent of the selected folder | |
| 63 | - * | |
| 64 | - * @param string $repositoryId | |
| 65 | - * @param string $folderId | |
| 66 | - * @param boolean $includeAllowableActions | |
| 67 | - * @param boolean $includeRelationships | |
| 68 | - * @param boolean $returnToRoot | |
| 69 | - * @param string $filter | |
| 70 | - * @return cmisObjectType[] | |
| 71 | - */ | |
| 72 | - public function getFolderParent($repositoryId, $folderId, $includeAllowableActions, $includeRelationships, $returnToRoot, $filter = '') | |
| 73 | - { | |
| 74 | - $result = parent::getFolderParent($repositoryId, $folderId, $includeAllowableActions, $includeRelationships, $returnToRoot, $filter); | |
| 75 | - | |
| 76 | - if ($result['status_code'] == 0) | |
| 77 | - { | |
| 78 | - return $result['results']; | |
| 79 | - } | |
| 80 | - else { | |
| 81 | - return new PEAR_Error($result['message']); | |
| 82 | - } | |
| 83 | - } | |
| 84 | - | |
| 85 | - /** | |
| 86 | - * Gets the parents for the selected object | |
| 87 | - * | |
| 88 | - * @param string $repositoryId | |
| 89 | - * @param string $folderId | |
| 90 | - * @param boolean $includeAllowableActions | |
| 91 | - * @param boolean $includeRelationships | |
| 92 | - * @param string $filter | |
| 93 | - * @return cmisObjectType[] | |
| 94 | - */ | |
| 95 | - public function getObjectParents($repositoryId, $objectId, $includeAllowableActions, $includeRelationships, $filter = '') | |
| 96 | - { | |
| 97 | - $result = parent::getObjectParents($repositoryId, $objectId, $includeAllowableActions, $includeRelationships, $filter); | |
| 98 | - | |
| 99 | - if ($result['status_code'] == 0) | |
| 100 | - { | |
| 101 | - return $result['results']; | |
| 102 | - } | |
| 103 | - } | |
| 104 | - | |
| 105 | - /** | |
| 106 | - * Returns a list of checked out documents from the selected repository | |
| 107 | - * | |
| 108 | - * @param string $repositoryId | |
| 109 | - * @param string $folderId The folder for which checked out docs are requested | |
| 110 | - * @param string $filter | |
| 111 | - * @param int $maxItems | |
| 112 | - * @param int $skipCount | |
| 113 | - * @return array $checkedout The collection of checked out documents | |
| 114 | - */ | |
| 115 | - function getCheckedOutDocs($repositoryId, $folderId = null, $filter = '', $maxItems = 0, $skipCount = 0) | |
| 116 | - { | |
| 117 | - $result = parent::getCheckedOutDocs($repositoryId, $folderId, $filter, $maxItems, $skipCount); | |
| 118 | - | |
| 119 | - if ($result['status_code'] == 0) | |
| 120 | - { | |
| 121 | - return $result['results']; | |
| 122 | - } | |
| 123 | - } | |
| 124 | - | |
| 125 | -} | |
| 126 | - | |
| 127 | -?> |
webservice/classes/atompub/cmis/ObjectService.inc.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | -require_once KT_LIB_DIR . '/api/ktcmis/ktObjectService.inc.php'; | |
| 4 | - | |
| 5 | -/** | |
| 6 | - * CMIS Service class which hooks into the KnowledgeTree interface | |
| 7 | - * for processing of CMIS queries and responses via atompub/webservices | |
| 8 | - */ | |
| 9 | - | |
| 10 | -class ObjectService extends KTObjectService { | |
| 11 | - | |
| 12 | - /** | |
| 13 | - * Fetches the properties for the specified object | |
| 14 | - * | |
| 15 | - * @param string $repositoryId | |
| 16 | - * @param string $objectId | |
| 17 | - * @param boolean $includeAllowableActions | |
| 18 | - * @param boolean $includeRelationships | |
| 19 | - * @param boolean $returnVersion | |
| 20 | - * @param string $filter | |
| 21 | - * @return object CMIS object properties | |
| 22 | - */ | |
| 23 | - public function getProperties($repositoryId, $objectId, $includeAllowableActions, $includeRelationships, | |
| 24 | - $returnVersion = false, $filter = '') | |
| 25 | - { | |
| 26 | - $result = parent::getProperties($repositoryId, $objectId, $includeAllowableActions, | |
| 27 | - $returnVersion, $filter); | |
| 28 | - | |
| 29 | - if ($result['status_code'] == 0) { | |
| 30 | - return $result['results']; | |
| 31 | - } | |
| 32 | - else { | |
| 33 | - return new PEAR_Error($result['message']); | |
| 34 | - } | |
| 35 | - } | |
| 36 | - | |
| 37 | - /** | |
| 38 | - * Creates a new document within the repository | |
| 39 | - * | |
| 40 | - * @param string $repositoryId The repository to which the document must be added | |
| 41 | - * @param array $properties Array of properties which must be applied to the created document object | |
| 42 | - * @param string $folderId The id of the folder which will be the parent of the created document object | |
| 43 | - * This parameter is optional IF unfilingCapability is supported | |
| 44 | - * @param string $contentStream optional content stream data - expected as a base64 encoded string | |
| 45 | - * @param string $versioningState optional version state value: none/checkedout/major/minor | |
| 46 | - * @param $policies List of policy ids that MUST be applied | |
| 47 | - * @param $addACEs List of ACEs that MUST be added | |
| 48 | - * @param $removeACEs List of ACEs that MUST be removed | |
| 49 | - * @return string $objectId The id of the created folder object | |
| 50 | - */ | |
| 51 | - public function createDocument($repositoryId, $properties, $folderId = null, $contentStream = null, | |
| 52 | - $versioningState = 'none', $policies = array(), $addACEs = array(), | |
| 53 | - $removeACEs = array()) | |
| 54 | - { | |
| 55 | - $result = parent::createDocument($repositoryId, $properties, $folderId, $contentStream, $versioningState, | |
| 56 | - $policies, $addACEs, $removeACEs); | |
| 57 | - | |
| 58 | - if ($result['status_code'] == 0) { | |
| 59 | - return $result['results']; | |
| 60 | - } | |
| 61 | - else { | |
| 62 | - return new PEAR_Error($result['message']); | |
| 63 | - } | |
| 64 | - } | |
| 65 | - | |
| 66 | - /** | |
| 67 | - * Creates a new folder within the repository | |
| 68 | - * | |
| 69 | - * @param string $repositoryId The repository to which the folder must be added | |
| 70 | - * @param string $typeId Object Type id for the folder object being created | |
| 71 | - * @param array $properties Array of properties which must be applied to the created folder object | |
| 72 | - * @param string $folderId The id of the folder which will be the parent of the created folder object | |
| 73 | - * @return string $objectId The id of the created folder object | |
| 74 | - */ | |
| 75 | - public function createFolder($repositoryId, $typeId, $properties, $folderId) | |
| 76 | - { | |
| 77 | - $result = parent::createFolder($repositoryId, $typeId, $properties, $folderId); | |
| 78 | - | |
| 79 | - if ($result['status_code'] == 0) { | |
| 80 | - return $result['results']; | |
| 81 | - } | |
| 82 | - else { | |
| 83 | - return new PEAR_Error($result['message']); | |
| 84 | - } | |
| 85 | - } | |
| 86 | - | |
| 87 | - /** | |
| 88 | - * Fetches the content stream data for an object | |
| 89 | - * | |
| 90 | - * @param string $repositoryId | |
| 91 | - * @param string $objectId | |
| 92 | - * @param string $streamId [optional for documents] Specifies the rendition to retrieve if not original document | |
| 93 | - * @return string $contentStream (binary or text data) | |
| 94 | - */ | |
| 95 | - function getContentStream($repositoryId, $objectId, $streamId = null) | |
| 96 | - { | |
| 97 | - $result = parent::getContentStream($repositoryId, $objectId, $streamId); | |
| 98 | - | |
| 99 | - if ($result['status_code'] == 0) { | |
| 100 | - return $result['results']; | |
| 101 | - } | |
| 102 | - else { | |
| 103 | - return new PEAR_Error($result['message']); | |
| 104 | - } | |
| 105 | - } | |
| 106 | - | |
| 107 | - /** | |
| 108 | - * Moves a fileable object from one folder to another. | |
| 109 | - * | |
| 110 | - * @param object $repositoryId | |
| 111 | - * @param object $objectId | |
| 112 | - * @param object $changeToken [optional] | |
| 113 | - * @param object $targetFolderId | |
| 114 | - * @param object $sourceFolderId [optional] | |
| 115 | - */ | |
| 116 | - public function moveObject($repositoryId, $objectId, $changeToken = '', $targetFolderId, $sourceFolderId = null) | |
| 117 | - { | |
| 118 | - $result = parent::moveObject($repositoryId, $objectId, $changeToken, $targetFolderId, $sourceFolderId); | |
| 119 | - | |
| 120 | - if ($result['status_code'] == 0) { | |
| 121 | - return $result['results']; | |
| 122 | - } | |
| 123 | - else { | |
| 124 | - return new PEAR_Error($result['message']); | |
| 125 | - } | |
| 126 | - } | |
| 127 | - | |
| 128 | - /** | |
| 129 | - * Deletes an object from the repository | |
| 130 | - * | |
| 131 | - * @param string $repositoryId | |
| 132 | - * @param string $objectId | |
| 133 | - * @param string $changeToken [optional] | |
| 134 | - * @return boolean true on success, false on failure | |
| 135 | - */ | |
| 136 | - // NOTE Invoking this service method on an object SHALL not delete the entire version series for a Document Object. | |
| 137 | - // To delete an entire version series, use the deleteAllVersions() service | |
| 138 | - public function deleteObject($repositoryId, $objectId, $changeToken = null) | |
| 139 | - { | |
| 140 | - $result = parent::deleteObject($repositoryId, $objectId, $changeToken); | |
| 141 | - | |
| 142 | - if ($result['status_code'] == 0) { | |
| 143 | - return $result['results']; | |
| 144 | - } | |
| 145 | - else { | |
| 146 | - return new PEAR_Error($result['message']); | |
| 147 | - } | |
| 148 | - } | |
| 149 | - | |
| 150 | - /** | |
| 151 | - * Deletes an entire tree including all subfolders and other filed objects | |
| 152 | - * | |
| 153 | - * @param string $repositoryId | |
| 154 | - * @param string $objectId | |
| 155 | - * @param string $changeToken [optional] | |
| 156 | - * @param boolean $unfileNonfolderObject [optional] - note that since KnowledgeTree does not allow unfiling this will be ignored | |
| 157 | - * @param boolean $continueOnFailure [optional] - note that since KnowledgeTree does not allow continue on failure this will be ignored | |
| 158 | - * @return array $failedToDelete A list of identifiers of objects in the folder tree that were not deleted. | |
| 159 | - */ | |
| 160 | - public function deleteTree($repositoryId, $objectId, $changeToken = null, $unfileNonfolderObject = 'delete', $continueOnFailure = false) | |
| 161 | - { | |
| 162 | - $result = parent::deleteTree($repositoryId, $objectId, $changeToken, $unfileNonfolderObject, $continueOnFailure); | |
| 163 | - | |
| 164 | - if ($result['status_code'] == 0) { | |
| 165 | - return $result['results']; | |
| 166 | - } | |
| 167 | - else if (is_array($result['message'])) { | |
| 168 | - return $result['message']; | |
| 169 | - } | |
| 170 | - else { | |
| 171 | - return new PEAR_Error($result['message']); | |
| 172 | - } | |
| 173 | - } | |
| 174 | - | |
| 175 | -} | |
| 176 | - | |
| 177 | -?> |
webservice/classes/atompub/cmis/RepositoryService.inc.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | -/** | |
| 4 | - * CMIS Service class which hooks into the KnowledgeTree interface | |
| 5 | - * for processing of CMIS queries and responses via atompub/webservices | |
| 6 | - */ | |
| 7 | - | |
| 8 | -require_once KT_LIB_DIR . '/api/ktcmis/ktRepositoryService.inc.php'; | |
| 9 | - | |
| 10 | -class RepositoryService extends KTRepositoryService { | |
| 11 | - | |
| 12 | - /** | |
| 13 | - * Fetches a list of available repositories | |
| 14 | - * | |
| 15 | - * @return cmisRepositoryEntryType[] | |
| 16 | - */ | |
| 17 | - public function getRepositories() | |
| 18 | - { | |
| 19 | - $result = parent::getRepositories(); | |
| 20 | - | |
| 21 | - if ($result['status_code'] == 0) | |
| 22 | - { | |
| 23 | - return $result['results']; | |
| 24 | - } | |
| 25 | - } | |
| 26 | - | |
| 27 | - /** | |
| 28 | - * Fetches information about the selected repository | |
| 29 | - * | |
| 30 | - * @param string $repositoryId | |
| 31 | - * @return cmisRepositoryInfoType | |
| 32 | - */ | |
| 33 | - public function getRepositoryInfo($repositoryId) | |
| 34 | - { | |
| 35 | - $result = parent::getRepositoryInfo($repositoryId); | |
| 36 | - | |
| 37 | - if ($result['status_code'] == 0) | |
| 38 | - { | |
| 39 | - return $result['results']; | |
| 40 | - } | |
| 41 | - } | |
| 42 | - | |
| 43 | - /** | |
| 44 | - * Fetch the list of supported object types for the selected repository | |
| 45 | - * | |
| 46 | - * @param string $repositoryId The ID of the repository for which object types must be returned | |
| 47 | - * @param string $typeId The type to return, ALL if not set | |
| 48 | - * @param boolean $returnPropertyDefinitions Return property definitions as well if TRUE | |
| 49 | - * @param int $maxItems The maximum number of items to return | |
| 50 | - * @param int $skipCount The number of items to skip before starting to return results | |
| 51 | - * @param boolean $hasMoreItems TRUE if there are more items to return than were requested | |
| 52 | - * @return cmisTypeDefinitionType[] | |
| 53 | - */ | |
| 54 | - public function getTypes($repositoryId, $typeId = '', $returnPropertyDefinitions = false, | |
| 55 | - $maxItems = 0, $skipCount = 0, &$hasMoreItems = false) | |
| 56 | - { | |
| 57 | - $result = parent::getTypes($repositoryId, $typeId, $returnPropertyDefinitions, | |
| 58 | - $maxItems, $skipCount, $hasMoreItems); | |
| 59 | - | |
| 60 | - if ($result['status_code'] == 0) | |
| 61 | - { | |
| 62 | - return $result['results']; | |
| 63 | - } | |
| 64 | - } | |
| 65 | - | |
| 66 | - /** | |
| 67 | - * Fetch the object type definition for the requested type | |
| 68 | - * | |
| 69 | - * @param string $repositoryId | |
| 70 | - * @param string $typeId | |
| 71 | - * @return cmisTypeDefinitionType | |
| 72 | - */ | |
| 73 | - public function getTypeDefinition($repositoryId, $typeId) | |
| 74 | - { | |
| 75 | - $result = parent::getTypeDefinition($repositoryId, $typeId); | |
| 76 | - | |
| 77 | - if ($result['status_code'] == 0) | |
| 78 | - { | |
| 79 | - return $result['results']; | |
| 80 | - } | |
| 81 | - } | |
| 82 | - | |
| 83 | -} | |
| 84 | - | |
| 85 | -?> |