/**
  * Add bulk upload job
  * @param DropFolder $folder
  * @param DropFolderFile $leadDropFolderFile
  * @throws Exception
  */
 private function addXMLBulkUploadJob(DropFolder $folder, DropFolderFile $leadDropFolderFile)
 {
     /* @var $leadDropFolderFile FeedDropFolderFile */
     KalturaLog::info('Adding BulkUpload job');
     try {
         $coreBulkUploadType = BulkUploadXmlPlugin::getBulkUploadTypeCoreValue(BulkUploadXmlType::XML);
         $objectId = $leadDropFolderFile->getId();
         $objectType = DropFolderXmlBulkUploadPlugin::getBatchJobObjectTypeCoreValue(DropFolderBatchJobObjectType::DROP_FOLDER_FILE);
         $partner = PartnerPeer::retrieveByPK($folder->getPartnerId());
         $data = KalturaPluginManager::loadObject('kBulkUploadJobData', $coreBulkUploadType);
         /* @var $data kBulkUploadJobData */
         $data->setUploadedBy(kDropFolderXmlEventsConsumer::UPLOADED_BY);
         KalturaLog::info("Feed XML path: " . $leadDropFolderFile->getFeedXmlPath());
         $data->setFilePath($leadDropFolderFile->getFeedXmlPath());
         $data->setFileName(basename($data->getFilePath()) . '.xml');
         $objectData = new kBulkUploadEntryData();
         KalturaLog::info('Conversion profile id: ' . $folder->getConversionProfileId());
         $objectData->setConversionProfileId($folder->getConversionProfileId());
         $data->setObjectData($objectData);
         $job = kJobsManager::addBulkUploadJob($partner, $data, $coreBulkUploadType, $objectId, $objectType);
         $this->setFileToProcessing($leadDropFolderFile);
         return $job;
     } catch (Exception $e) {
         KalturaLog::err("Error adding BulkUpload job -" . $e->getMessage());
         throw new Exception(DropFolderXmlBulkUploadPlugin::ERROR_ADDING_BULK_UPLOAD_MESSAGE, DropFolderXmlBulkUploadPlugin::getErrorCodeCoreValue(DropFolderXmlBulkUploadErrorCode::ERROR_ADDING_BULK_UPLOAD));
     }
 }
 public function fromObject($dbData)
 {
     /* @var $dbData kCopyJobData */
     $filter = $dbData->getFilter();
     $filterType = get_class($filter);
     switch ($filterType) {
         case 'entryFilter':
             $this->filter = new KalturaBaseEntryFilter();
             $this->templateObject = new KalturaBaseEntry();
             break;
         case 'categoryFilter':
             $this->filter = new KalturaCategoryFilter();
             $this->templateObject = new KalturaCategory();
             break;
         case 'categoryEntryFilter':
             $this->filter = new KalturaCategoryEntryFilter();
             $this->templateObject = new KalturaCategoryEntry();
             break;
         case 'categoryKuserFilter':
             $this->filter = new KalturaCategoryUserFilter();
             $this->templateObject = new KalturaCategoryUser();
             break;
         default:
             $this->filter = KalturaPluginManager::loadObject('KalturaFilter', $filterType);
     }
     if ($this->filter) {
         $this->filter->fromObject($filter);
     }
     if ($this->templateObject) {
         $this->templateObject->fromObject($dbData->getTemplateObject());
     }
     return parent::fromObject($dbData);
 }
Beispiel #3
0
 /**
  * @param int $type
  * @param KSchedularTaskConfig $taskConfig
  * @param KalturaConvartableJobData $data
  * @return KOperationEngine
  */
 protected static function createNewEngine($type, KSchedularTaskConfig $taskConfig, KalturaConvartableJobData $data)
 {
     // TODO - remove after old version deprecated
     if (!$data->flavorParamsOutput->engineVersion) {
         return new KOperationEngineOldVersionWrapper($type, $taskConfig, $data);
     }
     switch ($type) {
         case KalturaConversionEngineType::MENCODER:
             return new KOperationEngineMencoder($taskConfig->params->mencderCmd, $data->destFileSyncLocalPath);
         case KalturaConversionEngineType::ON2:
             return new KOperationEngineFlix($taskConfig->params->on2Cmd, $data->destFileSyncLocalPath);
         case KalturaConversionEngineType::FFMPEG:
             return new KOperationEngineFfmpeg($taskConfig->params->ffmpegCmd, $data->destFileSyncLocalPath);
         case KalturaConversionEngineType::FFMPEG_AUX:
             return new KOperationEngineFfmpegAux($taskConfig->params->ffmpegAuxCmd, $data->destFileSyncLocalPath);
         case KalturaConversionEngineType::FFMPEG_VP8:
             return new KOperationEngineFfmpegVp8($taskConfig->params->ffmpegVp8Cmd, $data->destFileSyncLocalPath);
         case KalturaConversionEngineType::ENCODING_COM:
             return new KOperationEngineEncodingCom($taskConfig->params->EncodingComUserId, $taskConfig->params->EncodingComUserKey, $taskConfig->params->EncodingComUrl);
     }
     if ($data instanceof KalturaConvertCollectionJobData) {
         $engine = self::getCollectionEngine($type, $taskConfig, $data);
         if ($engine) {
             return $engine;
         }
     }
     $engine = KalturaPluginManager::loadObject('KOperationEngine', $type, array('params' => $taskConfig->params, 'outFilePath' => $data->destFileSyncLocalPath));
     return $engine;
 }
 static function getInstanceByDbObject(kCondition $dbObject)
 {
     switch ($dbObject->getType()) {
         case ConditionType::AUTHENTICATED:
             return new KalturaAuthenticatedCondition();
         case ConditionType::COUNTRY:
             return new KalturaCountryCondition();
         case ConditionType::IP_ADDRESS:
             return new KalturaIpAddressCondition();
         case ConditionType::SITE:
             return new KalturaSiteCondition();
         case ConditionType::USER_AGENT:
             return new KalturaUserAgentCondition();
         case ConditionType::FIELD_COMPARE:
             return new KalturaFieldCompareCondition();
         case ConditionType::FIELD_MATCH:
             return new KalturaFieldMatchCondition();
         case ConditionType::ASSET_PROPERTIES_COMPARE:
             return new KalturaAssetPropertiesCompareCondition();
         case ConditionType::USER_ROLE:
             return new KalturaUserRoleCondition();
         case ConditionType::GEO_DISTANCE:
             return new KalturaGeoDistanceCondition();
         case ConditionType::OR_OPERATOR:
             return new KalturaOrCondition();
         case ConditionType::HASH:
             return new KalturaHashCondition();
         case ConditionType::DELIVERY_PROFILE:
             return new KalturaDeliveryProfileCondition();
         case ConditionType::ACTIVE_EDGE_VALIDATE:
             return new KalturaValidateActiveEdgeCondition();
         default:
             return KalturaPluginManager::loadObject('KalturaCondition', $dbObject->getType());
     }
 }
 /**
  * @param string $class class name of the core object
  * @return KalturaEventCondition
  */
 public static function getInstanceByClass($class)
 {
     if ($class == kEventFieldCondition) {
         return new KalturaEventFieldCondition();
     }
     return KalturaPluginManager::loadObject('KalturaEventCondition', $class);
 }
Beispiel #6
0
 /**
  * @param int $type of enum geoCoderType
  * @return kGeoCoder
  */
 public static function getGeoCoder($type = null)
 {
     if (!$type || $type == geoCoderType::KALTURA) {
         return new myIPGeocoder();
     }
     return KalturaPluginManager::loadObject('kGeoCoder', $type);
 }
 public function doFromObject($dbObject, KalturaDetachedResponseProfile $responseProfile = null)
 {
     /* @var $dbObject kHttpNotificationDataText */
     parent::doFromObject($dbObject, $responseProfile);
     if ($this->shouldGet('content', $responseProfile)) {
         $contentType = get_class($dbObject->getContent());
         KalturaLog::debug("Loading KalturaStringValue from type [{$contentType}]");
         switch ($contentType) {
             case 'kStringValue':
                 $this->content = new KalturaStringValue();
                 break;
             case 'kEvalStringField':
                 $this->content = new KalturaEvalStringField();
                 break;
             default:
                 $this->content = KalturaPluginManager::loadObject('KalturaStringValue', $contentType);
                 break;
         }
         if ($this->content) {
             $this->content->fromObject($dbObject->getContent());
         }
     }
     if ($this->shouldGet('data', $responseProfile)) {
         $this->data = $dbObject->getData();
     }
 }
 public function doFromObject($dbObject, KalturaDetachedResponseProfile $responseProfile = null)
 {
     parent::doFromObject($dbObject, $responseProfile);
     /* @var $dbObject kEmailNotificationCategoryRecipientProvider */
     $categoryIdFieldType = get_class($dbObject->getCategoryId());
     KalturaLog::info("Retrieving API object for categoryId fild of type [{$categoryIdFieldType}]");
     switch ($categoryIdFieldType) {
         case 'kObjectIdField':
             $this->categoryId = new KalturaObjectIdField();
             break;
         case 'kEvalStringField':
             $this->categoryId = new KalturaEvalStringField();
             break;
         case 'kStringValue':
             $this->categoryId = new KalturaStringValue();
             break;
         default:
             $this->categoryId = KalturaPluginManager::loadObject('KalturaStringValue', $categoryIdFieldType);
             break;
     }
     if ($this->categoryId) {
         $this->categoryId->fromObject($dbObject->getCategoryId());
     }
     if ($dbObject->getCategoryUserFilter()) {
         $this->categoryUserFilter = new KalturaCategoryUserProviderFilter();
         $this->categoryUserFilter->fromObject($dbObject->getCategoryUserFilter());
     }
 }
Beispiel #9
0
 /**
  * Function constructs a core object of type kBulkUploadJobData
  * @param int $conversionProfileId
  * @param string $filePath
  * @param string $userId
  * @param int $bulkUploadType
  * @param string $uploadedBy
  * @param string $fileName
  * @throws KalturaErrors::CONVERSION_PROFILE_ID_NOT_FOUND
  */
 protected function constructJobData($filePath, $fileName, Partner $partner, $puserId, $uploadedBy, $conversionProfileId = null, $coreBulkUploadType = null)
 {
     $data = KalturaPluginManager::loadObject('kBulkUploadJobData', $coreBulkUploadType);
     if (is_null($data)) {
         throw new KalturaAPIException(KalturaErrors::BULK_UPLOAD_BULK_UPLOAD_TYPE_NOT_VALID, $coreBulkUploadType);
     }
     $data->setFilePath($filePath);
     $data->setUserId($puserId);
     $data->setUploadedBy($uploadedBy);
     $data->setFileName($fileName);
     if (!$conversionProfileId) {
         $conversionProfileId = $partner->getDefaultConversionProfileId();
     }
     $kmcVersion = $partner->getKmcVersion();
     $check = null;
     if ($kmcVersion < 2) {
         $check = ConversionProfilePeer::retrieveByPK($conversionProfileId);
     } else {
         $check = conversionProfile2Peer::retrieveByPK($conversionProfileId);
     }
     if (!$check) {
         throw new KalturaAPIException(KalturaErrors::CONVERSION_PROFILE_ID_NOT_FOUND, $conversionProfileId);
     }
     $objectData = new kBulkUploadEntryData();
     $objectData->setConversionProfileId($conversionProfileId);
     $data->setObjectData($objectData);
     return $data;
 }
Beispiel #10
0
 public function doFromObject($dbData, KalturaDetachedResponseProfile $responseProfile = null)
 {
     /* @var $dbData kIndexJobData */
     $filter = $dbData->getFilter();
     $filterType = get_class($filter);
     switch ($filterType) {
         case 'entryFilter':
             $this->filter = new KalturaBaseEntryFilter();
             break;
         case 'categoryFilter':
             $this->filter = new KalturaCategoryFilter();
             break;
         case 'categoryEntryFilter':
             $this->filter = new KalturaCategoryEntryFilter();
             break;
         case 'categoryKuserFilter':
             $this->filter = new KalturaCategoryUserFilter();
             break;
         case 'kuserFilter':
             $this->filter = new KalturaUserFilter();
             break;
         default:
             $this->filter = KalturaPluginManager::loadObject('KalturaFilter', $filterType);
     }
     if ($this->filter) {
         $this->filter->fromObject($filter);
     }
     parent::doFromObject($dbData, $responseProfile);
 }
Beispiel #11
0
 /**
  * @param int $type
  * @param bool $isAdmin
  * @return KalturaBaseEntry
  */
 static function getInstanceByType($type, $isAdmin = false)
 {
     switch ($type) {
         case KalturaEntryType::MEDIA_CLIP:
             $obj = new KalturaMediaEntry();
             break;
         case KalturaEntryType::MIX:
             $obj = new KalturaMixEntry();
             break;
         case KalturaEntryType::PLAYLIST:
             $obj = new KalturaPlaylist();
             break;
         case KalturaEntryType::DATA:
             $obj = new KalturaDataEntry();
             break;
         case KalturaEntryType::LIVE_STREAM:
             if ($isAdmin) {
                 $obj = new KalturaLiveStreamAdminEntry();
             } else {
                 $obj = new KalturaLiveStreamEntry();
             }
             break;
         case KalturaEntryType::LIVE_CHANNEL:
             $obj = new KalturaLiveChannel();
             break;
         default:
             $obj = KalturaPluginManager::loadObject('KalturaBaseEntry', $type);
             if (!$obj) {
                 $obj = new KalturaBaseEntry();
             }
             break;
     }
     return $obj;
 }
 public static function fromDbArray($arr, KalturaDetachedResponseProfile $responseProfile = null)
 {
     $newArr = new KalturaEventNotificationParameterArray();
     if ($arr == null) {
         return $newArr;
     }
     foreach ($arr as $obj) {
         $parameterType = get_class($obj);
         switch ($parameterType) {
             case 'kEventNotificationParameter':
                 $nObj = new KalturaEventNotificationParameter();
                 break;
             case 'kEventNotificationArrayParameter':
                 $nObj = new KalturaEventNotificationArrayParameter();
                 break;
             default:
                 $nObj = KalturaPluginManager::loadObject('KalturaEventNotificationParameter', $parameterType);
         }
         if ($nObj) {
             $nObj->fromObject($obj, $responseProfile);
             $newArr[] = $nObj;
         }
     }
     return $newArr;
 }
Beispiel #13
0
 /**
  * Function returns KalturaUserEntry sub-type according to protocol
  * @var string $type
  * @return KalturaUserEntry
  *
  */
 public static function getInstanceByType($type)
 {
     $obj = KalturaPluginManager::loadObject("KalturaUserEntry", $type);
     if (is_null($obj)) {
         KalturaLog::err("The type '{$type}' is unknown");
     }
     return $obj;
 }
Beispiel #14
0
 /**
  * @param int $type
  * @return KalturaDrmDevice
  */
 static function getInstanceByType($provider)
 {
     $obj = KalturaPluginManager::loadObject('KalturaDrmDevice', $provider);
     if (!$obj) {
         $obj = new KalturaDrmDevice();
     }
     return $obj;
 }
 /**
  * @param int $objectType of enum KalturaRecalculateCacheType
  * @return KRecalculateCacheEngine
  */
 public static function getInstance($objectType)
 {
     switch ($objectType) {
         case KalturaRecalculateCacheType::RESPONSE_PROFILE:
             return new KRecalculateResponseProfileCacheEngine();
         default:
             return KalturaPluginManager::loadObject('KRecalculateCacheEngine', $objectType);
     }
 }
 /**
  * @param $type
  * @param KalturaClient $client
  * @return KObjectFilterEngineBase
  */
 public static function getInstanceByType($type, KalturaClient $client)
 {
     switch ($type) {
         case KalturaObjectFilterEngineType::ENTRY:
             return new KObjectFilterBaseEntryEngine($client);
         default:
             return KalturaPluginManager::loadObject('KObjectFilterEngineBase', $type, array($client));
     }
 }
 /**
  * @param int $objectType of enum KalturaCopyObjectType
  * @return KCopyingEngine
  */
 public static function getInstance($objectType)
 {
     switch ($objectType) {
         case KalturaCopyObjectType::CATEGORY_USER:
             return new KCopyingCategoryUserEngine();
         default:
             return KalturaPluginManager::loadObject('KCopyingEngine', $objectType);
     }
 }
 /**
  * @return kStorageDeleteJobData
  */
 public static function getInstance($protocol)
 {
     $data = null;
     $data = KalturaPluginManager::loadObject('kStorageDeleteJobData', $protocol);
     if (!$data) {
         $data = new kStorageDeleteJobData();
     }
     return $data;
 }
 /**
  * Return a new instance of a class extending DropFolderFileHandler, according to give $type
  * @param KalturaDropFolderFileHandlerType $type
  * @return DropFolderFileHandler
  */
 public static function getHandler($type)
 {
     switch ($type) {
         case KalturaDropFolderFileHandlerType::CONTENT:
             return new DropFolderContentFileHandler();
         default:
             return KalturaPluginManager::loadObject('DropFolderFileHandler', $type);
     }
 }
Beispiel #20
0
 /**
  * @param int $type
  * @return KalturaFlavorAsset
  */
 static function getInstanceByType($type = null)
 {
     if ($type && $type != KalturaAssetType::THUMBNAIL) {
         $pluginObj = KalturaPluginManager::loadObject('KalturaThumbAsset', $type);
         if ($pluginObj) {
             return $pluginObj;
         }
     }
     return new KalturaThumbAsset();
 }
 static function getInstanceByDbObject(kAccessControlAction $dbObject)
 {
     switch ($dbObject->getType()) {
         case accessControlActionType::BLOCK:
             return new KalturaAccessControlBlockAction();
         case accessControlActionType::PREVIEW:
             return new KalturaAccessControlPreviewAction();
         default:
             return KalturaPluginManager::loadObject('KalturaAccessControlAction', $dbObject->getType());
     }
 }
Beispiel #22
0
 /**
  * @param string $type
  * @param string $filePath
  * @param KSchedularTaskConfig $taskConfig
  * @return KBaseMediaParser
  */
 public static function getParser($type, $filePath, KSchedularTaskConfig $taskConfig, KalturaBatchJob $job)
 {
     switch ($type) {
         case self::MEDIA_PARSER_TYPE_MEDIAINFO:
             return new KMediaInfoMediaParser($filePath, $taskConfig->params->mediaInfoCmd);
         case self::MEDIA_PARSER_TYPE_FFMPEG:
             return new KFFMpegMediaParser($filePath, $taskConfig->params->FFMpegCmd);
         default:
             return KalturaPluginManager::loadObject('KBaseMediaParser', $type, array($job, $taskConfig));
     }
 }
 /**
  * @param KalturaCaptionType $type
  * @return kCaptionsContentManager
  */
 public static function getApiContentManager($type)
 {
     switch ($type) {
         case KalturaCaptionType::SRT:
             return srtCaptionsContentManager::get();
         case KalturaCaptionType::DFXP:
             return dfxpCaptionsContentManager::get();
         default:
             return KalturaPluginManager::loadObject('kCaptionsContentManager', $type);
     }
 }
Beispiel #24
0
 /**
  * Will return the proper engine depending on the type (KalturaConversionEngineType)
  *
  * @param int $provider
  * @param KSchedularTaskConfig $taskConfig
  * @return KProvisionEngine
  */
 public static function getInstance($provider, KSchedularTaskConfig $taskConfig)
 {
     $engine = null;
     switch ($provider) {
         case KalturaSourceType::AKAMAI_LIVE:
             $engine = new KProvisionEngineAkamai($taskConfig);
             break;
         default:
             $engine = KalturaPluginManager::loadObject('KProvisionEngine', $provider, array($taskConfig));
     }
     return $engine;
 }
Beispiel #25
0
 public function getObject($objectType, array $properties, $add_underscore = true, $include_empty_fields = false)
 {
     if (isset($properties[self::EXTENSION_SUBFORM_NAME])) {
         $properties = array_merge($properties[self::EXTENSION_SUBFORM_NAME], $properties);
     }
     $object = KalturaPluginManager::loadObject('Kaltura_Client_Drm_Type_DrmProfile', $properties['provider']);
     $object = parent::loadObject($object, $properties, $add_underscore, $include_empty_fields);
     $extendTypeSubForm = $this->getSubForm(self::EXTENSION_SUBFORM_NAME);
     if ($extendTypeSubForm) {
         $object = $extendTypeSubForm->getObject($object, $objectType, $properties, $add_underscore, $include_empty_fields);
     }
     return $object;
 }
Beispiel #26
0
 /**
  * @param int $objectType of enum KalturaDeleteObjectType
  * @return KDeletingEngine
  */
 public static function getInstance($objectType)
 {
     switch ($objectType) {
         case KalturaDeleteObjectType::CATEGORY_ENTRY:
             return new KDeletingCategoryEntryEngine();
         case KalturaDeleteObjectType::CATEGORY_USER:
             return new KDeletingCategoryUserEngine();
         case KalturaDeleteObjectType::GROUP_USER:
             return new KDeletingGroupUserEngine();
         default:
             return KalturaPluginManager::loadObject('KDeletingEngine', $objectType);
     }
 }
Beispiel #27
0
 public static function getInstance($dropFolderType)
 {
     switch ($dropFolderType) {
         case KalturaDropFolderType::FTP:
         case KalturaDropFolderType::SFTP:
         case KalturaDropFolderType::LOCAL:
             return new KDropFolderFileTransferEngine();
             break;
         default:
             return KalturaPluginManager::loadObject('KDropFolderEngine', $dropFolderType);
             break;
     }
 }
Beispiel #28
0
 /**
  * @param int $protocol
  * @param KalturaStorageExportJobData $data
  * @return KExportEngine
  */
 public static function getInstance($protocol, $partnerId, KalturaStorageJobData $data)
 {
     switch ($protocol) {
         case KalturaStorageProfileProtocol::FTP:
         case KalturaStorageProfileProtocol::KALTURA_DC:
         case KalturaStorageProfileProtocol::S3:
         case KalturaStorageProfileProtocol::SCP:
         case KalturaStorageProfileProtocol::SFTP:
         case KalturaStorageProfileProtocol::LOCAL:
             return new KFileTransferExportEngine($data, $protocol);
         default:
             return KalturaPluginManager::loadObject('KExportEngine', $protocol, array($data, $partnerId));
     }
 }
 /**
  * @param int $providerType
  * @return KalturaDistributionProfile
  */
 public static function createKalturaDistributionProfile($providerType)
 {
     if ($providerType == KalturaDistributionProviderType::GENERIC) {
         return new KalturaGenericDistributionProfile();
     }
     if ($providerType == KalturaDistributionProviderType::SYNDICATION) {
         return new KalturaSyndicationDistributionProfile();
     }
     $distributionProfile = KalturaPluginManager::loadObject('KalturaDistributionProfile', $providerType);
     if ($distributionProfile) {
         return $distributionProfile;
     }
     return null;
 }
 /**
  * 
  * @param int $objectType
  * @param string $objectId
  * @return ISyncableFile
  */
 public static function retrieveObject($objectType, $objectId)
 {
     $object = null;
     switch ($objectType) {
         case FileSyncObjectType::ENTRY:
             entryPeer::setUseCriteriaFilter(false);
             $object = entryPeer::retrieveByPK($objectId);
             entryPeer::setUseCriteriaFilter(true);
             break;
         case FileSyncObjectType::UICONF:
             uiConfPeer::setUseCriteriaFilter(false);
             $object = uiConfPeer::retrieveByPK($objectId);
             uiConfPeer::setUseCriteriaFilter(true);
             break;
         case FileSyncObjectType::BATCHJOB:
             BatchJobPeer::setUseCriteriaFilter(false);
             $object = BatchJobPeer::retrieveByPK($objectId);
             BatchJobPeer::setUseCriteriaFilter(true);
             break;
         case FileSyncObjectType::FLAVOR_ASSET:
             assetPeer::setUseCriteriaFilter(false);
             $object = assetPeer::retrieveById($objectId);
             assetPeer::setUseCriteriaFilter(true);
             break;
         case FileSyncObjectType::SYNDICATION_FEED:
             syndicationFeedPeer::setUseCriteriaFilter(false);
             $object = syndicationFeedPeer::retrieveByPK($objectId);
             syndicationFeedPeer::setUseCriteriaFilter(true);
             break;
         case FileSyncObjectType::CONVERSION_PROFILE:
             conversionProfile2Peer::setUseCriteriaFilter(false);
             $object = conversionProfile2Peer::retrieveByPK($objectId);
             conversionProfile2Peer::setUseCriteriaFilter(true);
             break;
         case FileSyncObjectType::FILE_ASSET:
             conversionProfile2Peer::setUseCriteriaFilter(false);
             $object = FileAssetPeer::retrieveByPK($objectId);
             conversionProfile2Peer::setUseCriteriaFilter(true);
             break;
     }
     if ($object == null) {
         $object = KalturaPluginManager::loadObject('ISyncableFile', $objectType, array('objectId' => $objectId));
     }
     if ($object == null) {
         $error = __METHOD__ . " Cannot find object type [" . $objectType . "] with object_id [" . $objectId . "]";
         KalturaLog::err($error);
         throw new kFileSyncException($error);
     }
     return $object;
 }