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

com.kaltura.client.services.SessionService 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.types.LoginSession;
import com.kaltura.client.types.Session;
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 SessionService {
	
	public static class GetSessionBuilder extends RequestBuilder {
		
		public GetSessionBuilder(String session) {
			super(Session.class, "session", "get");
			params.add("session", session);
		}
		
		public void session(String multirequestToken) {
			params.add("session", multirequestToken);
		}
	}

	public static GetSessionBuilder get()  {
		return get(null);
	}

	/**
	 * Parses KS
	 * 
	 * @param session Additional KS to parse, if not passed the user's KS will be parsed
	 */
    public static GetSessionBuilder get(String session)  {
		return new GetSessionBuilder(session);
	}
	
	public static class RevokeSessionBuilder extends RequestBuilder {
		
		public RevokeSessionBuilder() {
			super(Boolean.class, "session", "revoke");
		}
	}

	/**
	 * Revokes all the sessions (KS) of a given user
	 */
    public static RevokeSessionBuilder revoke()  {
		return new RevokeSessionBuilder();
	}
	
	public static class SwitchUserSessionBuilder extends RequestBuilder {
		
		public SwitchUserSessionBuilder(String userIdToSwitch) {
			super(LoginSession.class, "session", "switchUser");
			params.add("userIdToSwitch", userIdToSwitch);
		}
		
		public void userIdToSwitch(String multirequestToken) {
			params.add("userIdToSwitch", multirequestToken);
		}
	}

	/**
	 * Switching the user in the session by generating a new session for a new user
	  within the same household
	 * 
	 * @param userIdToSwitch The identifier of the user to change
	 */
    public static SwitchUserSessionBuilder switchUser(String userIdToSwitch)  {
		return new SwitchUserSessionBuilder(userIdToSwitch);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy