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

rapture.common.client.HttpBootstrapApi Maven / Gradle / Ivy

/**
 * The MIT License (MIT)
 *
 * Copyright (C) 2011-2016 Incapture Technologies LLC
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

/**
 * This file is autogenerated and any changes will be overwritten.
 */

package rapture.common.client;

import java.util.List;
import java.util.Map;
import rapture.common.api.BootstrapApi;
import rapture.common.api.ScriptBootstrapApi;
import rapture.common.CallingContext;
import rapture.common.model.GeneralResponse;
import rapture.common.model.BasePayload;
import rapture.common.exception.RaptureException;
import rapture.common.impl.jackson.JacksonUtil;

import com.fasterxml.jackson.core.type.TypeReference;

import org.apache.log4j.Logger;

import rapture.common.shared.bootstrap.SetEmphemeralRepoPayload;

import rapture.common.shared.bootstrap.SetConfigRepoPayload;

import rapture.common.shared.bootstrap.SetSettingsRepoPayload;

import rapture.common.shared.bootstrap.MigrateConfigRepoPayload;

import rapture.common.shared.bootstrap.MigrateEphemeralRepoPayload;

import rapture.common.shared.bootstrap.MigrateSettingsRepoPayload;

import rapture.common.shared.bootstrap.GetConfigRepoPayload;

import rapture.common.shared.bootstrap.GetSettingsRepoPayload;

import rapture.common.shared.bootstrap.GetEphemeralRepoPayload;

import rapture.common.shared.bootstrap.RestartBootstrapPayload;

import rapture.common.shared.bootstrap.AddScriptClassPayload;

import rapture.common.shared.bootstrap.GetScriptClassesPayload;

import rapture.common.shared.bootstrap.DeleteScriptClassPayload;


@SuppressWarnings("all")
public class HttpBootstrapApi extends BaseHttpApi implements BootstrapApi, ScriptBootstrapApi {
        private static final Logger log = Logger.getLogger(HttpBootstrapApi.class);

	public HttpBootstrapApi(HttpLoginApi login) {
		super(login, "bootstrap");
	}
		
	    
	    @Override
	    public void setEmphemeralRepo(CallingContext context, String config) {
	        SetEmphemeralRepoPayload requestObj = new SetEmphemeralRepoPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setConfig(config);
	        doRequest(requestObj, "SETEMPHEMERALREPO", null);    }

	    
	    @Override
	    public void setConfigRepo(CallingContext context, String config) {
	        SetConfigRepoPayload requestObj = new SetConfigRepoPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setConfig(config);
	        doRequest(requestObj, "SETCONFIGREPO", null);    }

	    
	    @Override
	    public void setSettingsRepo(CallingContext context, String config) {
	        SetSettingsRepoPayload requestObj = new SetSettingsRepoPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setConfig(config);
	        doRequest(requestObj, "SETSETTINGSREPO", null);    }

	    
	    @Override
	    public void migrateConfigRepo(CallingContext context, String newConfig) {
	        MigrateConfigRepoPayload requestObj = new MigrateConfigRepoPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setNewConfig(newConfig);
	        doRequest(requestObj, "MIGRATECONFIGREPO", null);    }

	    
	    @Override
	    public void migrateEphemeralRepo(CallingContext context, String newConfig) {
	        MigrateEphemeralRepoPayload requestObj = new MigrateEphemeralRepoPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setNewConfig(newConfig);
	        doRequest(requestObj, "MIGRATEEPHEMERALREPO", null);    }

	    
	    @Override
	    public void migrateSettingsRepo(CallingContext context, String newConfig) {
	        MigrateSettingsRepoPayload requestObj = new MigrateSettingsRepoPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setNewConfig(newConfig);
	        doRequest(requestObj, "MIGRATESETTINGSREPO", null);    }

	    private static final class GetConfigRepoTypeReference extends TypeReference {
	    }    
	    @Override
	    public String getConfigRepo(CallingContext context) {
	        GetConfigRepoPayload requestObj = new GetConfigRepoPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        return doRequest(requestObj, "GETCONFIGREPO", new GetConfigRepoTypeReference());    }

	    private static final class GetSettingsRepoTypeReference extends TypeReference {
	    }    
	    @Override
	    public String getSettingsRepo(CallingContext context) {
	        GetSettingsRepoPayload requestObj = new GetSettingsRepoPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        return doRequest(requestObj, "GETSETTINGSREPO", new GetSettingsRepoTypeReference());    }

	    private static final class GetEphemeralRepoTypeReference extends TypeReference {
	    }    
	    @Override
	    public String getEphemeralRepo(CallingContext context) {
	        GetEphemeralRepoPayload requestObj = new GetEphemeralRepoPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        return doRequest(requestObj, "GETEPHEMERALREPO", new GetEphemeralRepoTypeReference());    }

	    
	    @Override
	    public void restartBootstrap(CallingContext context) {
	        RestartBootstrapPayload requestObj = new RestartBootstrapPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        doRequest(requestObj, "RESTARTBOOTSTRAP", null);    }

	    
	    @Override
	    public void addScriptClass(CallingContext context, String keyword, String className) {
	        AddScriptClassPayload requestObj = new AddScriptClassPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setKeyword(keyword);
	        requestObj.setClassName(className);
	        doRequest(requestObj, "ADDSCRIPTCLASS", null);    }

	    private static final class GetScriptClassesTypeReference extends TypeReference> {
	    }    
	    @Override
	    public Map getScriptClasses(CallingContext context) {
	        GetScriptClassesPayload requestObj = new GetScriptClassesPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        return doRequest(requestObj, "GETSCRIPTCLASSES", new GetScriptClassesTypeReference());    }

	    private static final class DeleteScriptClassTypeReference extends TypeReference {
	    }    
	    @Override
	    public Boolean deleteScriptClass(CallingContext context, String keyword) {
	        DeleteScriptClassPayload requestObj = new DeleteScriptClassPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setKeyword(keyword);
	        return doRequest(requestObj, "DELETESCRIPTCLASS", new DeleteScriptClassTypeReference());    }

	
	    @Override
	    public void setEmphemeralRepo(String config) {
	        setEmphemeralRepo(null,config);    }

	    @Override
	    public void setConfigRepo(String config) {
	        setConfigRepo(null,config);    }

	    @Override
	    public void setSettingsRepo(String config) {
	        setSettingsRepo(null,config);    }

	    @Override
	    public void migrateConfigRepo(String newConfig) {
	        migrateConfigRepo(null,newConfig);    }

	    @Override
	    public void migrateEphemeralRepo(String newConfig) {
	        migrateEphemeralRepo(null,newConfig);    }

	    @Override
	    public void migrateSettingsRepo(String newConfig) {
	        migrateSettingsRepo(null,newConfig);    }

	    @Override
	    public String getConfigRepo() {
	        return getConfigRepo(null);    }

	    @Override
	    public String getSettingsRepo() {
	        return getSettingsRepo(null);    }

	    @Override
	    public String getEphemeralRepo() {
	        return getEphemeralRepo(null);    }

	    @Override
	    public void restartBootstrap() {
	        restartBootstrap(null);    }

	    @Override
	    public void addScriptClass(String keyword, String className) {
	        addScriptClass(null,keyword,className);    }

	    @Override
	    public Map getScriptClasses() {
	        return getScriptClasses(null);    }

	    @Override
	    public Boolean deleteScriptClass(String keyword) {
	        return deleteScriptClass(null,keyword);    }

}






© 2015 - 2025 Weber Informatics LLC | Privacy Policy