public function toObject($dbData = null, $props_to_skip = array())
 {
     if (is_null($dbData)) {
         $dbData = new kIndexTagsByPrivacyContextJobData();
     }
     return parent::toObject($dbData, $props_to_skip);
 }
Пример #2
0
 public function toObject($dbData = null, $propsToSkip = array())
 {
     if (is_null($dbData)) {
         $dbData = new kFlattenJobData();
     }
     return parent::toObject($dbData);
 }
 public function toObject($dbData = null, $props_to_skip = array())
 {
     if (is_null($dbData)) {
         $dbData = new kMoveCategoryEntriesJobData();
     }
     return parent::toObject($dbData);
 }
 public function toObject($dbData = null, $props_to_skip = array())
 {
     if (is_null($dbData)) {
         $dbData = new kTransformMetadataJobData();
     }
     return parent::toObject($dbData, $props_to_skip);
 }
 public function toObject($dbCaptureThumbJobData = null, $props_to_skip = array())
 {
     if (is_null($dbCaptureThumbJobData)) {
         $dbCaptureThumbJobData = new kCaptureThumbJobData();
     }
     return parent::toObject($dbCaptureThumbJobData, $props_to_skip);
 }
 public function toObject($dbData = null, $props_to_skip = array())
 {
     if (is_null($dbData)) {
         $dbData = new kSyncCategoryPrivacyContextJobData();
     }
     return parent::toObject($dbData);
 }
 public function toObject($dbData = null, $props_to_skip = array())
 {
     if (is_null($dbData)) {
         $dbData = new kDropFolderContentProcessorJobData();
     }
     return parent::toObject($dbData, $props_to_skip);
 }
Пример #8
0
 public function toObject($dbData = null, $props_to_skip = array())
 {
     if (is_null($dbData)) {
         $dbData = new kBulkUploadJobData();
     }
     return parent::toObject($dbData);
 }
 public function toObject($dbData = null, $props_to_skip = array())
 {
     if (is_null($dbData)) {
         $dbData = new kNotificationJobData();
     }
     return parent::toObject($dbData, $props_to_skip);
 }
 public function toObject($dbData = null, $props_to_skip = array())
 {
     if (is_null($dbData)) {
         $dbData = new kFileSyncImportJobData();
     }
     return parent::toObject($dbData, $props_to_skip);
 }
 public function toObject($dbData = null, $props_to_skip = array())
 {
     if (is_null($dbData)) {
         $dbData = new kConvertProfileJobData();
     }
     return parent::toObject($dbData);
 }
 public function toObject($dbData = null, $props_to_skip = array())
 {
     if (is_null($dbData)) {
         $dbData = new kCopyJobData();
     }
     $dbData->setTemplateObject($this->templateObject->toInsertableObject());
     return parent::toObject($dbData, $props_to_skip);
 }
 public function toObject($objectToFill = null, $propsToSkip = array())
 {
     if (is_null($objectToFill)) {
         $objectToFill = new kScheduledTaskJobData();
     }
     /** @var kScheduledTaskJobData $objectToFill */
     $objectToFill = parent::toObject($objectToFill, $propsToSkip);
     return $objectToFill;
 }
 public function toObject($dbCaptureThumbJobData = null, $props_to_skip = array())
 {
     if (is_null($dbCaptureThumbJobData)) {
         $dbCaptureThumbJobData = new kCaptureThumbJobData();
     }
     if ($this->thumbParamsOutput instanceof KalturaThumbParams) {
         $dbThumbParams = new thumbParamsOutput();
         $dbThumbParams = $this->thumbParamsOutput->toObject($dbThumbParams);
         $dbCaptureThumbJobData->setThumbParamsOutput($dbThumbParams);
     }
     return parent::toObject($dbCaptureThumbJobData, $props_to_skip);
 }
Пример #15
0
 public function toObject($dbConvartableJobData = null, $props_to_skip = array())
 {
     if (is_null($dbConvartableJobData)) {
         $dbConvartableJobData = new kConvartableJobData();
     }
     if ($this->flavorParamsOutput instanceof KalturaFlavorParams) {
         $dbFlavorParams = new flavorParamsOutput();
         $dbFlavorParams = $this->flavorParamsOutput->toObject($dbFlavorParams);
         $dbConvartableJobData->setFlavorParamsOutput($dbFlavorParams);
     }
     return parent::toObject($dbConvartableJobData, $props_to_skip);
 }
Пример #16
0
 public function toObject($object = null, $skip = array())
 {
     if (is_null($object)) {
         $object = new kIntegrationJobData();
     }
     $object = parent::toObject($object, $skip);
     if ($this->providerType && $this->providerData && $this->providerData instanceof KalturaIntegrationJobProviderData) {
         $providerData = KalturaPluginManager::loadObject('kIntegrationJobProviderData', $this->providerType);
         if ($providerData) {
             $providerData = $this->providerData->toObject($providerData);
             $object->setProviderData($providerData);
         }
     }
     if ($this->triggerType && $this->triggerData && $this->triggerData instanceof KalturaIntegrationJobTriggerData) {
         $triggerData = KalturaPluginManager::loadObject('kIntegrationJobTriggerData', $this->triggerType);
         if ($triggerData) {
             $triggerData = $this->triggerData->toObject($triggerData);
             $object->setTriggerData($triggerData);
         }
     }
     return $object;
 }
Пример #17
0
 public function toData(BatchJob $dbBatchJob)
 {
     $dbData = null;
     if (is_null($this->jobType)) {
         $this->jobType = kPluginableEnumsManager::coreToApi('BatchJobType', $dbBatchJob->getJobType());
     }
     switch ($dbBatchJob->getJobType()) {
         case KalturaBatchJobType::BULKUPLOAD:
             $dbData = new kBulkUploadJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaBulkUploadJobData();
             }
             break;
         case KalturaBatchJobType::CONVERT:
             $dbData = new kConvertJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaConvertJobData();
             }
             break;
         case KalturaBatchJobType::CONVERT_PROFILE:
             $dbData = new kConvertProfileJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaConvertProfileJobData();
             }
             break;
         case KalturaBatchJobType::EXTRACT_MEDIA:
             $dbData = new kExtractMediaJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaExtractMediaJobData();
             }
             break;
         case KalturaBatchJobType::IMPORT:
             $dbData = new kImportJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaImportJobData();
             }
             break;
         case KalturaBatchJobType::POSTCONVERT:
             $dbData = new kPostConvertJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaPostConvertJobData();
             }
             break;
         case KalturaBatchJobType::MAIL:
             $dbData = new kMailJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaMailJobData();
             }
             break;
         case KalturaBatchJobType::NOTIFICATION:
             $dbData = new kNotificationJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaNotificationJobData();
             }
             break;
         case KalturaBatchJobType::BULKDOWNLOAD:
             $dbData = new kBulkDownloadJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaBulkDownloadJobData();
             }
             break;
         case KalturaBatchJobType::FLATTEN:
             $dbData = new kFlattenJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaFlattenJobData();
             }
             break;
         case KalturaBatchJobType::PROVISION_PROVIDE:
         case KalturaBatchJobType::PROVISION_DELETE:
             $jobSubType = $dbBatchJob->getJobSubType();
             $dbData = kAkamaiProvisionJobData::getInstance($jobSubType);
             if (is_null($this->data)) {
                 $this->data = KalturaProvisionJobData::getJobDataInstance($jobSubType);
             }
             break;
         case KalturaBatchJobType::CONVERT_COLLECTION:
             $dbData = new kConvertCollectionJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaConvertCollectionJobData();
             }
             break;
         case KalturaBatchJobType::STORAGE_EXPORT:
             $dbData = new kStorageExportJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaStorageExportJobData();
             }
             break;
         case KalturaBatchJobType::MOVE_CATEGORY_ENTRIES:
             $dbData = new kMoveCategoryEntriesJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaMoveCategoryEntriesJobData();
             }
             break;
         case KalturaBatchJobType::STORAGE_DELETE:
             $dbData = new kStorageDeleteJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaStorageDeleteJobData();
             }
             break;
         case KalturaBatchJobType::CAPTURE_THUMB:
             $dbData = new kCaptureThumbJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaCaptureThumbJobData();
             }
             break;
         case KalturaBatchJobType::INDEX:
             $dbData = new kIndexJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaIndexJobData();
             }
             break;
         case KalturaBatchJobType::COPY:
             $dbData = new kCopyJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaCopyJobData();
             }
             break;
         case KalturaBatchJobType::DELETE:
             $dbData = new kDeleteJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaDeleteJobData();
             }
             break;
         case KalturaBatchJobType::DELETE_FILE:
             $dbData = new kDeleteFileJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaDeleteFileJobData();
             }
             break;
         case KalturaBatchJobType::CONVERT_LIVE_SEGMENT:
             $dbData = new kConvertLiveSegmentJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaConvertLiveSegmentJobData();
             }
             break;
         case KalturaBatchJobType::CONCAT:
             $dbData = new kConcatJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaConcatJobData();
             }
             break;
         case KalturaBatchJobType::COPY_PARTNER:
             $dbData = new kCopyPartnerJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaCopyPartnerJobData();
             }
             break;
         case KalturaBatchJobType::RECALCULATE_CACHE:
             switch ($dbBatchJob->getJobSubType()) {
                 case RecalculateCacheType::RESPONSE_PROFILE:
                     $dbData = new kRecalculateResponseProfileCacheJobData();
                     if (is_null($this->data)) {
                         $this->data = new KalturaRecalculateResponseProfileCacheJobData();
                     }
                     break;
             }
             break;
         default:
             $dbData = KalturaPluginManager::loadObject('kJobData', $dbBatchJob->getJobType());
             if (is_null($this->data)) {
                 $this->data = KalturaPluginManager::loadObject('KalturaJobData', $this->jobType);
             }
     }
     if (is_null($dbBatchJob->getData())) {
         $dbBatchJob->setData($dbData);
     }
     if ($this->data instanceof KalturaJobData) {
         $dbData = $this->data->toObject($dbBatchJob->getData());
         $dbBatchJob->setData($dbData);
     }
     return $dbData;
 }
 public function toObject($object = null, $skip = array())
 {
     $object = parent::toObject($object, $skip);
     if ($this->mediaFiles) {
         $mediaFiles = array();
         foreach ($this->mediaFiles as $mediaFile) {
             $mediaFiles[] = $mediaFile->toObject();
         }
         $object->setMediaFiles($mediaFiles);
     }
     if ($this->providerType && $this->providerData && $this->providerData instanceof KalturaDistributionJobProviderData) {
         $providerData = null;
         if ($this->providerType == KalturaDistributionProviderType::GENERIC) {
             $providerData = new kGenericDistributionJobProviderData($object);
         } else {
             $providerData = KalturaPluginManager::loadObject('kDistributionJobProviderData', $this->providerType, array($object));
         }
         if ($providerData) {
             $providerData = $this->providerData->toObject($providerData);
             $object->setProviderData($providerData);
         }
     }
     return $object;
 }
Пример #19
0
 public function toData(BatchJob $dbBatchJob)
 {
     $dbData = null;
     if (is_null($this->jobType)) {
         $this->jobType = kPluginableEnumsManager::coreToApi('BatchJobType', $dbBatchJob->getJobType());
     }
     switch ($dbBatchJob->getJobType()) {
         case KalturaBatchJobType::BULKUPLOAD:
             $dbData = new kBulkUploadJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaBulkUploadJobData();
             }
             break;
         case KalturaBatchJobType::CONVERT:
             $dbData = new kConvertJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaConvertJobData();
             }
             break;
         case KalturaBatchJobType::CONVERT_PROFILE:
             $dbData = new kConvertProfileJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaConvertProfileJobData();
             }
             break;
         case KalturaBatchJobType::EXTRACT_MEDIA:
             $dbData = new kExtractMediaJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaExtractMediaJobData();
             }
             break;
         case KalturaBatchJobType::IMPORT:
             $dbData = new kImportJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaImportJobData();
             }
             break;
         case KalturaBatchJobType::POSTCONVERT:
             $dbData = new kPostConvertJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaPostConvertJobData();
             }
             break;
         case KalturaBatchJobType::PULL:
             $dbData = new kPullJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaPullJobData();
             }
             break;
         case KalturaBatchJobType::REMOTE_CONVERT:
             $dbData = new kRemoteConvertJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaRemoteConvertJobData();
             }
             break;
         case KalturaBatchJobType::MAIL:
             $dbData = new kMailJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaMailJobData();
             }
             break;
         case KalturaBatchJobType::NOTIFICATION:
             $dbData = new kNotificationJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaNotificationJobData();
             }
             break;
         case KalturaBatchJobType::BULKDOWNLOAD:
             $dbData = new kBulkDownloadJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaBulkDownloadJobData();
             }
             break;
         case KalturaBatchJobType::FLATTEN:
             $dbData = new kFlattenJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaFlattenJobData();
             }
             break;
         case KalturaBatchJobType::PROVISION_PROVIDE:
         case KalturaBatchJobType::PROVISION_DELETE:
             $dbData = new kProvisionJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaProvisionJobData();
             }
             break;
         case KalturaBatchJobType::CONVERT_COLLECTION:
             $dbData = new kConvertCollectionJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaConvertCollectionJobData();
             }
             break;
         case KalturaBatchJobType::STORAGE_EXPORT:
             $dbData = new kStorageExportJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaStorageExportJobData();
             }
             break;
         case KalturaBatchJobType::STORAGE_DELETE:
             $dbData = new kStorageDeleteJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaStorageDeleteJobData();
             }
             break;
         case KalturaBatchJobType::CAPTURE_THUMB:
             $dbData = new kCaptureThumbJobData();
             if (is_null($this->data)) {
                 $this->data = new KalturaCaptureThumbJobData();
             }
             break;
         default:
             $dbData = KalturaPluginManager::loadObject('kJobData', $dbBatchJob->getJobType());
             if (is_null($this->data)) {
                 $this->data = KalturaPluginManager::loadObject('KalturaJobData', $this->jobType);
             }
     }
     if (is_null($dbBatchJob->getData())) {
         $dbBatchJob->setData($dbData);
     }
     if ($this->data instanceof KalturaJobData) {
         $dbData = $this->data->toObject($dbBatchJob->getData());
         $dbBatchJob->setData($dbData);
     }
     return $dbData;
 }