/** * 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'); }
/** * 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'); }
/** * 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'); }
/** * 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'); }
public function update($dataId, $key, $value) { $compHandler =& Cosmoapi_Utils::getTrustModuleHandler('component', COSMOAPI_TRUST_DIRNAME); $compHandler->setDirname($this->mDirname); return $compHandler->update($dataId, $key, $value); }