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

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

Go to download

KalturaOttApiClient is a library of Java classes that can be used to interact with the Kaltura OTT REST API. More information about the REST API can be found at https://ott.developer.kaltura.com/ Many of the Java classes in this library are auto-generated from a schema that defines the objects that are used to interact with the API.

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

import com.kaltura.client.enums.SessionType;
import com.kaltura.client.types.AppToken;
import com.kaltura.client.types.SessionInfo;
import com.kaltura.client.utils.request.RequestBuilder;

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

public class AppTokenService {
	
	public static class AddAppTokenBuilder extends RequestBuilder {
		
		public AddAppTokenBuilder(AppToken appToken) {
			super(AppToken.class, "apptoken", "add");
			params.add("appToken", appToken);
		}
	}

	/**
	 * Add new application authentication token
	 * 
	 * @param appToken Application token
	 */
    public static AddAppTokenBuilder add(AppToken appToken)  {
		return new AddAppTokenBuilder(appToken);
	}
	
	public static class DeleteAppTokenBuilder extends RequestBuilder {
		
		public DeleteAppTokenBuilder(String id) {
			super(Boolean.class, "apptoken", "delete");
			params.add("id", id);
		}
		
		public void id(String multirequestToken) {
			params.add("id", multirequestToken);
		}
	}

	/**
	 * Delete application authentication token by id
	 * 
	 * @param id Application token identifier
	 */
    public static DeleteAppTokenBuilder delete(String id)  {
		return new DeleteAppTokenBuilder(id);
	}
	
	public static class GetAppTokenBuilder extends RequestBuilder {
		
		public GetAppTokenBuilder(String id) {
			super(AppToken.class, "apptoken", "get");
			params.add("id", id);
		}
		
		public void id(String multirequestToken) {
			params.add("id", multirequestToken);
		}
	}

	/**
	 * Get application authentication token by id
	 * 
	 * @param id Application token identifier
	 */
    public static GetAppTokenBuilder get(String id)  {
		return new GetAppTokenBuilder(id);
	}
	
	public static class StartSessionAppTokenBuilder extends RequestBuilder {
		
		public StartSessionAppTokenBuilder(String id, String tokenHash, String userId, SessionType type, int expiry, String udid) {
			super(SessionInfo.class, "apptoken", "startSession");
			params.add("id", id);
			params.add("tokenHash", tokenHash);
			params.add("userId", userId);
			params.add("type", type);
			params.add("expiry", expiry);
			params.add("udid", udid);
		}
		
		public void id(String multirequestToken) {
			params.add("id", multirequestToken);
		}
		
		public void tokenHash(String multirequestToken) {
			params.add("tokenHash", multirequestToken);
		}
		
		public void userId(String multirequestToken) {
			params.add("userId", multirequestToken);
		}
		
		public void type(String multirequestToken) {
			params.add("type", multirequestToken);
		}
		
		public void expiry(String multirequestToken) {
			params.add("expiry", multirequestToken);
		}
		
		public void udid(String multirequestToken) {
			params.add("udid", multirequestToken);
		}
	}

	public static StartSessionAppTokenBuilder startSession(String id, String tokenHash)  {
		return startSession(id, tokenHash, null);
	}

	public static StartSessionAppTokenBuilder startSession(String id, String tokenHash, String userId)  {
		return startSession(id, tokenHash, userId, SessionType.get(Integer.MIN_VALUE));
	}

	public static StartSessionAppTokenBuilder startSession(String id, String tokenHash, String userId, SessionType type)  {
		return startSession(id, tokenHash, userId, type, Integer.MIN_VALUE);
	}

	public static StartSessionAppTokenBuilder startSession(String id, String tokenHash, String userId, SessionType type, int expiry)  {
		return startSession(id, tokenHash, userId, type, expiry, null);
	}

	/**
	 * Starts a new KS (Kaltura Session) based on application authentication token id
	 * 
	 * @param id application token id
	 * @param tokenHash hashed token - current KS concatenated with the application token hashed using
	 * the application token ‘hashType’
	 * @param userId session user id, will be ignored if a different user id already defined on the
	 * application token
	 * @param type session type, will be ignored if a different session type already defined on the
	 * application token
	 * @param expiry session expiry (in seconds), could be overwritten by shorter expiry of the
	 * application token and the session-expiry that defined on the application token
	 * @param udid Device UDID
	 */
    public static StartSessionAppTokenBuilder startSession(String id, String tokenHash, String userId, SessionType type, int expiry, String udid)  {
		return new StartSessionAppTokenBuilder(id, tokenHash, userId, type, expiry, udid);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy