Exemple #1
0
 public static function setDefaultCriteriaFilter()
 {
     if (self::$s_criteria_filter == null) {
         self::$s_criteria_filter = new criteriaFilter();
     }
     $c = KalturaCriteria::create(CuePointPeer::OM_CLASS);
     $c->addAnd(CuePointPeer::STATUS, CuePointStatus::DELETED, Criteria::NOT_EQUAL);
     if (self::$userContentOnly) {
         $puserId = kCurrentContext::$ks_uid;
         $partnerId = kCurrentContext::$ks_partner_id;
         if ($puserId && $partnerId) {
             $kuser = kuserPeer::getKuserByPartnerAndUid($partnerId, $puserId);
             if (!$kuser) {
                 $kuser = kuserPeer::createKuserForPartner($partnerId, $puserId);
             }
             // Temporarily change user filter to (user==kuser OR cuepoint of type THUMB/CODE). Long term fix will be accomplished
             // by adding a public property on the cuepoint object and checking (user==kuser OR is public)
             //$c->addAnd(CuePointPeer::KUSER_ID, $kuser->getId());
             $criterionUserOrPublic = $c->getNewCriterion(CuePointPeer::KUSER_ID, $kuser->getId());
             $criterionUserOrPublic->addOr($c->getNewCriterion(self::IS_PUBLIC, true, Criteria::EQUAL));
             $criterionUserOrPublic->addTag(KalturaCriterion::TAG_USER_SESSION);
             $criterionUserOrPublic->addOr($c->getNewCriterion(CuePointPeer::TYPE, array(ThumbCuePointPlugin::getCuePointTypeCoreValue(ThumbCuePointType::THUMB), CodeCuePointPlugin::getCuePointTypeCoreValue(CodeCuePointType::CODE), AdCuePointPlugin::getCuePointTypeCoreValue(AdCuePointType::AD)), Criteria::IN));
             $c->addAnd($criterionUserOrPublic);
         }
     }
     self::$s_criteria_filter->setFilter($c);
 }
 public static function getExtendedTypes($baseClass, $enumValue)
 {
     if ($baseClass == assetPeer::OM_CLASS && $enumValue == assetType::THUMBNAIL) {
         return array(ThumbCuePointPlugin::getAssetTypeCoreValue(timedThumbAssetType::TIMED_THUMB_ASSET));
     }
     return null;
 }
 public static function dependsOn()
 {
     $bulkUploadXmlVersion = new KalturaVersion(self::BULK_UPLOAD_XML_VERSION_MAJOR, self::BULK_UPLOAD_XML_VERSION_MINOR, self::BULK_UPLOAD_XML_VERSION_BUILD);
     $bulkUploadXmlDependency = new KalturaDependency(self::BULK_UPLOAD_XML_PLUGIN_NAME, $bulkUploadXmlVersion);
     $thumbCuePointDependency = new KalturaDependency(ThumbCuePointPlugin::getPluginName());
     return array($bulkUploadXmlDependency, $thumbCuePointDependency);
 }
 public function validateTimedThumbAssetId()
 {
     $timedThumb = assetPeer::retrieveById($this->assetId);
     if (!$timedThumb) {
         throw new KalturaAPIException(KalturaErrors::ASSET_ID_NOT_FOUND, $this->assetId);
     }
     if ($timedThumb->getType() != ThumbCuePointPlugin::getAssetTypeCoreValue(timedThumbAssetType::TIMED_THUMB_ASSET)) {
         throw new KalturaAPIException(KalturaErrors::THUMB_ASSET_ID_IS_NOT_TIMED_THUMB_TYPE, $this->assetId);
     }
 }
Exemple #5
0
 /**
  * Applies default values to this object.
  * This method should be called from the object's constructor (or equivalent initialization method).
  * @see __construct()
  */
 public function applyDefaultValues()
 {
     $this->setType(ThumbCuePointPlugin::getCuePointTypeCoreValue(ThumbCuePointType::THUMB));
 }
Exemple #6
0
 public function applyDefaultValues()
 {
     parent::applyDefaultValues();
     $this->setType(ThumbCuePointPlugin::getAssetTypeCoreValue(timedThumbAssetType::TIMED_THUMB_ASSET));
 }
 public function getTypeListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null, $type = null)
 {
     return parent::getTypeListResponse($pager, $responseProfile, ThumbCuePointPlugin::getCuePointTypeCoreValue(ThumbCuePointType::THUMB));
 }