. // // @ignore // =================================================================================================== /** * @package Kaltura * @subpackage Client */ class Kaltura_Client_BaseEntryService extends Kaltura_Client_ServiceBase { function __construct(Kaltura_Client_Client $client = null) { parent::__construct($client); } function add(Kaltura_Client_Type_BaseEntry $entry, $type = null) { $kparams = array(); $this->client->addParam($kparams, "entry", $entry->toParams()); $this->client->addParam($kparams, "type", $type); $this->client->queueServiceActionCall("baseentry", "add", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_BaseEntry"); return $resultObject; } function addContent($entryId, Kaltura_Client_Type_Resource $resource) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->addParam($kparams, "resource", $resource->toParams()); $this->client->queueServiceActionCall("baseentry", "addContent", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_BaseEntry"); return $resultObject; } function addFromUploadedFile(Kaltura_Client_Type_BaseEntry $entry, $uploadTokenId, $type = null) { $kparams = array(); $this->client->addParam($kparams, "entry", $entry->toParams()); $this->client->addParam($kparams, "uploadTokenId", $uploadTokenId); $this->client->addParam($kparams, "type", $type); $this->client->queueServiceActionCall("baseentry", "addFromUploadedFile", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_BaseEntry"); return $resultObject; } function get($entryId, $version = -1) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->addParam($kparams, "version", $version); $this->client->queueServiceActionCall("baseentry", "get", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_BaseEntry"); return $resultObject; } function getRemotePaths($entryId) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->queueServiceActionCall("baseentry", "getRemotePaths", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_RemotePathListResponse"); return $resultObject; } function update($entryId, Kaltura_Client_Type_BaseEntry $baseEntry) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->addParam($kparams, "baseEntry", $baseEntry->toParams()); $this->client->queueServiceActionCall("baseentry", "update", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_BaseEntry"); return $resultObject; } function updateContent($entryId, Kaltura_Client_Type_Resource $resource, $conversionProfileId = null) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->addParam($kparams, "resource", $resource->toParams()); $this->client->addParam($kparams, "conversionProfileId", $conversionProfileId); $this->client->queueServiceActionCall("baseentry", "updateContent", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_BaseEntry"); return $resultObject; } function getByIds($entryIds) { $kparams = array(); $this->client->addParam($kparams, "entryIds", $entryIds); $this->client->queueServiceActionCall("baseentry", "getByIds", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); if(!$resultObject) $resultObject = array(); $this->client->validateObjectType($resultObject, "array"); return $resultObject; } function delete($entryId) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->queueServiceActionCall("baseentry", "delete", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); return $resultObject; } function listAction(Kaltura_Client_Type_BaseEntryFilter $filter = null, Kaltura_Client_Type_FilterPager $pager = null) { $kparams = array(); if ($filter !== null) $this->client->addParam($kparams, "filter", $filter->toParams()); if ($pager !== null) $this->client->addParam($kparams, "pager", $pager->toParams()); $this->client->queueServiceActionCall("baseentry", "list", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_BaseEntryListResponse"); return $resultObject; } function listByReferenceId($refId, Kaltura_Client_Type_FilterPager $pager = null) { $kparams = array(); $this->client->addParam($kparams, "refId", $refId); if ($pager !== null) $this->client->addParam($kparams, "pager", $pager->toParams()); $this->client->queueServiceActionCall("baseentry", "listByReferenceId", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); return $resultObject; } function count(Kaltura_Client_Type_BaseEntryFilter $filter = null) { $kparams = array(); if ($filter !== null) $this->client->addParam($kparams, "filter", $filter->toParams()); $this->client->queueServiceActionCall("baseentry", "count", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "integer"); return $resultObject; } function upload($fileData) { $kparams = array(); $kfiles = array(); $this->client->addParam($kfiles, "fileData", $fileData); $this->client->queueServiceActionCall("baseentry", "upload", $kparams, $kfiles); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); if(!$resultObject) $resultObject = array(); $this->client->validateObjectType($resultObject, "string"); return $resultObject; } function updateThumbnailJpeg($entryId, $fileData) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $kfiles = array(); $this->client->addParam($kfiles, "fileData", $fileData); $this->client->queueServiceActionCall("baseentry", "updateThumbnailJpeg", $kparams, $kfiles); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_BaseEntry"); return $resultObject; } function updateThumbnailFromUrl($entryId, $url) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->addParam($kparams, "url", $url); $this->client->queueServiceActionCall("baseentry", "updateThumbnailFromUrl", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_BaseEntry"); return $resultObject; } function updateThumbnailFromSourceEntry($entryId, $sourceEntryId, $timeOffset) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->addParam($kparams, "sourceEntryId", $sourceEntryId); $this->client->addParam($kparams, "timeOffset", $timeOffset); $this->client->queueServiceActionCall("baseentry", "updateThumbnailFromSourceEntry", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_BaseEntry"); return $resultObject; } function flag(Kaltura_Client_Type_ModerationFlag $moderationFlag) { $kparams = array(); $this->client->addParam($kparams, "moderationFlag", $moderationFlag->toParams()); $this->client->queueServiceActionCall("baseentry", "flag", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); return $resultObject; } function reject($entryId) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->queueServiceActionCall("baseentry", "reject", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); return $resultObject; } function approve($entryId) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->queueServiceActionCall("baseentry", "approve", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); return $resultObject; } function listFlags($entryId, Kaltura_Client_Type_FilterPager $pager = null) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); if ($pager !== null) $this->client->addParam($kparams, "pager", $pager->toParams()); $this->client->queueServiceActionCall("baseentry", "listFlags", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_ModerationFlagListResponse"); return $resultObject; } function anonymousRank($entryId, $rank) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->addParam($kparams, "rank", $rank); $this->client->queueServiceActionCall("baseentry", "anonymousRank", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); return $resultObject; } function getContextData($entryId, Kaltura_Client_Type_EntryContextDataParams $contextDataParams) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->addParam($kparams, "contextDataParams", $contextDataParams->toParams()); $this->client->queueServiceActionCall("baseentry", "getContextData", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_EntryContextDataResult"); return $resultObject; } function export($entryId, $storageProfileId) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->addParam($kparams, "storageProfileId", $storageProfileId); $this->client->queueServiceActionCall("baseentry", "export", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_BaseEntry"); return $resultObject; } function index($id, $shouldUpdate = true) { $kparams = array(); $this->client->addParam($kparams, "id", $id); $this->client->addParam($kparams, "shouldUpdate", $shouldUpdate); $this->client->queueServiceActionCall("baseentry", "index", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "integer"); return $resultObject; } }