All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.kaltura.client.services.KalturaCuePointService Maven / Gradle / Ivy

Go to download

KalturaClient is a library of Java classes that can be used to interact with the Kaltura REST API. More information about the REST API can be found at http://corp.kaltura.com/Products/Kaltura-API Many of the Java classes in this library are auto-generated from a schema that defines the objects that are used to interect with the API. The current schema can be found at http://www.kaltura.com/api_v3/api_schema.php

The newest version!
// ===================================================================================================
//                           _  __     _ _
//                          | |/ /__ _| | |_ _  _ _ _ __ _
//                          | ' .
//
// @ignore
// ===================================================================================================
package com.kaltura.client.services;

import com.kaltura.client.KalturaClient;
import com.kaltura.client.KalturaServiceBase;
import com.kaltura.client.types.*;
import org.w3c.dom.Element;
import com.kaltura.client.utils.ParseUtils;
import com.kaltura.client.KalturaParams;
import com.kaltura.client.KalturaApiException;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import com.kaltura.client.KalturaFiles;
import com.kaltura.client.KalturaFile;

/**
 * This class was generated using generate.php
 * against an XML schema provided by Kaltura.
 * 
 * MANUAL CHANGES TO THIS CLASS WILL BE OVERWRITTEN.
 */

/**  Cue Point service    */
@SuppressWarnings("serial")
public class KalturaCuePointService extends KalturaServiceBase {
    public KalturaCuePointService(KalturaClient client) {
        this.kalturaClient = client;
    }

	/**  Allows you to add an cue point object associated with an entry     */
    public KalturaCuePoint add(KalturaCuePoint cuePoint) throws KalturaApiException {
        KalturaParams kparams = new KalturaParams();
        kparams.add("cuePoint", cuePoint);
        this.kalturaClient.queueServiceCall("cuepoint_cuepoint", "add", kparams, KalturaCuePoint.class);
        if (this.kalturaClient.isMultiRequest())
            return null;
        Element resultXmlElement = this.kalturaClient.doQueue();
        return ParseUtils.parseObject(KalturaCuePoint.class, resultXmlElement);
    }

    public KalturaCuePointListResponse addFromBulk(File fileData) throws KalturaApiException {
        return this.addFromBulk(new KalturaFile(fileData));
    }

    public KalturaCuePointListResponse addFromBulk(InputStream fileData, String fileDataName, long fileDataSize) throws KalturaApiException {
        return this.addFromBulk(new KalturaFile(fileData, fileDataName, fileDataSize));
    }

    public KalturaCuePointListResponse addFromBulk(FileInputStream fileData, String fileDataName) throws KalturaApiException {
        return this.addFromBulk(new KalturaFile(fileData, fileDataName));
    }

	/**  Allows you to add multiple cue points objects by uploading XML that contains
	  multiple cue point definitions     */
    public KalturaCuePointListResponse addFromBulk(KalturaFile fileData) throws KalturaApiException {
        KalturaParams kparams = new KalturaParams();
        KalturaFiles kfiles = new KalturaFiles();
        kfiles.add("fileData", fileData);
        this.kalturaClient.queueServiceCall("cuepoint_cuepoint", "addFromBulk", kparams, kfiles, KalturaCuePointListResponse.class);
        if (this.kalturaClient.isMultiRequest())
            return null;
        Element resultXmlElement = this.kalturaClient.doQueue();
        return ParseUtils.parseObject(KalturaCuePointListResponse.class, resultXmlElement);
    }

    public String serveBulk() throws KalturaApiException {
        return this.serveBulk(null);
    }

    public String serveBulk(KalturaCuePointFilter filter) throws KalturaApiException {
        return this.serveBulk(filter, null);
    }

	/**  Download multiple cue points objects as XML definitions     */
    public String serveBulk(KalturaCuePointFilter filter, KalturaFilterPager pager) throws KalturaApiException {
        KalturaParams kparams = new KalturaParams();
        kparams.add("filter", filter);
        kparams.add("pager", pager);
        this.kalturaClient.queueServiceCall("cuepoint_cuepoint", "serveBulk", kparams);
        return this.kalturaClient.serve();
    }

	/**  Retrieve an CuePoint object by id     */
    public KalturaCuePoint get(String id) throws KalturaApiException {
        KalturaParams kparams = new KalturaParams();
        kparams.add("id", id);
        this.kalturaClient.queueServiceCall("cuepoint_cuepoint", "get", kparams, KalturaCuePoint.class);
        if (this.kalturaClient.isMultiRequest())
            return null;
        Element resultXmlElement = this.kalturaClient.doQueue();
        return ParseUtils.parseObject(KalturaCuePoint.class, resultXmlElement);
    }

    public KalturaCuePointListResponse list() throws KalturaApiException {
        return this.list(null);
    }

    public KalturaCuePointListResponse list(KalturaCuePointFilter filter) throws KalturaApiException {
        return this.list(filter, null);
    }

	/**  List cue point objects by filter and pager     */
    public KalturaCuePointListResponse list(KalturaCuePointFilter filter, KalturaFilterPager pager) throws KalturaApiException {
        KalturaParams kparams = new KalturaParams();
        kparams.add("filter", filter);
        kparams.add("pager", pager);
        this.kalturaClient.queueServiceCall("cuepoint_cuepoint", "list", kparams, KalturaCuePointListResponse.class);
        if (this.kalturaClient.isMultiRequest())
            return null;
        Element resultXmlElement = this.kalturaClient.doQueue();
        return ParseUtils.parseObject(KalturaCuePointListResponse.class, resultXmlElement);
    }

    public int count() throws KalturaApiException {
        return this.count(null);
    }

	/**  count cue point objects by filter     */
    public int count(KalturaCuePointFilter filter) throws KalturaApiException {
        KalturaParams kparams = new KalturaParams();
        kparams.add("filter", filter);
        this.kalturaClient.queueServiceCall("cuepoint_cuepoint", "count", kparams);
        if (this.kalturaClient.isMultiRequest())
            return 0;
        Element resultXmlElement = this.kalturaClient.doQueue();
        String resultText = resultXmlElement.getTextContent();
        return ParseUtils.parseInt(resultText);
    }

	/**  Update cue point by id      */
    public KalturaCuePoint update(String id, KalturaCuePoint cuePoint) throws KalturaApiException {
        KalturaParams kparams = new KalturaParams();
        kparams.add("id", id);
        kparams.add("cuePoint", cuePoint);
        this.kalturaClient.queueServiceCall("cuepoint_cuepoint", "update", kparams, KalturaCuePoint.class);
        if (this.kalturaClient.isMultiRequest())
            return null;
        Element resultXmlElement = this.kalturaClient.doQueue();
        return ParseUtils.parseObject(KalturaCuePoint.class, resultXmlElement);
    }

	/**  delete cue point by id, and delete all children cue points     */
    public void delete(String id) throws KalturaApiException {
        KalturaParams kparams = new KalturaParams();
        kparams.add("id", id);
        this.kalturaClient.queueServiceCall("cuepoint_cuepoint", "delete", kparams);
        if (this.kalturaClient.isMultiRequest())
            return ;
        this.kalturaClient.doQueue();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy