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

com.kaltura.client.services.ThumbAssetService 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

There is a newer version: 19.3.0
Show newest version
// ===================================================================================================
//                           _  __     _ _
//                          | |/ /__ _| | |_ _  _ _ _ __ _
//                          | ' .
//
// @ignore
// ===================================================================================================
package com.kaltura.client.services;

import com.kaltura.client.FileHolder;
import com.kaltura.client.Files;
import com.kaltura.client.types.AssetFilter;
import com.kaltura.client.types.ContentResource;
import com.kaltura.client.types.FilterPager;
import com.kaltura.client.types.FlavorAsset;
import com.kaltura.client.types.RemotePath;
import com.kaltura.client.types.ThumbAsset;
import com.kaltura.client.types.ThumbParams;
import com.kaltura.client.types.ThumbnailServeOptions;
import com.kaltura.client.utils.request.ArrayRequestBuilder;
import com.kaltura.client.utils.request.ListResponseRequestBuilder;
import com.kaltura.client.utils.request.NullRequestBuilder;
import com.kaltura.client.utils.request.RequestBuilder;
import com.kaltura.client.utils.request.ServeRequestBuilder;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;

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

/**
 * Retrieve information and invoke actions on Thumb Asset
 * 
 * @param entryId 
 * @param thumbAsset 
 * @param entryId 
 * @param fileData 
 * @param entryId 
 * @param url 
 * @param thumbAssetId 
 * @param assetId 
 * @param storageProfileId 
 * @param entryId 
 * @param thumbParams 
 * @param sourceAssetId id of the source asset (flavor or thumbnail) to be used as source for the
 * thumbnail generation
 * @param entryId 
 * @param destThumbParamsId indicate the id of the ThumbParams to be generate this thumbnail by
 * @param thumbAssetId 
 * @param entryId 
 * @param id 
 * @param id 
 * @param storageId 
 * @param thumbParams 
 * @param filter 
 * @param pager 
 * @param thumbAssetId 
 * @param thumbAssetId 
 * @param version 
 * @param thumbParams 
 * @param options 
 * @param entryId 
 * @param thumbParamId if not set, default thumbnail will be used.
 * @param thumbAssetId 
 * @param id 
 * @param contentResource 
 * @param id 
 * @param thumbAsset 
 */
public class ThumbAssetService {
	
	public static class AddThumbAssetBuilder extends RequestBuilder {
		
		public AddThumbAssetBuilder(String entryId, ThumbAsset thumbAsset) {
			super(ThumbAsset.class, "thumbasset", "add");
			params.add("entryId", entryId);
			params.add("thumbAsset", thumbAsset);
		}
		
		public void entryId(String multirequestToken) {
			params.add("entryId", multirequestToken);
		}
	}

	/**
	 * Add thumbnail asset
	 * 
	 * @param entryId 
	 * @param thumbAsset 
	 */
    public static AddThumbAssetBuilder add(String entryId, ThumbAsset thumbAsset)  {
		return new AddThumbAssetBuilder(entryId, thumbAsset);
	}
	
	public static class AddFromImageThumbAssetBuilder extends RequestBuilder {
		
		public AddFromImageThumbAssetBuilder(String entryId, FileHolder fileData) {
			super(ThumbAsset.class, "thumbasset", "addFromImage");
			params.add("entryId", entryId);
			files = new Files();
			files.add("fileData", fileData);
		}
		
		public void entryId(String multirequestToken) {
			params.add("entryId", multirequestToken);
		}
	}

	public static AddFromImageThumbAssetBuilder addFromImage(String entryId, File fileData)  {
		return addFromImage(entryId, new FileHolder(fileData));
	}

	public static AddFromImageThumbAssetBuilder addFromImage(String entryId, InputStream fileData, String fileDataMimeType, String fileDataName, long fileDataSize)  {
		return addFromImage(entryId, new FileHolder(fileData, fileDataMimeType, fileDataName, fileDataSize));
	}

	public static AddFromImageThumbAssetBuilder addFromImage(String entryId, FileInputStream fileData, String fileDataMimeType, String fileDataName)  {
		return addFromImage(entryId, new FileHolder(fileData, fileDataMimeType, fileDataName));
	}

    public static AddFromImageThumbAssetBuilder addFromImage(String entryId, FileHolder fileData)  {
		return new AddFromImageThumbAssetBuilder(entryId, fileData);
	}
	
	public static class AddFromUrlThumbAssetBuilder extends RequestBuilder {
		
		public AddFromUrlThumbAssetBuilder(String entryId, String url) {
			super(ThumbAsset.class, "thumbasset", "addFromUrl");
			params.add("entryId", entryId);
			params.add("url", url);
		}
		
		public void entryId(String multirequestToken) {
			params.add("entryId", multirequestToken);
		}
		
		public void url(String multirequestToken) {
			params.add("url", multirequestToken);
		}
	}

    public static AddFromUrlThumbAssetBuilder addFromUrl(String entryId, String url)  {
		return new AddFromUrlThumbAssetBuilder(entryId, url);
	}
	
	public static class DeleteThumbAssetBuilder extends NullRequestBuilder {
		
		public DeleteThumbAssetBuilder(String thumbAssetId) {
			super("thumbasset", "delete");
			params.add("thumbAssetId", thumbAssetId);
		}
		
		public void thumbAssetId(String multirequestToken) {
			params.add("thumbAssetId", multirequestToken);
		}
	}

    public static DeleteThumbAssetBuilder delete(String thumbAssetId)  {
		return new DeleteThumbAssetBuilder(thumbAssetId);
	}
	
	public static class ExportThumbAssetBuilder extends RequestBuilder {
		
		public ExportThumbAssetBuilder(String assetId, int storageProfileId) {
			super(FlavorAsset.class, "thumbasset", "export");
			params.add("assetId", assetId);
			params.add("storageProfileId", storageProfileId);
		}
		
		public void assetId(String multirequestToken) {
			params.add("assetId", multirequestToken);
		}
		
		public void storageProfileId(String multirequestToken) {
			params.add("storageProfileId", multirequestToken);
		}
	}

	/**
	 * manually export an asset
	 * 
	 * @param assetId 
	 * @param storageProfileId 
	 */
    public static ExportThumbAssetBuilder export(String assetId, int storageProfileId)  {
		return new ExportThumbAssetBuilder(assetId, storageProfileId);
	}
	
	public static class GenerateThumbAssetBuilder extends RequestBuilder {
		
		public GenerateThumbAssetBuilder(String entryId, ThumbParams thumbParams, String sourceAssetId) {
			super(ThumbAsset.class, "thumbasset", "generate");
			params.add("entryId", entryId);
			params.add("thumbParams", thumbParams);
			params.add("sourceAssetId", sourceAssetId);
		}
		
		public void entryId(String multirequestToken) {
			params.add("entryId", multirequestToken);
		}
		
		public void sourceAssetId(String multirequestToken) {
			params.add("sourceAssetId", multirequestToken);
		}
	}

	public static GenerateThumbAssetBuilder generate(String entryId, ThumbParams thumbParams)  {
		return generate(entryId, thumbParams, null);
	}

    public static GenerateThumbAssetBuilder generate(String entryId, ThumbParams thumbParams, String sourceAssetId)  {
		return new GenerateThumbAssetBuilder(entryId, thumbParams, sourceAssetId);
	}
	
	public static class GenerateByEntryIdThumbAssetBuilder extends RequestBuilder {
		
		public GenerateByEntryIdThumbAssetBuilder(String entryId, int destThumbParamsId) {
			super(ThumbAsset.class, "thumbasset", "generateByEntryId");
			params.add("entryId", entryId);
			params.add("destThumbParamsId", destThumbParamsId);
		}
		
		public void entryId(String multirequestToken) {
			params.add("entryId", multirequestToken);
		}
		
		public void destThumbParamsId(String multirequestToken) {
			params.add("destThumbParamsId", multirequestToken);
		}
	}

    public static GenerateByEntryIdThumbAssetBuilder generateByEntryId(String entryId, int destThumbParamsId)  {
		return new GenerateByEntryIdThumbAssetBuilder(entryId, destThumbParamsId);
	}
	
	public static class GetThumbAssetBuilder extends RequestBuilder {
		
		public GetThumbAssetBuilder(String thumbAssetId) {
			super(ThumbAsset.class, "thumbasset", "get");
			params.add("thumbAssetId", thumbAssetId);
		}
		
		public void thumbAssetId(String multirequestToken) {
			params.add("thumbAssetId", multirequestToken);
		}
	}

    public static GetThumbAssetBuilder get(String thumbAssetId)  {
		return new GetThumbAssetBuilder(thumbAssetId);
	}
	
	public static class GetByEntryIdThumbAssetBuilder extends ArrayRequestBuilder {
		
		public GetByEntryIdThumbAssetBuilder(String entryId) {
			super(ThumbAsset.class, "thumbasset", "getByEntryId");
			params.add("entryId", entryId);
		}
		
		public void entryId(String multirequestToken) {
			params.add("entryId", multirequestToken);
		}
	}

    public static GetByEntryIdThumbAssetBuilder getByEntryId(String entryId)  {
		return new GetByEntryIdThumbAssetBuilder(entryId);
	}
	
	public static class GetRemotePathsThumbAssetBuilder extends ListResponseRequestBuilder {
		
		public GetRemotePathsThumbAssetBuilder(String id) {
			super(RemotePath.class, "thumbasset", "getRemotePaths");
			params.add("id", id);
		}
		
		public void id(String multirequestToken) {
			params.add("id", multirequestToken);
		}
	}

	/**
	 * Get remote storage existing paths for the asset
	 * 
	 * @param id 
	 */
    public static GetRemotePathsThumbAssetBuilder getRemotePaths(String id)  {
		return new GetRemotePathsThumbAssetBuilder(id);
	}
	
	public static class GetUrlThumbAssetBuilder extends RequestBuilder {
		
		public GetUrlThumbAssetBuilder(String id, int storageId, ThumbParams thumbParams) {
			super(String.class, "thumbasset", "getUrl");
			params.add("id", id);
			params.add("storageId", storageId);
			params.add("thumbParams", thumbParams);
		}
		
		public void id(String multirequestToken) {
			params.add("id", multirequestToken);
		}
		
		public void storageId(String multirequestToken) {
			params.add("storageId", multirequestToken);
		}
	}

	public static GetUrlThumbAssetBuilder getUrl(String id)  {
		return getUrl(id, Integer.MIN_VALUE);
	}

	public static GetUrlThumbAssetBuilder getUrl(String id, int storageId)  {
		return getUrl(id, storageId, null);
	}

	/**
	 * Get download URL for the asset
	 * 
	 * @param id 
	 * @param storageId 
	 * @param thumbParams 
	 */
    public static GetUrlThumbAssetBuilder getUrl(String id, int storageId, ThumbParams thumbParams)  {
		return new GetUrlThumbAssetBuilder(id, storageId, thumbParams);
	}
	
	public static class ListThumbAssetBuilder extends ListResponseRequestBuilder {
		
		public ListThumbAssetBuilder(AssetFilter filter, FilterPager pager) {
			super(ThumbAsset.class, "thumbasset", "list");
			params.add("filter", filter);
			params.add("pager", pager);
		}
	}

	public static ListThumbAssetBuilder list()  {
		return list(null);
	}

	public static ListThumbAssetBuilder list(AssetFilter filter)  {
		return list(filter, null);
	}

	/**
	 * List Thumbnail Assets by filter and pager
	 * 
	 * @param filter 
	 * @param pager 
	 */
    public static ListThumbAssetBuilder list(AssetFilter filter, FilterPager pager)  {
		return new ListThumbAssetBuilder(filter, pager);
	}
	
	public static class RegenerateThumbAssetBuilder extends RequestBuilder {
		
		public RegenerateThumbAssetBuilder(String thumbAssetId) {
			super(ThumbAsset.class, "thumbasset", "regenerate");
			params.add("thumbAssetId", thumbAssetId);
		}
		
		public void thumbAssetId(String multirequestToken) {
			params.add("thumbAssetId", multirequestToken);
		}
	}

    public static RegenerateThumbAssetBuilder regenerate(String thumbAssetId)  {
		return new RegenerateThumbAssetBuilder(thumbAssetId);
	}
	
	public static class ServeThumbAssetBuilder extends ServeRequestBuilder {
		
		public ServeThumbAssetBuilder(String thumbAssetId, int version, ThumbParams thumbParams, ThumbnailServeOptions options) {
			super("thumbasset", "serve");
			params.add("thumbAssetId", thumbAssetId);
			params.add("version", version);
			params.add("thumbParams", thumbParams);
			params.add("options", options);
		}
		
		public void thumbAssetId(String multirequestToken) {
			params.add("thumbAssetId", multirequestToken);
		}
		
		public void version(String multirequestToken) {
			params.add("version", multirequestToken);
		}
	}

	public static ServeThumbAssetBuilder serve(String thumbAssetId)  {
		return serve(thumbAssetId, Integer.MIN_VALUE);
	}

	public static ServeThumbAssetBuilder serve(String thumbAssetId, int version)  {
		return serve(thumbAssetId, version, null);
	}

	public static ServeThumbAssetBuilder serve(String thumbAssetId, int version, ThumbParams thumbParams)  {
		return serve(thumbAssetId, version, thumbParams, null);
	}

	/**
	 * Serves thumbnail by its id
	 * 
	 * @param thumbAssetId 
	 * @param version 
	 * @param thumbParams 
	 * @param options 
	 */
    public static ServeThumbAssetBuilder serve(String thumbAssetId, int version, ThumbParams thumbParams, ThumbnailServeOptions options)  {
		return new ServeThumbAssetBuilder(thumbAssetId, version, thumbParams, options);
	}
	
	public static class ServeByEntryIdThumbAssetBuilder extends ServeRequestBuilder {
		
		public ServeByEntryIdThumbAssetBuilder(String entryId, int thumbParamId) {
			super("thumbasset", "serveByEntryId");
			params.add("entryId", entryId);
			params.add("thumbParamId", thumbParamId);
		}
		
		public void entryId(String multirequestToken) {
			params.add("entryId", multirequestToken);
		}
		
		public void thumbParamId(String multirequestToken) {
			params.add("thumbParamId", multirequestToken);
		}
	}

	public static ServeByEntryIdThumbAssetBuilder serveByEntryId(String entryId)  {
		return serveByEntryId(entryId, Integer.MIN_VALUE);
	}

	/**
	 * Serves thumbnail by entry id and thumnail params id
	 * 
	 * @param entryId 
	 * @param thumbParamId if not set, default thumbnail will be used.
	 */
    public static ServeByEntryIdThumbAssetBuilder serveByEntryId(String entryId, int thumbParamId)  {
		return new ServeByEntryIdThumbAssetBuilder(entryId, thumbParamId);
	}
	
	public static class SetAsDefaultThumbAssetBuilder extends NullRequestBuilder {
		
		public SetAsDefaultThumbAssetBuilder(String thumbAssetId) {
			super("thumbasset", "setAsDefault");
			params.add("thumbAssetId", thumbAssetId);
		}
		
		public void thumbAssetId(String multirequestToken) {
			params.add("thumbAssetId", multirequestToken);
		}
	}

	/**
	 * Tags the thumbnail as DEFAULT_THUMB and removes that tag from all other
	  thumbnail assets of the entry.   Create a new file sync link on the entry
	  thumbnail that points to the thumbnail asset file sync.
	 * 
	 * @param thumbAssetId 
	 */
    public static SetAsDefaultThumbAssetBuilder setAsDefault(String thumbAssetId)  {
		return new SetAsDefaultThumbAssetBuilder(thumbAssetId);
	}
	
	public static class SetContentThumbAssetBuilder extends RequestBuilder {
		
		public SetContentThumbAssetBuilder(String id, ContentResource contentResource) {
			super(ThumbAsset.class, "thumbasset", "setContent");
			params.add("id", id);
			params.add("contentResource", contentResource);
		}
		
		public void id(String multirequestToken) {
			params.add("id", multirequestToken);
		}
	}

	/**
	 * Update content of thumbnail asset
	 * 
	 * @param id 
	 * @param contentResource 
	 */
    public static SetContentThumbAssetBuilder setContent(String id, ContentResource contentResource)  {
		return new SetContentThumbAssetBuilder(id, contentResource);
	}
	
	public static class UpdateThumbAssetBuilder extends RequestBuilder {
		
		public UpdateThumbAssetBuilder(String id, ThumbAsset thumbAsset) {
			super(ThumbAsset.class, "thumbasset", "update");
			params.add("id", id);
			params.add("thumbAsset", thumbAsset);
		}
		
		public void id(String multirequestToken) {
			params.add("id", multirequestToken);
		}
	}

	/**
	 * Update thumbnail asset
	 * 
	 * @param id 
	 * @param thumbAsset 
	 */
    public static UpdateThumbAssetBuilder update(String id, ThumbAsset thumbAsset)  {
		return new UpdateThumbAssetBuilder(id, thumbAsset);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy