com.sforce.soap.apex.SoapConnection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of force-apex-api Show documentation
Show all versions of force-apex-api Show documentation
Force.com Web Service Connector
package com.sforce.soap.apex;
import com.sforce.ws.ConnectionException;
import com.sforce.ws.ConnectorConfig;
import com.sforce.ws.bind.XMLizable;
import com.sforce.ws.bind.TypeMapper;
import java.util.HashMap;
import javax.xml.namespace.QName;
/**
* This is a generated class for the SObject Enterprise API.
* Do not edit this file, as your changes will be lost.
*/
public class SoapConnection {
private TypeMapper __typeMapper = new TypeMapper(null, null, false);
private ConnectorConfig __config;
private HashMap __extraHeaders = new HashMap();
public ConnectorConfig getConfig() {
return __config;
}
private com.sforce.soap.apex.CallOptions_element __CallOptions;
public void setCallOptions(java.lang.String client) {
__CallOptions = new com.sforce.soap.apex.CallOptions_element();
__CallOptions.setClient(client);
}
public void clearCallOptions() {
__CallOptions = null;
}
public com.sforce.soap.apex.CallOptions_element getCallOptions() {
return __CallOptions;
}
public void __setCallOptions(com.sforce.soap.apex.CallOptions_element __header) {
__CallOptions = __header ;
}
private com.sforce.soap.apex.AllowFieldTruncationHeader_element __AllowFieldTruncationHeader;
public void setAllowFieldTruncationHeader(boolean allowFieldTruncation) {
__AllowFieldTruncationHeader = new com.sforce.soap.apex.AllowFieldTruncationHeader_element();
__AllowFieldTruncationHeader.setAllowFieldTruncation(allowFieldTruncation);
}
public void clearAllowFieldTruncationHeader() {
__AllowFieldTruncationHeader = null;
}
public com.sforce.soap.apex.AllowFieldTruncationHeader_element getAllowFieldTruncationHeader() {
return __AllowFieldTruncationHeader;
}
public void __setAllowFieldTruncationHeader(com.sforce.soap.apex.AllowFieldTruncationHeader_element __header) {
__AllowFieldTruncationHeader = __header ;
}
private com.sforce.soap.apex.SessionHeader_element __SessionHeader;
public void setSessionHeader(java.lang.String sessionId) {
__SessionHeader = new com.sforce.soap.apex.SessionHeader_element();
__SessionHeader.setSessionId(sessionId);
}
public void clearSessionHeader() {
__SessionHeader = null;
}
public com.sforce.soap.apex.SessionHeader_element getSessionHeader() {
return __SessionHeader;
}
public void __setSessionHeader(com.sforce.soap.apex.SessionHeader_element __header) {
__SessionHeader = __header ;
}
private com.sforce.soap.apex.PackageVersionHeader_element __PackageVersionHeader;
public void setPackageVersionHeader(com.sforce.soap.apex.PackageVersion[] packageVersions) {
__PackageVersionHeader = new com.sforce.soap.apex.PackageVersionHeader_element();
__PackageVersionHeader.setPackageVersions(packageVersions);
}
public void clearPackageVersionHeader() {
__PackageVersionHeader = null;
}
public com.sforce.soap.apex.PackageVersionHeader_element getPackageVersionHeader() {
return __PackageVersionHeader;
}
public void __setPackageVersionHeader(com.sforce.soap.apex.PackageVersionHeader_element __header) {
__PackageVersionHeader = __header ;
}
private com.sforce.soap.apex.DebuggingInfo_element __DebuggingInfo;
public void setDebuggingInfo(java.lang.String debugLog) {
__DebuggingInfo = new com.sforce.soap.apex.DebuggingInfo_element();
__DebuggingInfo.setDebugLog(debugLog);
}
public void clearDebuggingInfo() {
__DebuggingInfo = null;
}
public com.sforce.soap.apex.DebuggingInfo_element getDebuggingInfo() {
return __DebuggingInfo;
}
public void __setDebuggingInfo(com.sforce.soap.apex.DebuggingInfo_element __header) {
__DebuggingInfo = __header ;
}
private com.sforce.soap.apex.DisableFeedTrackingHeader_element __DisableFeedTrackingHeader;
public void setDisableFeedTrackingHeader(boolean disableFeedTracking) {
__DisableFeedTrackingHeader = new com.sforce.soap.apex.DisableFeedTrackingHeader_element();
__DisableFeedTrackingHeader.setDisableFeedTracking(disableFeedTracking);
}
public void clearDisableFeedTrackingHeader() {
__DisableFeedTrackingHeader = null;
}
public com.sforce.soap.apex.DisableFeedTrackingHeader_element getDisableFeedTrackingHeader() {
return __DisableFeedTrackingHeader;
}
public void __setDisableFeedTrackingHeader(com.sforce.soap.apex.DisableFeedTrackingHeader_element __header) {
__DisableFeedTrackingHeader = __header ;
}
private com.sforce.soap.apex.DebuggingHeader_element __DebuggingHeader;
public void setDebuggingHeader(com.sforce.soap.apex.LogInfo[] categories,com.sforce.soap.apex.LogType debugLevel) {
__DebuggingHeader = new com.sforce.soap.apex.DebuggingHeader_element();
__DebuggingHeader.setCategories(categories);
__DebuggingHeader.setDebugLevel(debugLevel);
}
public void clearDebuggingHeader() {
__DebuggingHeader = null;
}
public com.sforce.soap.apex.DebuggingHeader_element getDebuggingHeader() {
return __DebuggingHeader;
}
public void __setDebuggingHeader(com.sforce.soap.apex.DebuggingHeader_element __header) {
__DebuggingHeader = __header ;
}
public SoapConnection(ConnectorConfig config) throws ConnectionException {
this.__config = config;
this.__typeMapper.setConfig(config);
__SessionHeader = new SessionHeader_element();
__SessionHeader.setSessionId(config.getSessionId());
}
private com.sforce.ws.transport.SoapConnection newConnection() {
com.sforce.ws.transport.SoapConnection __c = new com.sforce.ws.transport.SoapConnection(
__config.getServiceEndpoint(), null, __typeMapper, __config);
__c.setConnection(this);
__c.setKnownHeaders(knownHeaders);
return __c;
}
public com.sforce.soap.apex.ExecuteAnonymousResult executeAnonymous(java.lang.String String)
throws com.sforce.ws.ConnectionException {
com.sforce.ws.transport.SoapConnection __connection = newConnection();
com.sforce.soap.apex.ExecuteAnonymous_element __request = new com.sforce.soap.apex.ExecuteAnonymous_element();
__request.setString(String);
if (__SessionHeader != null) __connection.addHeader(SessionHeader_qname, __SessionHeader);
if (__DebuggingHeader != null) __connection.addHeader(DebuggingHeader_qname, __DebuggingHeader);
if (__PackageVersionHeader != null) __connection.addHeader(PackageVersionHeader_qname, __PackageVersionHeader);
if (__CallOptions != null) __connection.addHeader(CallOptions_qname, __CallOptions);
if (__AllowFieldTruncationHeader != null) __connection.addHeader(AllowFieldTruncationHeader_qname, __AllowFieldTruncationHeader);
if (__DisableFeedTrackingHeader != null) __connection.addHeader(DisableFeedTrackingHeader_qname, __DisableFeedTrackingHeader);
addHeaders(__connection);
com.sforce.soap.apex.ExecuteAnonymousResponse_element __response = (com.sforce.soap.apex.ExecuteAnonymousResponse_element) __connection.send("",
executeAnonymous_qname, __request, executeAnonymousResponse_qname,
com.sforce.soap.apex.ExecuteAnonymousResponse_element.class);
return __response.getResult();
}public com.sforce.soap.apex.CompileTriggerResult[] compileTriggers(java.lang.String[] scripts)
throws com.sforce.ws.ConnectionException {
com.sforce.ws.transport.SoapConnection __connection = newConnection();
com.sforce.soap.apex.CompileTriggers_element __request = new com.sforce.soap.apex.CompileTriggers_element();
__request.setScripts(scripts);
if (__SessionHeader != null) __connection.addHeader(SessionHeader_qname, __SessionHeader);
if (__PackageVersionHeader != null) __connection.addHeader(PackageVersionHeader_qname, __PackageVersionHeader);
if (__CallOptions != null) __connection.addHeader(CallOptions_qname, __CallOptions);
addHeaders(__connection);
com.sforce.soap.apex.CompileTriggersResponse_element __response = (com.sforce.soap.apex.CompileTriggersResponse_element) __connection.send("",
compileTriggers_qname, __request, compileTriggersResponse_qname,
com.sforce.soap.apex.CompileTriggersResponse_element.class);
return __response.getResult();
}public com.sforce.soap.apex.CompileAndTestResult compileAndTest(com.sforce.soap.apex.CompileAndTestRequest CompileAndTestRequest)
throws com.sforce.ws.ConnectionException {
com.sforce.ws.transport.SoapConnection __connection = newConnection();
com.sforce.soap.apex.CompileAndTest_element __request = new com.sforce.soap.apex.CompileAndTest_element();
__request.setCompileAndTestRequest(CompileAndTestRequest);
if (__SessionHeader != null) __connection.addHeader(SessionHeader_qname, __SessionHeader);
if (__DebuggingHeader != null) __connection.addHeader(DebuggingHeader_qname, __DebuggingHeader);
if (__PackageVersionHeader != null) __connection.addHeader(PackageVersionHeader_qname, __PackageVersionHeader);
if (__CallOptions != null) __connection.addHeader(CallOptions_qname, __CallOptions);
addHeaders(__connection);
com.sforce.soap.apex.CompileAndTestResponse_element __response = (com.sforce.soap.apex.CompileAndTestResponse_element) __connection.send("",
compileAndTest_qname, __request, compileAndTestResponse_qname,
com.sforce.soap.apex.CompileAndTestResponse_element.class);
return __response.getResult();
}public com.sforce.soap.apex.WsdlToApexResult wsdlToApex(com.sforce.soap.apex.WsdlToApexInfo info)
throws com.sforce.ws.ConnectionException {
com.sforce.ws.transport.SoapConnection __connection = newConnection();
com.sforce.soap.apex.WsdlToApex_element __request = new com.sforce.soap.apex.WsdlToApex_element();
__request.setInfo(info);
if (__SessionHeader != null) __connection.addHeader(SessionHeader_qname, __SessionHeader);
if (__CallOptions != null) __connection.addHeader(CallOptions_qname, __CallOptions);
addHeaders(__connection);
com.sforce.soap.apex.WsdlToApexResponse_element __response = (com.sforce.soap.apex.WsdlToApexResponse_element) __connection.send("",
wsdlToApex_qname, __request, wsdlToApexResponse_qname,
com.sforce.soap.apex.WsdlToApexResponse_element.class);
return __response.getResult();
}public com.sforce.soap.apex.RunTestsResult runTests(com.sforce.soap.apex.RunTestsRequest RunTestsRequest)
throws com.sforce.ws.ConnectionException {
com.sforce.ws.transport.SoapConnection __connection = newConnection();
com.sforce.soap.apex.RunTests_element __request = new com.sforce.soap.apex.RunTests_element();
__request.setRunTestsRequest(RunTestsRequest);
if (__SessionHeader != null) __connection.addHeader(SessionHeader_qname, __SessionHeader);
if (__DebuggingHeader != null) __connection.addHeader(DebuggingHeader_qname, __DebuggingHeader);
if (__CallOptions != null) __connection.addHeader(CallOptions_qname, __CallOptions);
addHeaders(__connection);
com.sforce.soap.apex.RunTestsResponse_element __response = (com.sforce.soap.apex.RunTestsResponse_element) __connection.send("",
runTests_qname, __request, runTestsResponse_qname,
com.sforce.soap.apex.RunTestsResponse_element.class);
return __response.getResult();
}public com.sforce.soap.apex.CompileClassResult[] compileClasses(java.lang.String[] scripts)
throws com.sforce.ws.ConnectionException {
com.sforce.ws.transport.SoapConnection __connection = newConnection();
com.sforce.soap.apex.CompileClasses_element __request = new com.sforce.soap.apex.CompileClasses_element();
__request.setScripts(scripts);
if (__SessionHeader != null) __connection.addHeader(SessionHeader_qname, __SessionHeader);
if (__PackageVersionHeader != null) __connection.addHeader(PackageVersionHeader_qname, __PackageVersionHeader);
if (__CallOptions != null) __connection.addHeader(CallOptions_qname, __CallOptions);
addHeaders(__connection);
com.sforce.soap.apex.CompileClassesResponse_element __response = (com.sforce.soap.apex.CompileClassesResponse_element) __connection.send("",
compileClasses_qname, __request, compileClassesResponse_qname,
com.sforce.soap.apex.CompileClassesResponse_element.class);
return __response.getResult();
}
private void addHeaders(com.sforce.ws.transport.SoapConnection __connection) {
for(java.util.Map.Entry entry : __extraHeaders.entrySet()) {
__connection.addHeader(entry.getKey(), entry.getValue());
}
}
public void addExtraHeader(QName __headerName, XMLizable __value) {
__extraHeaders.put(__headerName, __value);
}
public void removeExtraHeader(QName __headerName) {
__extraHeaders.remove(__headerName);
}
public XMLizable getExtraHeader(QName __headerName) {
return __extraHeaders.get(__headerName);
}
public void clearExtraHeaders() {
__extraHeaders = new HashMap();
}
private static final javax.xml.namespace.QName executeAnonymous_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "executeAnonymous");
private static final javax.xml.namespace.QName executeAnonymousResponse_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "executeAnonymousResponse");
private static final javax.xml.namespace.QName compileTriggers_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "compileTriggers");
private static final javax.xml.namespace.QName compileTriggersResponse_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "compileTriggersResponse");
private static final javax.xml.namespace.QName compileAndTest_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "compileAndTest");
private static final javax.xml.namespace.QName compileAndTestResponse_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "compileAndTestResponse");
private static final javax.xml.namespace.QName wsdlToApex_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "wsdlToApex");
private static final javax.xml.namespace.QName wsdlToApexResponse_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "wsdlToApexResponse");
private static final javax.xml.namespace.QName runTests_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "runTests");
private static final javax.xml.namespace.QName runTestsResponse_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "runTestsResponse");
private static final javax.xml.namespace.QName compileClasses_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "compileClasses");
private static final javax.xml.namespace.QName compileClassesResponse_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "compileClassesResponse");
private static final javax.xml.namespace.QName CallOptions_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "CallOptions");
private static final javax.xml.namespace.QName AllowFieldTruncationHeader_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "AllowFieldTruncationHeader");
private static final javax.xml.namespace.QName SessionHeader_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "SessionHeader");
private static final javax.xml.namespace.QName PackageVersionHeader_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "PackageVersionHeader");
private static final javax.xml.namespace.QName DebuggingInfo_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "DebuggingInfo");
private static final javax.xml.namespace.QName DisableFeedTrackingHeader_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "DisableFeedTrackingHeader");
private static final javax.xml.namespace.QName DebuggingHeader_qname = new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "DebuggingHeader");
private static HashMap knownHeaders = new HashMap();
static {
knownHeaders.put(CallOptions_qname,com.sforce.soap.apex.CallOptions_element.class);
knownHeaders.put(AllowFieldTruncationHeader_qname,com.sforce.soap.apex.AllowFieldTruncationHeader_element.class);
knownHeaders.put(SessionHeader_qname,com.sforce.soap.apex.SessionHeader_element.class);
knownHeaders.put(PackageVersionHeader_qname,com.sforce.soap.apex.PackageVersionHeader_element.class);
knownHeaders.put(DebuggingInfo_qname,com.sforce.soap.apex.DebuggingInfo_element.class);
knownHeaders.put(DisableFeedTrackingHeader_qname,com.sforce.soap.apex.DisableFeedTrackingHeader_element.class);
knownHeaders.put(DebuggingHeader_qname,com.sforce.soap.apex.DebuggingHeader_element.class);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy