コード例 #1
0
 /**
  * get default view.
  *
  * @return Enum
  */
 public function getDefaultView()
 {
     if (!$this->mRoot->mContext->mUser->mIdentity->isAuthenticated()) {
         return $this->_getFrameViewStatus('ERROR');
     }
     $this->mHandler =& Cosmoapi_Utils::getTrustModuleHandler('data', $this->mAsset->mTrustDirname);
     $this->_getId();
     if (!$this->mHandler->setDirname($this->mDirname)) {
         return $this->_getFrameViewStatus('ERROR');
     }
     $req = $this->mRoot->mContext->mRequest;
     $key = $req->getRequest('key');
     $value = $req->getRequest('value');
     $this->mResult = $this->mHandler->update($this->mDataId, $key, $value);
     return $this->_getFrameViewStatus('SUCCESS');
 }
コード例 #2
0
 /**
  * get default view.
  *
  * @return Enum
  */
 public function getDefaultView()
 {
     if (!$this->mRoot->mContext->mUser->mIdentity->isAuthenticated()) {
         return $this->_getFrameViewStatus('ERROR');
     }
     $this->mHandler =& Cosmoapi_Utils::getTrustModuleHandler('data', $this->mAsset->mTrustDirname);
     $this->_getId();
     if (!$this->mHandler->setDirname($this->mDirname)) {
         return $this->_getFrameViewStatus('ERROR');
     }
     $req = $this->mRoot->mContext->mRequest;
     $path = $req->getRequest('path');
     $file = new XCube_FormFile('file');
     $this->mResult = $this->mHandler->upload($this->mDataId, $path, $file);
     return $this->_getFrameViewStatus('SUCCESS');
 }
コード例 #3
0
 /**
  * get default view.
  *
  * @return Enum
  */
 public function getDefaultView()
 {
     if (!$this->mRoot->mContext->mUser->mIdentity->isAuthenticated()) {
         return $this->_getFrameViewStatus('ERROR');
     }
     $this->mHandler =& Cosmoapi_Utils::getTrustModuleHandler('data', $this->mAsset->mTrustDirname);
     $this->_getId();
     if (!$this->mHandler->setDirname($this->mDirname)) {
         return $this->_getFrameViewStatus('ERROR');
     }
     $this->mObject =& $this->mHandler->get($this->mDataId);
     if (!$this->mObject) {
         return $this->_getFrameViewStatus('ERROR');
     }
     return $this->_getFrameViewStatus('SUCCESS');
 }
コード例 #4
0
 /**
  * get default view.
  *
  * @return Enum
  */
 public function getDefaultView()
 {
     if (!$this->mRoot->mContext->mUser->mIdentity->isAuthenticated()) {
         return $this->_getFrameViewStatus('ERROR');
     }
     $this->mHandler =& Cosmoapi_Utils::getTrustModuleHandler('data', $this->mAsset->mTrustDirname);
     $this->_getDirname();
     if (!$this->mHandler->setDirname($this->mDirname)) {
         return $this->_getFrameViewStatus('ERROR');
     }
     $req = $this->mRoot->mContext->mRequest;
     $keyword = '';
     $this->mSearchCriteria['keyword'] = $keyword;
     $this->mDataIds = $this->mHandler->getIds();
     if ($this->mDataIds === false) {
         return $this->_getFrameViewStatus('ERROR');
     }
     return $this->_getFrameViewStatus('SUCCESS');
 }