public class FDRestUtils
extends java.lang.Object
Constructor and Description |
---|
FDRestUtils() |
Modifier and Type | Method and Description |
---|---|
void |
checkValidJsonResponse(FlexRESTClientResponse pClientResponse) |
JsonObject |
getRequest(java.lang.String pHostName,
java.lang.String pResourcePath,
java.util.Map<java.lang.String,java.io.Serializable> pQueryParams,
java.lang.String pBearerToken)
Invoke GET request using bearer token to authenticate
|
JsonObject |
getRequest(java.lang.String pHostName,
java.lang.String pResourcePath,
java.util.Map<java.lang.String,java.io.Serializable> pQueryParams,
java.lang.String pUserName,
java.lang.String pPassword)
Invoke GET request using basic authentication
|
JsonObject |
getRequest(java.lang.String pHostName,
java.lang.String pResourcePath,
java.lang.String pBearerToken)
Invoke GET request using bearer token to authenticate
|
JsonObject |
getRequest(java.lang.String pHostName,
java.lang.String pResourcePath,
java.lang.String pUserName,
java.lang.String pPassword)
Invoke GET request using basic authentication
|
JsonArray |
getRequestArray(FlexRESTClient pClient) |
JsonArray |
getRequestArray(java.lang.String pHostName,
java.lang.String pResourcePath,
java.util.Map<java.lang.String,java.lang.Object> pQueryParams,
java.lang.String pAccessToken) |
JsonArray |
getRequestArray(java.lang.String pHostName,
java.lang.String pResourcePath,
java.util.Map<java.lang.String,java.lang.Object> pQueryParams,
java.lang.String pUserName,
java.lang.String pPassword) |
JsonObject |
patchRequest(java.lang.String pHostName,
java.lang.String pBearerToken,
java.lang.String pResourcePath,
java.util.Map<java.lang.String,java.io.Serializable> pQueryParams,
java.lang.String pPayload)
Invoke PATCH request using bearer token to authenticate
|
JsonObject |
patchRequest(java.lang.String pHostName,
java.lang.String pBearerToken,
java.lang.String pResourcePath,
java.lang.String pPayload)
Invoke PATCH request using bearer token to authenticate
|
JsonObject |
patchRequest(java.lang.String pHostName,
java.lang.String pUserName,
java.lang.String pPassword,
java.lang.String pResourcePath,
java.util.Map<java.lang.String,java.io.Serializable> pQueryParams,
java.lang.String pPayload)
Invoke PATCH request using basic authentication
|
JsonObject |
patchRequest(java.lang.String pHostName,
java.lang.String pUserName,
java.lang.String pPassword,
java.lang.String pResourcePath,
java.lang.String pPayload)
Invoke PATCH request using basic authentication
|
JsonObject |
postRequest(java.lang.String pHostName,
java.lang.String pBearerToken,
java.lang.String pResourcePath,
java.util.Map<java.lang.String,java.io.Serializable> pQueryParams,
java.lang.String pPayload)
Invoke POST request using bearer token to authenticate
|
JsonObject |
postRequest(java.lang.String pHostName,
java.lang.String pBearerToken,
java.lang.String pResourcePath,
java.lang.String pPayload)
Invoke POST request using bearer token to authenticate
|
JsonObject |
postRequest(java.lang.String pHostName,
java.lang.String pUserName,
java.lang.String pPassword,
java.lang.String pResourcePath,
java.util.Map<java.lang.String,java.io.Serializable> pQueryParams,
java.lang.String pPayload)
Invoke POST request using basic authentication
|
JsonObject |
postRequest(java.lang.String pHostName,
java.lang.String pUserName,
java.lang.String pPassword,
java.lang.String pResourcePath,
java.lang.String pPayload)
Invoke POST request using basic authentication
|
JsonObject |
putRequest(java.lang.String pHostName,
java.lang.String pBearerToken,
java.lang.String pResourcePath,
java.util.Map<java.lang.String,java.io.Serializable> pQueryParams,
java.lang.String pPayload)
Invoke PUT request using bearer token to authenticate
|
JsonObject |
putRequest(java.lang.String pHostName,
java.lang.String pBearerToken,
java.lang.String pResourcePath,
java.lang.String pPayload)
Invoke PUT request using bearer token to authenticate
|
JsonObject |
putRequest(java.lang.String pHostName,
java.lang.String pUserName,
java.lang.String pPassword,
java.lang.String pResourcePath,
java.util.Map<java.lang.String,java.io.Serializable> pQueryParams,
java.lang.String pPayload)
Invoke PUT request using basic authentication
|
JsonObject |
putRequest(java.lang.String pHostName,
java.lang.String pUserName,
java.lang.String pPassword,
java.lang.String pResourcePath,
java.lang.String pPayload)
Invoke PUT request using basic authentication
|
boolean |
testConnection(java.lang.String pHostName,
java.lang.String pResourcePath,
java.lang.String pBearerToken)
Test connection to external system with get call using bearer token to authenticate
|
boolean |
testConnection(java.lang.String pHostName,
java.lang.String pResourcePath,
java.lang.String pUserName,
java.lang.String pPassword)
Test connection to external system with get call using basic authentication
|
public boolean testConnection(java.lang.String pHostName, java.lang.String pResourcePath, java.lang.String pUserName, java.lang.String pPassword) throws ApiException
pHostName
- Base URLpResourcePath
- Resource path to append to base URLpUserName
- User name to connect aspPassword
- Password to authenticate withApiException
- If response code is invalidpublic boolean testConnection(java.lang.String pHostName, java.lang.String pResourcePath, java.lang.String pBearerToken) throws ApiException
pHostName
- Base URLpResourcePath
- Resource path to append to base URLpBearerToken
- Bearer token added to authentication headerApiException
- If response code is invalidpublic JsonObject getRequest(java.lang.String pHostName, java.lang.String pResourcePath, java.lang.String pUserName, java.lang.String pPassword) throws ApiException
pHostName
- Base URLpResourcePath
- Resource path to append to base URLpUserName
- User name to connect aspPassword
- Password to authenticate withApiException
- If response code is invalidpublic JsonObject getRequest(java.lang.String pHostName, java.lang.String pResourcePath, java.util.Map<java.lang.String,java.io.Serializable> pQueryParams, java.lang.String pUserName, java.lang.String pPassword) throws ApiException
pHostName
- Base URLpResourcePath
- Resource path to append to base URLpQueryParams
- Query parameter mappUserName
- User name to connect aspPassword
- Password to authenticate withApiException
- If response code is invalidpublic JsonArray getRequestArray(java.lang.String pHostName, java.lang.String pResourcePath, java.util.Map<java.lang.String,java.lang.Object> pQueryParams, java.lang.String pUserName, java.lang.String pPassword) throws ApiException
ApiException
public JsonArray getRequestArray(java.lang.String pHostName, java.lang.String pResourcePath, java.util.Map<java.lang.String,java.lang.Object> pQueryParams, java.lang.String pAccessToken) throws ApiException
ApiException
public JsonObject getRequest(java.lang.String pHostName, java.lang.String pResourcePath, java.lang.String pBearerToken) throws ApiException
pHostName
- Base URLpResourcePath
- Resource path to append to base URLpBearerToken
- Bearer token added to authentication headerApiException
- If response code is invalidpublic JsonObject getRequest(java.lang.String pHostName, java.lang.String pResourcePath, java.util.Map<java.lang.String,java.io.Serializable> pQueryParams, java.lang.String pBearerToken) throws ApiException
pHostName
- Base URLpResourcePath
- Resource path to append to base URLpQueryParams
- Query parameter mappBearerToken
- Bearer token added to authentication headerApiException
- If response code is invalidpublic JsonArray getRequestArray(FlexRESTClient pClient) throws ApiException
ApiException
public JsonObject postRequest(java.lang.String pHostName, java.lang.String pUserName, java.lang.String pPassword, java.lang.String pResourcePath, java.lang.String pPayload) throws ApiException
pHostName
- Base URLpResourcePath
- Resource path to append to base URLpUserName
- User name to connect aspPassword
- Password to authenticate withpPayload
- JSON request bodyApiException
- If response code is invalidpublic JsonObject postRequest(java.lang.String pHostName, java.lang.String pUserName, java.lang.String pPassword, java.lang.String pResourcePath, java.util.Map<java.lang.String,java.io.Serializable> pQueryParams, java.lang.String pPayload) throws ApiException
pHostName
- Base URLpUserName
- User name to connect aspPassword
- Password to authenticate withpResourcePath
- Resource path to append to base URLpQueryParams
- Query parameter mappPayload
- JSON request bodyApiException
- If response code is invalidpublic JsonObject postRequest(java.lang.String pHostName, java.lang.String pBearerToken, java.lang.String pResourcePath, java.lang.String pPayload) throws ApiException
pHostName
- Base URLpBearerToken
- Bearer token added to authentication headerpResourcePath
- Resource path to append to base URLpPayload
- JSON request bodyApiException
- If response code is invalidpublic JsonObject postRequest(java.lang.String pHostName, java.lang.String pBearerToken, java.lang.String pResourcePath, java.util.Map<java.lang.String,java.io.Serializable> pQueryParams, java.lang.String pPayload) throws ApiException
pHostName
- Base URLpBearerToken
- Bearer token added to authentication headerpResourcePath
- Resource path to append to base URLpQueryParams
- Query parameter mappPayload
- JSON request bodyApiException
- If response code is invalidpublic JsonObject putRequest(java.lang.String pHostName, java.lang.String pUserName, java.lang.String pPassword, java.lang.String pResourcePath, java.lang.String pPayload) throws ApiException
pHostName
- Base URLpUserName
- User name to connect aspPassword
- Password to authenticate withpResourcePath
- Resource path to append to base URLpPayload
- JSON request bodyApiException
- If response code is invalidpublic JsonObject putRequest(java.lang.String pHostName, java.lang.String pUserName, java.lang.String pPassword, java.lang.String pResourcePath, java.util.Map<java.lang.String,java.io.Serializable> pQueryParams, java.lang.String pPayload) throws ApiException
pHostName
- Base URLpUserName
- User name to connect aspPassword
- Password to authenticate withpResourcePath
- Resource path to append to base URLpQueryParams
- Query parameter mappPayload
- JSON request bodyApiException
- If response code is invalidpublic JsonObject putRequest(java.lang.String pHostName, java.lang.String pBearerToken, java.lang.String pResourcePath, java.lang.String pPayload) throws ApiException
pHostName
- Base URLpBearerToken
- Bearer token added to authentication headerpResourcePath
- Resource path to append to base URLpPayload
- JSON request bodyApiException
- If response code is invalidpublic JsonObject putRequest(java.lang.String pHostName, java.lang.String pBearerToken, java.lang.String pResourcePath, java.util.Map<java.lang.String,java.io.Serializable> pQueryParams, java.lang.String pPayload) throws ApiException
pHostName
- Base URLpBearerToken
- Bearer token added to authentication headerpResourcePath
- Resource path to append to base URLpQueryParams
- Query parameter mappPayload
- JSON request bodyApiException
- If response code is invalidpublic JsonObject patchRequest(java.lang.String pHostName, java.lang.String pUserName, java.lang.String pPassword, java.lang.String pResourcePath, java.lang.String pPayload) throws ApiException
pHostName
- Base URLpUserName
- User name to connect aspPassword
- Password to authenticate withpResourcePath
- Resource path to append to base URLpPayload
- JSON request bodyApiException
- If response code is invalidpublic JsonObject patchRequest(java.lang.String pHostName, java.lang.String pUserName, java.lang.String pPassword, java.lang.String pResourcePath, java.util.Map<java.lang.String,java.io.Serializable> pQueryParams, java.lang.String pPayload) throws ApiException
pHostName
- Base URLpUserName
- User name to connect aspPassword
- Password to authenticate withpResourcePath
- Resource path to append to base URLpQueryParams
- Query parameter mappPayload
- JSON request bodyApiException
- If response code is invalidpublic JsonObject patchRequest(java.lang.String pHostName, java.lang.String pBearerToken, java.lang.String pResourcePath, java.lang.String pPayload) throws ApiException
pHostName
- Base URLpBearerToken
- Bearer token added to authentication headerpResourcePath
- Resource path to append to base URLpPayload
- JSON request bodyApiException
- If response code is invalidpublic JsonObject patchRequest(java.lang.String pHostName, java.lang.String pBearerToken, java.lang.String pResourcePath, java.util.Map<java.lang.String,java.io.Serializable> pQueryParams, java.lang.String pPayload) throws ApiException
pHostName
- Base URLpBearerToken
- Bearer token added to authentication headerpResourcePath
- Resource path to append to base URLpQueryParams
- Query parameter mappPayload
- JSON request bodyApiException
- If response code is invalidpublic void checkValidJsonResponse(FlexRESTClientResponse pClientResponse) throws ApiException
ApiException