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

rapture.common.client.HttpEnvironmentApi 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.EnvironmentApi;
import rapture.common.api.ScriptEnvironmentApi;
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.model.RaptureServerStatus;
import rapture.common.model.RaptureServerInfo;

import rapture.common.shared.environment.GetThisServerPayload;

import rapture.common.shared.environment.GetServersPayload;

import rapture.common.shared.environment.SetThisServerPayload;

import rapture.common.shared.environment.SetApplianceModePayload;

import rapture.common.shared.environment.GetApplianceModePayload;

import rapture.common.shared.environment.GetServerStatusPayload;

import rapture.common.shared.environment.GetAppNamesPayload;

import rapture.common.shared.environment.GetMemoryInfoPayload;

import rapture.common.shared.environment.GetOperatingSystemInfoPayload;

import rapture.common.shared.environment.GetThreadInfoPayload;

import rapture.common.shared.environment.ReadByPathPayload;

import rapture.common.shared.environment.WriteByPathPayload;

import rapture.common.shared.environment.ExecByPathPayload;

import rapture.common.shared.environment.ReadByJsonPayload;

import rapture.common.shared.environment.WriteByJsonPayload;

import rapture.common.shared.environment.ExecByJsonPayload;


@SuppressWarnings("all")
public class HttpEnvironmentApi extends BaseHttpApi implements EnvironmentApi, ScriptEnvironmentApi {
        private static final Logger log = Logger.getLogger(HttpEnvironmentApi.class);

	public HttpEnvironmentApi(HttpLoginApi login) {
		super(login, "environment");
	}
		
	    private static final class GetThisServerTypeReference extends TypeReference {
	    }    
	    @Override
	    public RaptureServerInfo getThisServer(CallingContext context) {
	        GetThisServerPayload requestObj = new GetThisServerPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        return doRequest(requestObj, "GETTHISSERVER", new GetThisServerTypeReference());    }

	    private static final class GetServersTypeReference extends TypeReference> {
	    }    
	    @Override
	    public List getServers(CallingContext context) {
	        GetServersPayload requestObj = new GetServersPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        return doRequest(requestObj, "GETSERVERS", new GetServersTypeReference());    }

	    private static final class SetThisServerTypeReference extends TypeReference {
	    }    
	    @Override
	    public RaptureServerInfo setThisServer(CallingContext context, RaptureServerInfo info) {
	        SetThisServerPayload requestObj = new SetThisServerPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setInfo(info);
	        return doRequest(requestObj, "SETTHISSERVER", new SetThisServerTypeReference());    }

	    
	    @Override
	    public void setApplianceMode(CallingContext context, Boolean mode) {
	        SetApplianceModePayload requestObj = new SetApplianceModePayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setMode(mode);
	        doRequest(requestObj, "SETAPPLIANCEMODE", null);    }

	    private static final class GetApplianceModeTypeReference extends TypeReference {
	    }    
	    @Override
	    public Boolean getApplianceMode(CallingContext context) {
	        GetApplianceModePayload requestObj = new GetApplianceModePayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        return doRequest(requestObj, "GETAPPLIANCEMODE", new GetApplianceModeTypeReference());    }

	    private static final class GetServerStatusTypeReference extends TypeReference> {
	    }    
	    @Override
	    public List getServerStatus(CallingContext context) {
	        GetServerStatusPayload requestObj = new GetServerStatusPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        return doRequest(requestObj, "GETSERVERSTATUS", new GetServerStatusTypeReference());    }

	    private static final class GetAppNamesTypeReference extends TypeReference> {
	    }    
	    @Override
	    public List getAppNames(CallingContext context) {
	        GetAppNamesPayload requestObj = new GetAppNamesPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        return doRequest(requestObj, "GETAPPNAMES", new GetAppNamesTypeReference());    }

	    private static final class GetMemoryInfoTypeReference extends TypeReference> {
	    }    
	    @Override
	    public Map getMemoryInfo(CallingContext context, List appNames) {
	        GetMemoryInfoPayload requestObj = new GetMemoryInfoPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setAppNames(appNames);
	        return doRequest(requestObj, "GETMEMORYINFO", new GetMemoryInfoTypeReference());    }

	    private static final class GetOperatingSystemInfoTypeReference extends TypeReference> {
	    }    
	    @Override
	    public Map getOperatingSystemInfo(CallingContext context, List appNames) {
	        GetOperatingSystemInfoPayload requestObj = new GetOperatingSystemInfoPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setAppNames(appNames);
	        return doRequest(requestObj, "GETOPERATINGSYSTEMINFO", new GetOperatingSystemInfoTypeReference());    }

	    private static final class GetThreadInfoTypeReference extends TypeReference> {
	    }    
	    @Override
	    public Map getThreadInfo(CallingContext context, List appNames) {
	        GetThreadInfoPayload requestObj = new GetThreadInfoPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setAppNames(appNames);
	        return doRequest(requestObj, "GETTHREADINFO", new GetThreadInfoTypeReference());    }

	    private static final class ReadByPathTypeReference extends TypeReference> {
	    }    
	    @Override
	    public Map readByPath(CallingContext context, List appNames, String path) {
	        ReadByPathPayload requestObj = new ReadByPathPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setAppNames(appNames);
	        requestObj.setPath(path);
	        return doRequest(requestObj, "READBYPATH", new ReadByPathTypeReference());    }

	    private static final class WriteByPathTypeReference extends TypeReference> {
	    }    
	    @Override
	    public Map writeByPath(CallingContext context, List appNames, String path) {
	        WriteByPathPayload requestObj = new WriteByPathPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setAppNames(appNames);
	        requestObj.setPath(path);
	        return doRequest(requestObj, "WRITEBYPATH", new WriteByPathTypeReference());    }

	    private static final class ExecByPathTypeReference extends TypeReference> {
	    }    
	    @Override
	    public Map execByPath(CallingContext context, List appNames, String path) {
	        ExecByPathPayload requestObj = new ExecByPathPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setAppNames(appNames);
	        requestObj.setPath(path);
	        return doRequest(requestObj, "EXECBYPATH", new ExecByPathTypeReference());    }

	    private static final class ReadByJsonTypeReference extends TypeReference> {
	    }    
	    @Override
	    public Map readByJson(CallingContext context, List appNames, String json) {
	        ReadByJsonPayload requestObj = new ReadByJsonPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setAppNames(appNames);
	        requestObj.setJson(json);
	        return doRequest(requestObj, "READBYJSON", new ReadByJsonTypeReference());    }

	    private static final class WriteByJsonTypeReference extends TypeReference> {
	    }    
	    @Override
	    public Map writeByJson(CallingContext context, List appNames, String json) {
	        WriteByJsonPayload requestObj = new WriteByJsonPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setAppNames(appNames);
	        requestObj.setJson(json);
	        return doRequest(requestObj, "WRITEBYJSON", new WriteByJsonTypeReference());    }

	    private static final class ExecByJsonTypeReference extends TypeReference> {
	    }    
	    @Override
	    public Map execByJson(CallingContext context, List appNames, String json) {
	        ExecByJsonPayload requestObj = new ExecByJsonPayload();
	        requestObj.setContext(context == null ? this.getContext() : context);
	        requestObj.setAppNames(appNames);
	        requestObj.setJson(json);
	        return doRequest(requestObj, "EXECBYJSON", new ExecByJsonTypeReference());    }

	
	    @Override
	    public RaptureServerInfo getThisServer() {
	        return getThisServer(null);    }

	    @Override
	    public List getServers() {
	        return getServers(null);    }

	    @Override
	    public RaptureServerInfo setThisServer(RaptureServerInfo info) {
	        return setThisServer(null,info);    }

	    @Override
	    public void setApplianceMode(Boolean mode) {
	        setApplianceMode(null,mode);    }

	    @Override
	    public Boolean getApplianceMode() {
	        return getApplianceMode(null);    }

	    @Override
	    public List getServerStatus() {
	        return getServerStatus(null);    }

	    @Override
	    public List getAppNames() {
	        return getAppNames(null);    }

	    @Override
	    public Map getMemoryInfo(List appNames) {
	        return getMemoryInfo(null,appNames);    }

	    @Override
	    public Map getOperatingSystemInfo(List appNames) {
	        return getOperatingSystemInfo(null,appNames);    }

	    @Override
	    public Map getThreadInfo(List appNames) {
	        return getThreadInfo(null,appNames);    }

	    @Override
	    public Map readByPath(List appNames, String path) {
	        return readByPath(null,appNames,path);    }

	    @Override
	    public Map writeByPath(List appNames, String path) {
	        return writeByPath(null,appNames,path);    }

	    @Override
	    public Map execByPath(List appNames, String path) {
	        return execByPath(null,appNames,path);    }

	    @Override
	    public Map readByJson(List appNames, String json) {
	        return readByJson(null,appNames,json);    }

	    @Override
	    public Map writeByJson(List appNames, String json) {
	        return writeByJson(null,appNames,json);    }

	    @Override
	    public Map execByJson(List appNames, String json) {
	        return execByJson(null,appNames,json);    }

}






© 2015 - 2025 Weber Informatics LLC | Privacy Policy