コード例 #1
0
 /**
  * Deals with GET actions for Private Working Copies.
  * This includes individual Private Working Copy retrieval 
  */
 public function GET_action()
 {
     $RepositoryService = new RepositoryService();
     $ObjectService = new ObjectService(KT_cmis_atom_service_helper::getKt());
     $repositories = $RepositoryService->getRepositories();
     $repositoryId = $repositories[0]['repositoryId'];
     // determine whether we want the Private Working Copy entry feed or the actual physical Private Working Copy content.
     // this depends on $this->params[1]
     if (!empty($this->params[1])) {
         $this->getContentStream($ObjectService, $repositoryId);
         return null;
     }
     $feed = KT_cmis_atom_service_helper::getObjectFeed($this, $ObjectService, $repositoryId, $this->params[0]);
     //Expose the responseFeed
     $this->responseFeed = $feed;
 }
コード例 #2
0
 public function POST_action()
 {
     $repositoryId = KT_cmis_atom_service_helper::getRepositoryId($RepositoryService);
     $VersioningService = new VersioningService(KT_cmis_atom_service_helper::getKt());
     $ObjectService = new ObjectService(KT_cmis_atom_service_helper::getKt());
     $cmisObjectProperties = KT_cmis_atom_service_helper::getCmisProperties($this->parsedXMLContent['@children']);
     // check for existing object id as property of submitted object data
     if (empty($cmisObjectProperties['ObjectId'])) {
         $feed = KT_cmis_atom_service_helper::getErrorFeed($this, self::STATUS_SERVER_ERROR, 'No object was specified for checkout');
         // Expose the responseFeed
         $this->responseFeed = $feed;
         return null;
     }
     $response = $VersioningService->checkOut($repositoryId, $cmisObjectProperties['ObjectId']);
     if (PEAR::isError($response)) {
         $feed = KT_cmis_atom_service_helper::getErrorFeed($this, self::STATUS_SERVER_ERROR, 'No object was specified for checkout');
         // Expose the responseFeed
         $this->responseFeed = $feed;
         return null;
     }
     $this->setStatus(self::STATUS_CREATED);
     $feed = KT_cmis_atom_service_helper::getObjectFeed($this, $ObjectService, $repositoryId, $cmisObjectProperties['ObjectId'], 'POST');
     // Expose the responseFeed
     $this->responseFeed = $feed;
 }