public function shouldConsumeJobStatusEvent(BatchJob $dbBatchJob) { $jobTypes = array(ContentDistributionPlugin::getBatchJobTypeCoreValue(ContentDistributionBatchJobType::DISTRIBUTION_SUBMIT), ContentDistributionPlugin::getBatchJobTypeCoreValue(ContentDistributionBatchJobType::DISTRIBUTION_UPDATE)); if (!in_array($dbBatchJob->getJobType(), $jobTypes)) { // wrong job type return false; } $data = $dbBatchJob->getData(); if (!$data instanceof kDistributionJobData) { KalturaLog::err('Wrong job data type'); return false; } $crossKalturaCoreValueType = kPluginableEnumsManager::apiToCore('DistributionProviderType', CrossKalturaDistributionPlugin::getApiValue(CrossKalturaDistributionProviderType::CROSS_KALTURA)); if ($data->getProviderType() == $crossKalturaCoreValueType) { return true; } // not the right provider return false; }
public function getProvider() { return CrossKalturaDistributionPlugin::getProvider(); }
public function getType() { return CrossKalturaDistributionPlugin::getDistributionProviderTypeCoreValue(CrossKalturaDistributionProviderType::CROSS_KALTURA); }