public class ApexRestInvocation extends Object
Constructor and Description |
---|
ApexRestInvocation() |
Modifier and Type | Method and Description |
---|---|
static GregorianCalendar |
deserialize(String stringDate,
String format) |
static Date |
deserializeDate(String stringDate,
String format) |
String |
getBasePath() |
Integer |
getConnectionTimeout()
Getter method for connection timeout.
|
protected static String |
getDateFormat() |
protected static String |
getDateTimeFormat() |
Map<String,Object> |
getInputData() |
String |
getInputDataAsJson() |
static Object |
getJsonValue(Object value,
ApexClassInnerType type) |
String |
getMethodName() |
String |
getProxyHost()
Getter method for proxy host.
|
String |
getProxyPassword()
Getter method for proxy password.
|
Integer |
getProxyPort()
Getter method for proxy port.
|
String |
getProxyUsername()
Getter method for proxy username.
|
Map<String,String> |
getQueryParameters() |
Integer |
getReadTimeout()
Getter method for readTimeout
|
ApexRequestHeaders |
getRequestHeaders() |
String |
getRequestType() |
String |
getServiceRelativePath() |
String |
getSessionId() |
protected static String |
getTimeFormat() |
Map<String,Object> |
handleJsonResponse(String result) |
Map<String,Object> |
invokeApexRest() |
static Map<String,Object> |
jsonToMap(String jsonString,
ApexClassInnerType type) |
void |
setBasePath(String basePath) |
void |
setConnectionTimeout(Integer connectionTimeout)
Setter method for connectionTimeout.
|
void |
setInputData(Map<String,Object> inputData) |
void |
setMethodName(String methodName) |
void |
setOutputType(ApexClassInnerType outputType) |
void |
setProxyHost(String proxyHost)
Setter method for proxy host.
|
void |
setProxyPassword(String proxyPassword)
Setter method for proxy password.
|
void |
setProxyPort(Integer proxyPort)
Setter method for proxy port.
|
void |
setProxyUsername(String proxyUsername)
Setter method for proxy username.
|
void |
setQueryParameters(Map<String,String> queryParameters) |
void |
setReadTimeout(Integer readTimeout)
Setter method for readTimeout.
|
void |
setRequestHeaders(ApexRequestHeaders requestHeaders) |
void |
setRequestType(String requestType) |
void |
setServiceRelativePath(String serviceRelativePath) |
void |
setSessionId(String sessionId) |
static List<Object> |
toList(org.json.JSONArray array,
ApexClassInnerType type) |
static Map<String,Object> |
toMap(org.json.JSONObject object,
ApexClassInnerType type) |
public String getProxyHost()
public void setProxyHost(String proxyHost)
proxyHost
- - proxy hostpublic Integer getProxyPort()
public void setProxyPort(Integer proxyPort)
proxyPort
- - proxy portpublic String getProxyUsername()
public void setProxyUsername(String proxyUsername)
proxyUsername
- - proxy usernamepublic String getProxyPassword()
public Integer getConnectionTimeout()
public void setConnectionTimeout(Integer connectionTimeout)
connectionTimeout
- the connectionTimeout to setpublic Integer getReadTimeout()
public void setReadTimeout(Integer readTimeout)
readTimeout
- the readTimeout to setpublic void setProxyPassword(String proxyPassword)
proxyPassword
- - proxy passwordpublic String getSessionId()
public void setSessionId(String sessionId)
sessionId
- the sessionId to setpublic String getServiceRelativePath()
public void setServiceRelativePath(String serviceRelativePath)
serviceRelativePath
- the serviceRelativePath to setpublic String getBasePath()
public void setBasePath(String basePath)
basePath
- the basePath to setpublic ApexRequestHeaders getRequestHeaders()
public void setRequestHeaders(ApexRequestHeaders requestHeaders)
requestHeaders
- the requestHeaders to setpublic void setQueryParameters(Map<String,String> queryParameters)
queryParameters
- the queryParameters to setpublic void setInputData(Map<String,Object> inputData)
inputData
- the inputData to setpublic String getRequestType()
public void setRequestType(String requestType)
requestType
- the requestType to setpublic String getMethodName()
public void setMethodName(String methodName)
methodName
- the methodName to setpublic String getInputDataAsJson()
public Map<String,Object> invokeApexRest() throws SalesforceException
SalesforceException
public Map<String,Object> handleJsonResponse(String result) throws org.json.JSONException, SalesforceException
org.json.JSONException
SalesforceException
@NotNull public static Map<String,Object> jsonToMap(@NotNull String jsonString, ApexClassInnerType type) throws org.json.JSONException, SalesforceException
org.json.JSONException
SalesforceException
@NotNull public static Map<String,Object> toMap(@NotNull org.json.JSONObject object, ApexClassInnerType type) throws org.json.JSONException, SalesforceException
org.json.JSONException
SalesforceException
@NotNull public static Object getJsonValue(@NotNull Object value, ApexClassInnerType type)
public static Date deserializeDate(String stringDate, String format) throws com.google.gson.JsonParseException
com.google.gson.JsonParseException
protected static String getDateFormat()
public static GregorianCalendar deserialize(String stringDate, String format) throws com.google.gson.JsonParseException
com.google.gson.JsonParseException
protected static String getDateTimeFormat()
protected static String getTimeFormat()
@NotNull public static List<Object> toList(@NotNull org.json.JSONArray array, ApexClassInnerType type) throws org.json.JSONException, SalesforceException
org.json.JSONException
SalesforceException
public void setOutputType(@NotNull ApexClassInnerType outputType)
Copyright © 2010–2020. All rights reserved.