Package com.boomi.connector.openapi
Class OpenAPIOperation
- java.lang.Object
-
- com.boomi.connector.util.ContextualOperation
-
- com.boomi.connector.util.BaseOperation
-
- com.boomi.connector.util.BaseUpdateOperation
-
- com.boomi.common.rest.RestOperation
-
- com.boomi.connector.openapi.OpenAPIOperation
-
- All Implemented Interfaces:
Operation
- Direct Known Subclasses:
OpenAPIDslOperation
public class OpenAPIOperation extends RestOperation
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
OpenAPIOperation(OpenAPIOperationConnection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OpenAPIOperationConnection
getConnection()
Returns the base connection that was either provided or created when this instance was created.protected HttpEntity
getEntity(ObjectData data)
Returns null for GET, HEAD & DELETE requests.protected Iterable<Map.Entry<String,String>>
getHeaders(ObjectData data)
Fetch a List of Parameter Header Entries and the Accept from the openapi specification response path of: responses.content
.protected Iterable<Map.Entry<String,String>>
getParameters(ObjectData data)
Fetch a List of Query Entries.protected String
getPath(ObjectData data)
Returns the generated Path section of the URI.protected boolean
isRequestBodyRequired()
Returns a boolean value of the "required" attribute from OpenAPI request Cookie.-
Methods inherited from class com.boomi.common.rest.RestOperation
executeUpdate
-
Methods inherited from class com.boomi.connector.util.BaseUpdateOperation
execute
-
Methods inherited from class com.boomi.connector.util.ContextualOperation
getContext
-
-
-
-
Constructor Detail
-
OpenAPIOperation
protected OpenAPIOperation(OpenAPIOperationConnection connection)
-
-
Method Detail
-
getPath
protected String getPath(ObjectData data)
Returns the generated Path section of the URI. The values paths from the operation will be serialized per OpenAPI specification and replaced within the path from the specification.- Overrides:
getPath
in classRestOperation
- Parameters:
data
- incoming request object data.- Returns:
- the Path
-
getHeaders
protected Iterable<Map.Entry<String,String>> getHeaders(ObjectData data)
Fetch a List of Parameter Header Entries and the Accept from the openapi specification response path of: responses.content
. Header Parameters come from the specification and will be serialized per specification.- Overrides:
getHeaders
in classRestOperation
- Parameters:
data
- incoming request object data.- Returns:
- Iterable Entry List of Headers
-
getParameters
protected Iterable<Map.Entry<String,String>> getParameters(ObjectData data)
Fetch a List of Query Entries. These query parameters come from the specification and will be serialized per specification.- Overrides:
getParameters
in classRestOperation
- Parameters:
data
- incoming request object data.- Returns:
- Iterable Entry List of query parameters
-
getConnection
public OpenAPIOperationConnection getConnection()
Description copied from class:ContextualOperation
Returns the base connection that was either provided or created when this instance was created.- Overrides:
getConnection
in classRestOperation
- Returns:
- the base connection
-
getEntity
protected HttpEntity getEntity(ObjectData data) throws IOException
Returns null for GET, HEAD & DELETE requests. Null corresponds to a null request payload/body. GET, HEAD & DELETE requests are no longer allowed to have request body as per RFC-7231. In other cases, the HttpEntity with the request data will be returned.- Overrides:
getEntity
in classRestOperation
- Parameters:
data
- incoming request object data.- Returns:
- the HttpEntity
- Throws:
IOException
- IOException if unable to fetch data
-
isRequestBodyRequired
protected boolean isRequestBodyRequired()
Returns a boolean value of the "required" attribute from OpenAPI request Cookie.- Overrides:
isRequestBodyRequired
in classRestOperation
- Returns:
- true if requestBody is required, false otherwise
-
-