
com.kaltura.client.ClientConfigBase Maven / Gradle / Ivy
// ===================================================================================================
// _ __ _ _
// | |/ /__ _| | |_ _ _ _ _ __ _
// | ' _` | | _| || | '_/ _` |
// |_|\_\__,_|_|\__|\_,_|_| \__,_|
//
// This file is part of the Kaltura Collaborative Media Suite which allows users
// to do with audio, video, and animation what Wiki platfroms allow them to do with
// text.
//
// Copyright (C) 2006-2011 Kaltura Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
//
// @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 - 2025 Weber Informatics LLC | Privacy Policy