Package com.boomi.connector.openapi
Class OpenAPIOperationConnection
- java.lang.Object
-
- com.boomi.connector.util.BaseConnection<C>
-
- com.boomi.common.rest.RestConnection<OperationContext>
-
- com.boomi.common.rest.RestOperationConnection
-
- com.boomi.connector.openapi.OpenAPIOperationConnection
-
- Direct Known Subclasses:
OpenAPIDslOperationConnection
public class OpenAPIOperationConnection extends RestOperationConnection
-
-
Field Summary
-
Fields inherited from class com.boomi.common.rest.RestConnection
DEFAULT_CONNECT_TIMEOUT, DEFAULT_READ_TIMEOUT
-
-
Constructor Summary
Constructors Constructor Description OpenAPIOperationConnection(OperationContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addCookiesToStore(BasicCookieStore cookieStore)
Adds cookies from the apiKeyCustomProperties field into the provided cookie store if the auth is of type API_KEY and Request Location is set to Cookieprotected Map<String,String>
getAPIAuthenticationKeys()
Returns a map of key values pairs provided in the API Keys custom properties field for Authentication Type = "API_KEY"APIKeyAuthentication
getAPIAuthenticationType()
Returns theAuthenticationType
from the selected "auth" connection field.RestClient
getClient()
Creates a OpenAPI client for operation executionContentType
getEntityContentType()
Retrieves the content type from the request cookie.String
getPath()
Gets the selected Path to execute upon.OpenAPIRequestCookie
getRequestCookie()
Retrieves the request cookie, which describes schema type and parameters necessary to make a requestOpenAPIResponseCookie
getResponseCookie()
Retrieves the response cookie, which describes the response schema typesboolean
isAPIAuthentication()
Returns true is selected authentication type is API_KEYprotected boolean
isAPIAuthenticationEnabled(APIKeyAuthentication apiKeyAuthentication)
Returns true if the following is true: - the authentication type is API_KEY - authentication type matches the selected api key request location - has a non-null map of API Key values pairs defined-
Methods inherited from class com.boomi.common.rest.RestOperationConnection
buildRequestConfig, configureCookieScope, doPreemptiveAuthentication, getAuthenticationCredentials, getAuthSchemeProviders, getHttpClient, getHttpContext, getRedirectStrategy, getRetryHandler, useSystemProperties
-
Methods inherited from class com.boomi.common.rest.RestConnection
getAuthenticationType, getAWSAccessKey, getAWSRegion, getAWSSecretKey, getAWSService, getConnectionProperty, getConnectTimeout, getCookieScope, getCustomAuthCredentials, getDomain, getHttpMethod, getOAuthContext, getPassword, getPreemptive, getPrivateKeyStore, getPublicKeyStore, getReadTimeout, getUrl, getUsername, getWorkstation, isConnectionPoolingEnabled
-
Methods inherited from class com.boomi.connector.util.BaseConnection
generateConnectionInfo, generateConnectionInfo, getConnector, getContext, getOperationContext
-
-
-
-
Constructor Detail
-
OpenAPIOperationConnection
public OpenAPIOperationConnection(OperationContext context)
-
-
Method Detail
-
getClient
public RestClient getClient()
Creates a OpenAPI client for operation execution- Overrides:
getClient
in classRestOperationConnection
- Returns:
- the RestClient
-
getAPIAuthenticationKeys
protected Map<String,String> getAPIAuthenticationKeys()
Returns a map of key values pairs provided in the API Keys custom properties field for Authentication Type = "API_KEY"- Returns:
- Map of API Keys
-
getAPIAuthenticationType
public APIKeyAuthentication getAPIAuthenticationType()
Returns theAuthenticationType
from the selected "auth" connection field.- Overrides:
getAPIAuthenticationType
in classRestConnection<OperationContext>
- Returns:
- the AuthenticationType
-
isAPIAuthentication
public boolean isAPIAuthentication()
Returns true is selected authentication type is API_KEY- Returns:
-
getEntityContentType
public ContentType getEntityContentType()
Retrieves the content type from the request cookie. This is currently first available request content type based on the selected Path andBrowseContext.getCustomOperationType()
. Multiple Content Types are currently not supported.- Overrides:
getEntityContentType
in classRestOperationConnection
- Returns:
- the ContentType
-
getPath
public String getPath()
Gets the selected Path to execute upon.- Returns:
- the path
-
getRequestCookie
public OpenAPIRequestCookie getRequestCookie()
Retrieves the request cookie, which describes schema type and parameters necessary to make a request- Returns:
- the request cookie
-
getResponseCookie
public OpenAPIResponseCookie getResponseCookie()
Retrieves the response cookie, which describes the response schema types- Returns:
- the response cookie
-
addCookiesToStore
protected void addCookiesToStore(BasicCookieStore cookieStore)
Adds cookies from the apiKeyCustomProperties field into the provided cookie store if the auth is of type API_KEY and Request Location is set to Cookie- Overrides:
addCookiesToStore
in classRestOperationConnection
- Parameters:
cookieStore
-
-
isAPIAuthenticationEnabled
protected boolean isAPIAuthenticationEnabled(APIKeyAuthentication apiKeyAuthentication)
Returns true if the following is true: - the authentication type is API_KEY - authentication type matches the selected api key request location - has a non-null map of API Key values pairs defined
-
-