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 protectedOpenAPIOperation(OpenAPIOperationConnection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OpenAPIOperationConnectiongetConnection()Returns the base connection that was either provided or created when this instance was created.protected HttpEntitygetEntity(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 StringgetPath(ObjectData data)Returns the generated Path section of the URI.protected booleanisRequestBodyRequired()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:
getPathin 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:
getHeadersin 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:
getParametersin classRestOperation- Parameters:
data- incoming request object data.- Returns:
- Iterable Entry List of query parameters
-
getConnection
public OpenAPIOperationConnection getConnection()
Description copied from class:ContextualOperationReturns the base connection that was either provided or created when this instance was created.- Overrides:
getConnectionin 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:
getEntityin 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:
isRequestBodyRequiredin classRestOperation- Returns:
- true if requestBody is required, false otherwise
-
-