当前位置: 首页>>代码示例>>PHP>>正文


PHP myNotificationMgr类代码示例

本文整理汇总了PHP中myNotificationMgr的典型用法代码示例。如果您正苦于以下问题:PHP myNotificationMgr类的具体用法?PHP myNotificationMgr怎么用?PHP myNotificationMgr使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了myNotificationMgr类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getClientNotificationAction

 /**
  * Return the notifications for a specific entry id and type
  * 
  * @action getClientNotification
  * @param string $entryId
  * @param KalturaNotificationType $type
  * @return KalturaClientNotification
  */
 function getClientNotificationAction($entryId, $type)
 {
     // in case of a multirequest, a mediaService.addFromUploadedFile may fail and therefore the resulting entry id will be empty
     // in such a case return immidiately without looking for the notification
     if ($entryId == '') {
         throw new KalturaAPIException(KalturaErrors::NOTIFICATION_FOR_ENTRY_NOT_FOUND, $entryId);
     }
     $notifications = BatchJobPeer::retrieveByEntryIdAndType($entryId, BatchJobType::NOTIFICATION, $type);
     // FIXME: throw error if not found
     if (count($notifications) == 0) {
         throw new KalturaAPIException(KalturaErrors::NOTIFICATION_FOR_ENTRY_NOT_FOUND, $entryId);
     }
     $notification = $notifications[0];
     $partnerId = $this->getPartnerId();
     $nofication_config_str = null;
     list($nofity, $nofication_config_str) = myPartnerUtils::shouldNotify($partnerId);
     if (!$nofity) {
         return new KalturaClientNotification();
     }
     $nofication_config = myNotificationsConfig::getInstance($nofication_config_str);
     $nofity_send_type = $nofication_config->shouldNotify($type);
     if ($nofity_send_type != myNotificationMgr::NOTIFICATION_MGR_SEND_SYNCH && $nofity_send_type != myNotificationMgr::NOTIFICATION_MGR_SEND_BOTH) {
         return new KalturaClientNotification();
     }
     $partner = PartnerPeer::retrieveByPK($partnerId);
     list($url, $signatureKey) = myNotificationMgr::getPartnerNotificationInfo($partner);
     list($params, $rawSignature) = myNotificationMgr::prepareNotificationData($url, $signatureKey, $notification, null);
     $serializedParams = http_build_query($params, "", "&");
     $result = new KalturaClientNotification();
     $result->url = $url;
     $result->data = $serializedParams;
     return $result;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:41,代码来源:NotificationService.php

示例2: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     if (!$puser_kuser) {
         $this->addError(APIErrors::INVALID_USER_ID, $puser_id);
         return;
     }
     $time_offset = $this->getPM("time_offset");
     $entry_ids = $this->getPM("entry_ids");
     $detailed = $this->getP("detailed", false);
     $separator = $this->getP("separator", ",");
     $id_arr = explode($separator, $entry_ids);
     $limit = 50;
     $id_arr = array_splice($id_arr, 0, $limit);
     $entries = entryPeer::retrieveByPKs($id_arr);
     $updated_entries = array();
     if (!$entries) {
         $this->addError(APIErrors::INVALID_ENTRY_IDS, $entry_ids);
     } else {
         foreach ($entries as $entry) {
             if (!myEntryUtils::createThumbnailFromEntry($entry, $entry, $time_offset)) {
                 $this->addError(APIErrors::INVALID_ENTRY_TYPE, "ENTRY_TYPE_MEDIACLIP [" . $entry->getId() . "]");
                 continue;
             }
             $updated_entries[] = $entry;
             myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_UPDATE_THUMBNAIL, $entry);
             $wrapper = objectWrapperBase::getWrapperClass($entry, objectWrapperBase::DETAIL_LEVEL_DETAILED);
             $wrapper->removeFromCache("entry", $entry->getId());
         }
     }
     $this->addMsg("entries", objectWrapperBase::getWrapperClass($updated_entries, objectWrapperBase::DETAIL_LEVEL_REGULAR));
 }
开发者ID:DBezemer,项目名称:server,代码行数:31,代码来源:updateentriesthumbnailsAction.class.php

示例3: execute

 public function execute()
 {
     $dummy = $this->getRequestParameter("votes", 0);
     $dummy = $dummy % 3;
     if ($dummy == 1) {
         if (rand(1, 2) == 1) {
             $res = "-1";
         } else {
             $res = "0";
         }
     } elseif ($dummy == 2) {
         $res = "-2";
     } else {
         $res = "0";
     }
     $res = "0";
     list($not_list, $signature, $debug) = myNotificationMgr::splitMultiNotifications($_REQUEST);
     $myFile = "/var/log/notifications_log";
     $fh = fopen($myFile, 'a');
     fwrite($fh, microtime(true) . ":\n");
     fwrite($fh, print_r($_REQUEST, true) . "\n");
     fwrite($fh, "- not_list: ---\n");
     fwrite($fh, print_r($not_list, true) . "\n");
     //fwrite($fh, print_r ( $debug , true ) . "\n" );
     fwrite($fh, $signature . "\n");
     fwrite($fh, "---------------------------------------\n");
     fclose($fh);
     return $this->renderText($res);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:29,代码来源:testNotificationsAction.class.php

示例4: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $kshow_id_to_delete = $this->getPM("kshow_id");
     $kshow_to_delete = kshowPeer::retrieveByPK($kshow_id_to_delete);
     if (!$kshow_to_delete) {
         $this->addError(APIErrors::INVALID_KSHOW_ID, $kshow_id_to_delete);
         return;
     }
     $kshow_to_delete->delete();
     myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_KSHOW_DELETE, $kshow_to_delete);
     $this->addMsg("deleted_kshow", objectWrapperBase::getWrapperClass($kshow_to_delete, objectWrapperBase::DETAIL_LEVEL_REGULAR));
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:12,代码来源:deletekshowAction.class.php

示例5: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $prefix = $this->getObjectPrefix();
     if (!$puser_kuser) {
         $this->addError(APIErrors::INVALID_USER_ID, $puser_id);
         return;
     }
     $allow_empty = $this->getP("allow_empty_field", false);
     if ($allow_empty == "false" || $allow_empty === 0) {
         $allow_empty = false;
     }
     $entry_id = $this->getPM("{$prefix}_id");
     $entry = entryPeer::retrieveByPK($entry_id);
     if (!$entry) {
         $this->addError(APIErrors::INVALID_ENTRY_ID, $prefix, $entry_id);
         return;
     }
     $this->validateInputEntry($entry);
     // TODO - verify the user is allowed to modify the entry
     if (!$this->isOwnedBy($entry, $puser_kuser->getKuserId())) {
         $this->verifyEntryPrivileges($entry);
         // user was granted explicit permissions when initiatd the ks
     }
     // get the new properties for the kuser from the request
     $entry_update_data = new entry();
     // assume the type and media_type of the entry from the DB are the same as those of the one from the user - if not -they will be overriden
     $entry_update_data->setType($entry->getType());
     $entry_update_data->setMediaType($entry->getMediaType());
     $entry_update_data->setId($entry->getId());
     $entry_update_data->setPartnerId($entry->getPartnerId());
     $entry_update_data->setData($entry->getData(), true);
     $obj_wrapper = objectWrapperBase::getWrapperClass($entry_update_data, 0);
     $field_level = $this->isAdmin() ? 2 : 1;
     $updateable_fields = $obj_wrapper->getUpdateableFields($field_level);
     $fields_modified = baseObjectUtils::fillObjectFromMap($this->getInputParams(), $entry_update_data, "{$prefix}_", $updateable_fields, BasePeer::TYPE_PHPNAME, $allow_empty);
     if (count($fields_modified) > 0) {
         if ($entry_update_data) {
             // allow admins to set admin more fields
             baseObjectUtils::fillObjectFromObject($updateable_fields, $entry_update_data, $entry, baseObjectUtils::CLONE_POLICY_PREFER_NEW, null, BasePeer::TYPE_PHPNAME, $allow_empty);
         }
         $this->validateEntry($entry);
         // TODO - chack to see that the permissions changed, not just any attributes
         myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_UPDATE_PERMISSIONS, $entry);
         $entry->save();
     }
     $wrapper = objectWrapperBase::getWrapperClass($entry, objectWrapperBase::DETAIL_LEVEL_DETAILED);
     $wrapper->removeFromCache("entry", $entry->getId());
     $this->addMsg("{$prefix}", $wrapper);
     $this->addDebug("modified_fields", $fields_modified);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:50,代码来源:updateentryAction.class.php

示例6: addFromUploadedFileAction

 /**
  * Add new document entry after the specific document file was uploaded and the upload token id exists
  *
  * @action addFromUploadedFile
  * @param KalturaDocumentEntry $documentEntry Document entry metadata
  * @param string $uploadTokenId Upload token id
  * @return KalturaDocumentEntry The new document entry
  * 
  * @throws KalturaErrors::PROPERTY_VALIDATION_MIN_LENGTH
  * @throws KalturaErrors::PROPERTY_VALIDATION_CANNOT_BE_NULL
  * @throws KalturaErrors::UPLOADED_FILE_NOT_FOUND_BY_TOKEN
  */
 function addFromUploadedFileAction(KalturaDocumentEntry $documentEntry, $uploadTokenId)
 {
     try {
         // check that the uploaded file exists
         $entryFullPath = kUploadTokenMgr::getFullPathByUploadTokenId($uploadTokenId);
     } catch (kCoreException $ex) {
         if ($ex->getCode() == kUploadTokenException::UPLOAD_TOKEN_INVALID_STATUS) {
         }
         throw new KalturaAPIException(KalturaErrors::UPLOAD_TOKEN_INVALID_STATUS_FOR_ADD_ENTRY);
         throw $ex;
     }
     if (!file_exists($entryFullPath)) {
         $remoteDCHost = kUploadTokenMgr::getRemoteHostForUploadToken($uploadTokenId, kDataCenterMgr::getCurrentDcId());
         if ($remoteDCHost) {
             kFile::dumpApiRequest($remoteDCHost);
         } else {
             throw new KalturaAPIException(KalturaErrors::UPLOADED_FILE_NOT_FOUND_BY_TOKEN);
         }
     }
     $dbEntry = $this->prepareEntryForInsert($documentEntry);
     $dbEntry->setSource(KalturaSourceType::FILE);
     $dbEntry->setSourceLink("file:{$entryFullPath}");
     $dbEntry->save();
     $te = new TrackEntry();
     $te->setEntryId($dbEntry->getId());
     $te->setTrackEventTypeId(TrackEntry::TRACK_ENTRY_EVENT_TYPE_ADD_ENTRY);
     $te->setDescription(__METHOD__ . ":" . __LINE__ . "::ENTRY_MEDIA_SOURCE_FILE");
     TrackEntry::addTrackEntry($te);
     $msg = null;
     $flavorAsset = kFlowHelper::createOriginalFlavorAsset($this->getPartnerId(), $dbEntry->getId(), $msg);
     if (!$flavorAsset) {
         KalturaLog::err("Flavor asset not created for entry [" . $dbEntry->getId() . "] reason [{$msg}]");
         $dbEntry->setStatus(entryStatus::ERROR_CONVERTING);
         $dbEntry->save();
     } else {
         $ext = pathinfo($entryFullPath, PATHINFO_EXTENSION);
         KalturaLog::info("Uploaded file extension: {$ext}");
         $flavorAsset->setFileExt($ext);
         $flavorAsset->save();
         $syncKey = $flavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
         kFileSyncUtils::moveFromFile($entryFullPath, $syncKey);
         kEventsManager::raiseEvent(new kObjectAddedEvent($flavorAsset));
     }
     kUploadTokenMgr::closeUploadTokenById($uploadTokenId);
     myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_ADD, $dbEntry);
     $documentEntry->fromObject($dbEntry);
     return $documentEntry;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:60,代码来源:DocumentsService.php

示例7: addAction

 /**
  * Adds a new data entry
  * 
  * @action add
  * @param KalturaDataEntry $dataEntry Data entry
  * @return KalturaDataEntry The new data entry
  */
 function addAction(KalturaDataEntry $dataEntry)
 {
     $dbEntry = $dataEntry->toObject(new entry());
     $this->checkAndSetValidUser($dataEntry, $dbEntry);
     $this->checkAdminOnlyInsertProperties($dataEntry);
     $this->validateAccessControlId($dataEntry);
     $this->validateEntryScheduleDates($dataEntry);
     $dbEntry->setPartnerId($this->getPartnerId());
     $dbEntry->setSubpId($this->getPartnerId() * 100);
     $dbEntry->setStatus(KalturaEntryStatus::READY);
     $dbEntry->setMediaType(entry::ENTRY_MEDIA_TYPE_AUTOMATIC);
     $dbEntry->save();
     $dataEntry->fromObject($dbEntry);
     myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_ADD, $dbEntry);
     return $dataEntry;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:23,代码来源:DataService.php

示例8: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $prefix = null;
     $notData = new kNotificationJobData();
     $notData->setData('');
     $notData->setType(kNotificationJobData::NOTIFICATION_TYPE_TEST);
     $notData->setUserId($puser_id);
     $job = new BatchJob();
     $job->setId(kNotificationJobData::NOTIFICATION_TYPE_TEST + (int) time());
     $job->setData($notData);
     $job->setPartnerId($partner_id);
     $partner = PartnerPeer::retrieveByPK($partner_id);
     list($url, $signature_key) = myNotificationMgr::getPartnerNotificationInfo($partner);
     list($params, $raw_siganture) = myNotificationMgr::prepareNotificationData($url, $signature_key, $job, $prefix);
     $this->send($url, $params);
 }
开发者ID:DBezemer,项目名称:server,代码行数:16,代码来源:testnotificationAction.class.php

示例9: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     if (!$puser_kuser) {
         $this->addError(APIErrors::INVALID_USER_ID, $puser_id);
         return;
     }
     $entry_id = $this->getPM("entry_id");
     $entry = entryPeer::retrieveByPK($entry_id);
     // TODO - verify the user is allowed to modify the entry
     $source_entry_id = $this->getP("source_entry_id");
     if ($source_entry_id) {
         $source_entry = entryPeer::retrieveByPK($source_entry_id);
         if (!$source_entry) {
             return;
         }
     } else {
         $source_entry = $entry;
     }
     $time_offset = $this->getP("time_offset", -1);
     if (!myEntryUtils::createThumbnailFromEntry($entry, $source_entry, $time_offset)) {
         $this->addError(APIErrors::INVALID_ENTRY_TYPE, "ENTRY_TYPE_MEDIACLIP");
         return;
     }
     if ($entry->getType() == entryType::MIX) {
         /*			
         		$roughcutPath = myContentStorage::getFSContentRootPath() . $entry->getDataPath(); // replaced__getDataPath
         		$xml_doc = new DOMDocument();
         		$xml_doc->load( $roughcutPath );
         	
         		if (myMetadataUtils::updateThumbUrl($xml_doc, $entry->getThumbnailUrl()))
         			$xml_doc->save($roughcutPath);
         */
         $sync_key = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_DATA);
         $xml_doc = new DOMDocument();
         $xml_doc->loadXML(kFileSyncUtils::file_get_contents($sync_key));
         if (myMetadataUtils::updateThumbUrl($xml_doc, $entry->getThumbnailUrl())) {
             $entry->setMetadata(null, $xml_doc->saveXML(), true, null, null);
             //$entry->getVersion() );
         }
         myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_UPDATE_THUMBNAIL, $entry);
     }
     $wrapper = objectWrapperBase::getWrapperClass($entry, objectWrapperBase::DETAIL_LEVEL_DETAILED);
     $wrapper->removeFromCache("entry", $entry->getId());
     $this->addMsg("entry", $wrapper);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:45,代码来源:updateentrythumbnailAction.class.php

示例10: addAction

 /**
  * Adds new live stream entry.
  * The entry will be queued for provision.
  * 
  * @action add
  * @param KalturaLiveStreamAdminEntry $liveStreamEntry Live stream entry metadata  
  * @param KalturaSourceType $sourceType  Live stream source type
  * @return KalturaLiveStreamAdminEntry The new live stream entry
  * 
  * @throws KalturaErrors::PROPERTY_VALIDATION_CANNOT_BE_NULL
  */
 function addAction(KalturaLiveStreamAdminEntry $liveStreamEntry, $sourceType = null)
 {
     //TODO: allow sourceType that belongs to LIVE entries only - same for mediaType
     if ($sourceType) {
         $liveStreamEntry->sourceType = $sourceType;
     } else {
         // default sourceType is AKAMAI_LIVE
         $liveStreamEntry->sourceType = kPluginableEnumsManager::coreToApi('EntrySourceType', $this->getPartner()->getDefaultLiveStreamEntrySourceType());
     }
     // if the given password is empty, generate a random 8-character string as the new password
     if ($liveStreamEntry->streamPassword == null || strlen(trim($liveStreamEntry->streamPassword)) <= 0) {
         $tempPassword = sha1(md5(uniqid(rand(), true)));
         $liveStreamEntry->streamPassword = substr($tempPassword, rand(0, strlen($tempPassword) - 8), 8);
     }
     // if no bitrate given, add default
     if (is_null($liveStreamEntry->bitrates) || !$liveStreamEntry->bitrates->count) {
         $liveStreamBitrate = new KalturaLiveStreamBitrate();
         $liveStreamBitrate->bitrate = self::DEFAULT_BITRATE;
         $liveStreamBitrate->width = self::DEFAULT_WIDTH;
         $liveStreamBitrate->height = self::DEFAULT_HEIGHT;
         $liveStreamEntry->bitrates = new KalturaLiveStreamBitrateArray();
         $liveStreamEntry->bitrates[] = $liveStreamBitrate;
     } else {
         $bitrates = new KalturaLiveStreamBitrateArray();
         foreach ($liveStreamEntry->bitrates as $bitrate) {
             if (is_null($bitrate->bitrate)) {
                 $bitrate->bitrate = self::DEFAULT_BITRATE;
             }
             if (is_null($bitrate->width)) {
                 $bitrate->bitrate = self::DEFAULT_WIDTH;
             }
             if (is_null($bitrate->height)) {
                 $bitrate->bitrate = self::DEFAULT_HEIGHT;
             }
             $bitrates[] = $bitrate;
         }
         $liveStreamEntry->bitrates = $bitrates;
     }
     $dbEntry = $this->insertLiveStreamEntry($liveStreamEntry);
     myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_ADD, $dbEntry, $this->getPartnerId(), null, null, null, $dbEntry->getId());
     $liveStreamEntry->fromObject($dbEntry);
     return $liveStreamEntry;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:54,代码来源:LiveStreamService.php

示例11: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $kshow_id = $this->getPM("kshow_id");
     $rank = $this->getPM("rank");
     $kshow = kshowPeer::retrieveByPK($kshow_id);
     if (!$kshow) {
         $this->addError(APIErrors::INVALID_KSHOW_ID, $kshow_id);
         return;
     }
     if ($rank > entry::MAX_NORMALIZED_RANK || $rank < 0 || !is_numeric($rank)) {
         $this->addError(APIErrors::INVALID_RANK, $rank);
         return;
     }
     $kuser_id = $puser_kuser->getKuserId();
     $entry_id = $kshow->getShowEntryId();
     $partner = PartnerPeer::retrieveByPK($partner_id);
     if (!$partner->getAllowAnonymousRanking()) {
         // prevent duplicate votes
         $c = new Criteria();
         $c->add(kvotePeer::KUSER_ID, $kuser_id);
         $c->add(kvotePeer::ENTRY_ID, $entry_id);
         $c->add(kvotePeer::KSHOW_ID, $kshow_id);
         $kvote = kvotePeer::doSelectOne($c);
         if ($kvote != NULL) {
             $this->addError(APIErrors::USER_ALREADY_RANKED_KSHOW, $puser_id, $kshow_id);
             return;
         }
     }
     $kvote = new kvote();
     $kvote->setKshowId($kshow_id);
     $kvote->setEntryId($entry_id);
     $kvote->setKuserId($kuser_id);
     $kvote->setRank($rank);
     $kvote->save();
     $statistics_results = $kvote->getStatisticsResults();
     $updated_kshow = @$statistics_results["kshow"];
     if ($updated_kshow) {
         myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_KSHOW_RANK, $updated_kshow);
         $data = array("kshow_id" => $kshow_id, "uid" => $puser_id, "rank" => $updated_kshow->getRank(), "votes" => $updated_kshow->getVotes());
         //$this->addMsg ( "kshow" , objectWrapperBase::getWrapperClass( $updated_kshow , objectWrapperBase::DETAIL_LEVEL_DETAILED) );
         $this->addMsg("rank", $data);
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:43,代码来源:rankkshowAction.class.php

示例12: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     if (!$puser_kuser) {
         $this->addError(APIErrors::INVALID_USER_ID, $puser_id);
         return;
     }
     $entry_id = $this->getPM("entry_id");
     $entry = entryPeer::retrieveByPK($entry_id);
     // TODO - verify the user is allowed to modify the entry
     if ($entry->getKshowId() === kshow::SANDBOX_ID) {
         $this->addError(APIErrors::SANDBOX_ALERT);
         return;
     }
     $entry->setThumbnail(".jpg");
     $entry->setCreateThumb(false);
     $entry->save();
     if (isset($HTTP_RAW_POST_DATA)) {
         $thumb_data = $HTTP_RAW_POST_DATA;
     } else {
         $thumb_data = file_get_contents("php://input");
     }
     $thumb_data_size = strlen($thumb_data);
     $fileSyncKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_THUMB);
     $fileSync = FileSync::createForFileSyncKey($fileSyncKey);
     kFileSyncUtils::file_put_contents($fileSyncKey, $thumb_data);
     // update the metadata in case of a roughcut
     if ($entry->getType() == entryType::MIX) {
         $sync_key = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_DATA);
         $xml_doc = new DOMDocument();
         $xml_doc->loadXML(kFileSyncUtils::file_get_contents($sync_key));
         if (myMetadataUtils::updateThumbUrl($xml_doc, $entry->getThumbnailUrl())) {
             $entry->setMetadata(null, $xml_doc->saveXML(), true, null, null);
             //$entry->getVersion() );
         }
         myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_UPDATE_THUMBNAIL, $entry);
     }
     $this->res = $entry->getBigThumbnailUrl();
     $wrapper = objectWrapperBase::getWrapperClass($entry, objectWrapperBase::DETAIL_LEVEL_REGULAR);
     $wrapper->removeFromCache("entry", $entry->getId());
     $this->addMsg("entry", $wrapper);
 }
开发者ID:DBezemer,项目名称:server,代码行数:41,代码来源:updateentrythumbnailjpegAction.class.php

示例13: addAction

 /**
  * Adds a new data entry
  * 
  * @action add
  * @param KalturaDataEntry $dataEntry Data entry
  * @return KalturaDataEntry The new data entry
  */
 function addAction(KalturaDataEntry $dataEntry)
 {
     $dbEntry = $dataEntry->toObject(new entry());
     $this->checkAndSetValidUserInsert($dataEntry, $dbEntry);
     $this->checkAdminOnlyInsertProperties($dataEntry);
     $this->validateAccessControlId($dataEntry);
     $this->validateEntryScheduleDates($dataEntry, $dbEntry);
     $dbEntry->setPartnerId($this->getPartnerId());
     $dbEntry->setSubpId($this->getPartnerId() * 100);
     $dbEntry->setStatus(KalturaEntryStatus::READY);
     $dbEntry->setMediaType(entry::ENTRY_MEDIA_TYPE_AUTOMATIC);
     $dbEntry->save();
     $trackEntry = new TrackEntry();
     $trackEntry->setEntryId($dbEntry->getId());
     $trackEntry->setTrackEventTypeId(TrackEntry::TRACK_ENTRY_EVENT_TYPE_ADD_ENTRY);
     $trackEntry->setDescription(__METHOD__ . ":" . __LINE__ . "::ENTRY_DATA");
     TrackEntry::addTrackEntry($trackEntry);
     $dataEntry->fromObject($dbEntry);
     myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_ADD, $dbEntry);
     return $dataEntry;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:28,代码来源:DataService.php

示例14: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $entry_id = $this->getPM("entry_id");
     $moderation_status = $this->getPM("moderation_status");
     entryPeer::allowDeletedInCriteriaFilter();
     $entry = entryPeer::retrieveByPK($entry_id);
     if ($entry) {
         // when setting the moderation status- propagate to all related moderation objects
         $entry->moderate($moderation_status, true);
         $entry->setModerationCount(0);
         // set the number of unhandled flags to 0
         $entry->save();
         // for  no wodn't add an extra notification - one is sent from within the entry->moderate()
         // TODO - where is the best place to notify ??
         myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_UPDATE, $entry, null, null, null, null, $entry_id);
     }
     entryPeer::blockDeletedInCriteriaFilter();
     $wrapper = objectWrapperBase::getWrapperClass($entry, objectWrapperBase::DETAIL_LEVEL_DETAILED);
     if ($entry) {
         $wrapper->removeFromCache("entry", $entry->getId());
     }
     $this->addMsg("entry", $wrapper);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:23,代码来源:updateentrymoderationAction.class.php

示例15: addAction

 /**
  * Adds new live stream entry.
  * The entry will be queued for provision.
  * 
  * @action add
  * @param KalturaLiveStreamEntry $liveStreamEntry Live stream entry metadata  
  * @param KalturaSourceType $sourceType  Live stream source type
  * @return KalturaLiveStreamEntry The new live stream entry
  * 
  * @throws KalturaErrors::PROPERTY_VALIDATION_CANNOT_BE_NULL
  */
 function addAction(KalturaLiveStreamEntry $liveStreamEntry, $sourceType = null)
 {
     if ($sourceType) {
         $liveStreamEntry->sourceType = $sourceType;
     } elseif (is_null($liveStreamEntry->sourceType)) {
         // default sourceType is AKAMAI_LIVE
         $liveStreamEntry->sourceType = kPluginableEnumsManager::coreToApi('EntrySourceType', $this->getPartner()->getDefaultLiveStreamEntrySourceType());
     }
     $dbEntry = $this->prepareEntryForInsert($liveStreamEntry);
     $dbEntry->save();
     $te = new TrackEntry();
     $te->setEntryId($dbEntry->getId());
     $te->setTrackEventTypeId(TrackEntry::TRACK_ENTRY_EVENT_TYPE_ADD_ENTRY);
     $te->setDescription(__METHOD__ . ":" . __LINE__ . "::" . $dbEntry->getSource());
     TrackEntry::addTrackEntry($te);
     //If a jobData can be created for entry sourceType, add provision job. Otherwise, just save the entry.
     $jobData = kProvisionJobData::getInstance($dbEntry->getSource());
     if ($jobData) {
         /* @var $data kProvisionJobData */
         $jobData->populateFromPartner($dbEntry->getPartner());
         $jobData->populateFromEntry($dbEntry);
         kJobsManager::addProvisionProvideJob(null, $dbEntry, $jobData);
     } else {
         $dbEntry->setStatus(entryStatus::READY);
         $dbEntry->save();
         $liveAssets = assetPeer::retrieveByEntryId($dbEntry->getId(), array(assetType::LIVE));
         foreach ($liveAssets as $liveAsset) {
             /* @var $liveAsset liveAsset */
             $liveAsset->setStatus(asset::ASSET_STATUS_READY);
             $liveAsset->save();
         }
     }
     myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_ADD, $dbEntry, $this->getPartnerId(), null, null, null, $dbEntry->getId());
     $liveStreamEntry->fromObject($dbEntry, $this->getResponseProfile());
     return $liveStreamEntry;
 }
开发者ID:dozernz,项目名称:server,代码行数:47,代码来源:LiveStreamService.php


注:本文中的myNotificationMgr类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。