Exemplo n.º 1
0
 protected function partnerRequired($actionName)
 {
     if ($actionName === 'isLive') {
         return false;
     }
     return parent::partnerRequired($actionName);
 }
Exemplo n.º 2
0
 /**
  * List data entries by filter with paging support.
  * 
  * @action list
  * @param KalturaDataEntryFilter $filter Document entry filter
  * @param KalturaFilterPager $pager Pager
  * @return KalturaDataListResponse Wrapper for array of document entries and total count
  */
 function listAction(KalturaDataEntryFilter $filter = null, KalturaFilterPager $pager = null)
 {
     if (!$filter) {
         $filter = new KalturaDataEntryFilter();
     }
     $filter->typeEqual = KalturaEntryType::DATA;
     list($list, $totalCount) = parent::listEntriesByFilter($filter, $pager);
     $newList = KalturaDataEntryArray::fromEntryArray($list);
     $response = new KalturaDataListResponse();
     $response->objects = $newList;
     $response->totalCount = $totalCount;
     return $response;
 }
Exemplo n.º 3
0
 /**
  * @param KalturaBaseEntry $entry
  * @return entry
  */
 protected function prepareEntryForInsert(KalturaBaseEntry $entry)
 {
     // first validate the input object
     //$entry->validatePropertyMinLength("name", 1);
     $entry->validatePropertyNotNull("mediaType");
     $dbEntry = parent::prepareEntryForInsert($entry);
     if ($this->getConversionQualityFromRequest()) {
         $dbEntry->setConversionQuality($this->getConversionQualityFromRequest());
     }
     $kshow = $this->createDummyKShow();
     $kshowId = $kshow->getId();
     $dbEntry->setKshowId($kshowId);
     $dbEntry->save();
     return $dbEntry;
 }
Exemplo n.º 4
0
 private function getConversionQuality($entry)
 {
     $conversionQuality = $entry->conversionQuality;
     if (parent::getConversionQualityFromRequest()) {
         $conversionQuality = parent::getConversionQualityFromRequest();
     }
     if (is_null($conversionQuality)) {
         return null;
     }
     $conversionProfile2 = conversionProfile2Peer::retrieveByPK($conversionQuality);
     if (!$conversionProfile2) {
         KalturaLog::debug("Maybe old conversion profile");
         $conversionProfile = ConversionProfilePeer::retrieveByPK($conversionQuality);
         if ($conversionProfile) {
             $conversionQuality = $conversionProfile->getConversionProfile2Id();
         }
     }
     return $conversionQuality;
 }
Exemplo n.º 5
0
 /**
  * List available playlists
  *
  * @action list
  * @param KalturaPlaylistFilter // TODO
  * @param KalturaFilterPager $pager
  * @return KalturaPlaylistListResponse
  */
 function listAction(KalturaPlaylistFilter $filter = null, KalturaFilterPager $pager = null)
 {
     myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL3;
     if (!$filter) {
         $filter = new KalturaPlaylistFilter();
     }
     $filter->typeEqual = KalturaEntryType::PLAYLIST;
     list($list, $totalCount) = parent::listEntriesByFilter($filter, $pager);
     $newList = KalturaPlaylistArray::fromDbArray($list, $this->getResponseProfile());
     $response = new KalturaPlaylistListResponse();
     $response->objects = $newList;
     $response->totalCount = $totalCount;
     return $response;
 }
 /**
  * Update entry thumbnail using url
  * 
  * @action updateOfflineThumbnailFromUrl
  * @param string $entryId live stream entry id
  * @param string $url file url
  * @return KalturaLiveStreamEntry The live stream entry
  * 
  * @throws KalturaErrors::ENTRY_ID_NOT_FOUND
  * @throws KalturaErrors::PERMISSION_DENIED_TO_UPDATE_ENTRY
  */
 function updateOfflineThumbnailFromUrlAction($entryId, $url)
 {
     return parent::updateThumbnailForEntryFromUrl($entryId, $url, KalturaEntryType::LIVE_STREAM, entry::FILE_SYNC_ENTRY_SUB_TYPE_OFFLINE_THUMB);
 }
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     $this->applyPartnerFilterForClass('category');
 }
 /**
  * Anonymously rank an entry, no validation is done on duplicate rankings.
  *  
  * @action anonymousRank
  * @param string $entryId
  * @param int $rank
  */
 public function anonymousRankAction($entryId, $rank)
 {
     KalturaResponseCacher::disableCache();
     return parent::anonymousRankEntry($entryId, null, $rank);
 }
 /**
  * @ignore
  */
 public function initService($serviceId, $serviceName, $actionName)
 {
     parent::initService($serviceId, $serviceName, $actionName);
     parent::applyPartnerFilterForClass(new categoryPeer());
 }
Exemplo n.º 10
0
 protected function prepareEntryForInsert(KalturaBaseEntry $entry, entry $dbEntry = null)
 {
     // first validate the input object
     //$entry->validatePropertyMinLength("name", 1);
     $entry->validatePropertyNotNull("documentType");
     $dbEntry = parent::prepareEntryForInsert($entry);
     if ($entry->conversionProfileId) {
         $dbEntry->setStatus(entryStatus::PRECONVERT);
     } else {
         $dbEntry->setStatus(entryStatus::READY);
     }
     $dbEntry->setDefaultModerationStatus();
     $dbEntry->save();
     return $dbEntry;
 }
 /**
  * Anonymously rank a mix entry, no validation is done on duplicate rankings
  *  
  * @action anonymousRank
  * @param string $entryId
  * @param int $rank
  */
 public function anonymousRankAction($entryId, $rank)
 {
     return parent::anonymousRankEntry($entryId, KalturaEntryType::MIX, $rank);
 }
Exemplo n.º 12
0
 /**
  * Count media entries by filter.
  * 
  * @action count
  * @param KalturaExternalMediaEntryFilter $filter External media entry filter
  * @return int
  */
 function countAction(KalturaExternalMediaEntryFilter $filter = null)
 {
     if (!$filter) {
         $filter = new KalturaExternalMediaEntryFilter();
     }
     return parent::countEntriesByFilter($filter);
 }
Exemplo n.º 13
0
 /**
  * List available playlists
  * 
  * @action list
  * @param KalturaPlaylistFilter // TODO 
  * @param KalturaFilterPager $pager
  * @return KalturaPlaylistListResponse
  */
 function listAction(KalturaPlaylistFilter $filter = null, KalturaFilterPager $pager = null)
 {
     myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL3;
     if (!$filter) {
         $filter = new KalturaPlaylistFilter();
     }
     $filter->typeEqual = KalturaEntryType::PLAYLIST;
     list($list, $totalCount) = parent::listEntriesByFilter($filter, $pager, baseObjectFilter::MATCH_KALTURA_NETWORK_AND_PRIVATE);
     $newList = KalturaPlaylistArray::fromPlaylistArray($list);
     $response = new KalturaPlaylistListResponse();
     $response->objects = $newList;
     $response->totalCount = $totalCount;
     return $response;
 }