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

com.kaltura.client.ClientConfigBase 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;

import java.io.Serializable;

import com.kaltura.client.utils.request.ConnectionConfiguration;

@SuppressWarnings("serial")
public class ClientConfigBase implements Serializable {

	protected ConnectionConfiguration configuration;

	/** will be added to the request body to configure version and etc **/
	protected Params clientConfiguration = new Params(); // generated by php script from input file
	/** will be added to the request body and will include session related data (ks, partnerId etc) */
	protected Params requestConfiguration = new Params(); // generated by php script from input file

	public ClientConfigBase(ConnectionConfiguration configuration) {
		this.clientConfiguration.put("format", 1);
		
		// sets the default configuration values and add/overwrite with new properties from config
		this.configuration = configuration;
	}

	public void setClientConfigProperty(String key, String value){
		this.clientConfiguration.put(key, value);
	}

	/**
	 * @param key property name
	 * @return String
	 */
	public String getClientConfigProperty(String key){
		if(this.clientConfiguration.containsKey(key)){
			return (String) this.clientConfiguration.get(key);
		}

		return null;
	}

	public Params getClientConfiguration() {
		return clientConfiguration;
	}

	public void setRequestConfigProperty(String key, String value){
		this.clientConfiguration.put(key, value);
	}

	/**
	 * @param key property name
	 * @return String
	 */
	public String getRequestConfigProperty(String key){
		if(this.clientConfiguration.containsKey(key)){
			return (String) this.clientConfiguration.get(key);
		}

		return null;
	}

	public Params getRequestConfiguration() {
		return requestConfiguration;
	}

	public void setConnectionConfiguration(ConnectionConfiguration configuration) {
		this.configuration = configuration;
	}

	public ConnectionConfiguration getConnectionConfiguration() {
		return this.configuration;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy