public interface Operation
Modifier and Type | Method and Description |
---|---|
void |
addListener(java.beans.PropertyChangeListener listener)
Add an event listener.
|
Parameter |
addParameter(java.lang.String name,
ParameterType parameterType,
DataType dataType)
Add a new parameter with the specified name and type.
|
Response |
addResponse(int statusCode,
java.lang.String description)
Add a new response with the given HTTP status code to this operation.
|
Operation |
addResponse(Response response)
Add a new response.
|
Request |
createRequest()
Create and set a minimal request definition (blank schema) for this operation.
|
Operation |
deleteParameter(java.lang.String name)
Delete an existing parameter with the specified name.
|
Operation |
deleteRequest()
Delete the request definition for this operation.
|
Operation |
deleteResponse(int statusCode)
Delete an existing response with the given HTTP status code from this operation.
|
java.util.List<java.lang.String> |
getConsumesMIMETypes()
Get a list of MIME types (for example application/json) that this operation can consume.
|
java.lang.String |
getDescription()
Get a description of this operation.
|
Method |
getMethod()
Get the HTTP method of this operation, for example "GET".
|
java.lang.String |
getName()
Get the name of this operation, for example "getPetById".
|
java.lang.String |
getName(boolean allowGenerated)
Get the name of this operation, for example "getPet", specifying whether to allow generated names to be returned.
|
Parameter |
getParameter(java.lang.String name)
Get the parameter with the specified name.
|
java.util.List<Parameter> |
getParameters()
Get the list of parameters supported by this operation.
|
java.util.List<java.lang.String> |
getProducesMIMETypes()
Get a list of MIME types (for example application/json) that this operation can produce.
|
Request |
getRequest()
Get the request definition for this operation.
|
Resource |
getResource()
Get the resource that this operation belongs to.
|
Response |
getResponse(int statusCode)
Get the response with the given HTTP status code for this operation.
|
java.util.List<Response> |
getResponses()
Get a list of possible responses for this operation.
|
java.util.List<java.util.List<SecurityRequirement>> |
getSecurityRequirements()
Get a list of security requirements for this operation.
|
java.lang.String |
getSummary()
Get a summary of this operation.
|
void |
removeListener(java.beans.PropertyChangeListener listener)
Remove an event listener.
|
Operation |
setConsumesMIMETypes(java.util.List<java.lang.String> consumes)
Set the list of MIME types (for example application/json) that this operation can consume.
|
Operation |
setDescription(java.lang.String description)
Set the description of this operation.
|
Operation |
setMethod(Method method)
Set the HTTP method of this operation, for example "GET".
|
Operation |
setName(java.lang.String name)
Set the name of this operation, for example "getPetById".
|
Operation |
setProducesMIMETypes(java.util.List<java.lang.String> produces)
Set the list of MIME types (for example application/json) that this operation can produce.
|
Operation |
setRequest(Request request)
Set the request definition for this operation.
|
Operation |
setRequest(java.lang.String description,
boolean required,
com.ibm.broker.rest.schema.SchemaType schemaType,
java.lang.String schema)
Set the request definition for this operation.
|
Operation |
setSummary(java.lang.String summary)
Set the summary of this operation.
|
void addListener(java.beans.PropertyChangeListener listener)
listener
- void removeListener(java.beans.PropertyChangeListener listener)
listener
- Resource getResource()
java.lang.String getName()
java.lang.String getName(boolean allowGenerated)
allowGenerated
- used to specify whether we want to allow retrieving a generated name or just what is specified in the swagger.Operation setName(java.lang.String name) throws ApiException
name
- the new name of this operation.ApiException
- if the name could not be changed.Method getMethod()
Operation setMethod(Method method) throws ApiException
method
- the new HTTP method of this operation.ApiException
- if the HTTP method could not be changed.java.util.List<Parameter> getParameters()
Parameter getParameter(java.lang.String name) throws ApiException
name
- the name of the parameter.ApiException
- if no parameter with the specified name exists.Parameter addParameter(java.lang.String name, ParameterType parameterType, DataType dataType) throws ApiException
name
- the name of the parameter.parameterType
- the type of the parameter.dataType
- the data type of the parameter.ApiException
- if the new parameter could not be added.Operation deleteParameter(java.lang.String name) throws ApiException
name
- the name of the parameter.ApiException
- if the existing parameter could not be deleted.java.lang.String getDescription()
Operation setDescription(java.lang.String description) throws ApiException
description
- the new description of this operation.ApiException
- if the description could not be changed.java.lang.String getSummary()
Operation setSummary(java.lang.String summary) throws ApiException
summary
- the new summary of this operation.ApiException
- if the summary could not be changed.Request getRequest()
Request createRequest() throws ApiException
ApiException
Operation setRequest(Request request) throws ApiException
request
- the desired request definition.ApiException
Operation setRequest(java.lang.String description, boolean required, com.ibm.broker.rest.schema.SchemaType schemaType, java.lang.String schema) throws ApiException, com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, java.io.IOException
java.io.IOException
com.fasterxml.jackson.databind.JsonMappingException
com.fasterxml.jackson.core.JsonParseException
ApiException
Operation deleteRequest() throws ApiException
ApiException
java.util.List<Response> getResponses()
Response getResponse(int statusCode) throws ApiException
statusCode
- the HTTP status code of the response.ApiException
- if no response with the specified HTTP status code exists.Response addResponse(int statusCode, java.lang.String description) throws ApiException
statusCode
- the HTTP status code of the response.description
- the description of the response.ApiException
- if the new response could not be added.Operation addResponse(Response response) throws ApiException
response
- the response object to addApiException
Operation deleteResponse(int statusCode) throws ApiException
statusCode
- the HTTP status code of the response.ApiException
- if the existing response could not be deleted.java.util.List<java.lang.String> getConsumesMIMETypes()
Operation setConsumesMIMETypes(java.util.List<java.lang.String> consumes) throws ApiException
consumes
- the list of MIME types that this operation can consume, or null to clear the list.ApiException
- if the list could not be set.java.util.List<java.lang.String> getProducesMIMETypes()
Operation setProducesMIMETypes(java.util.List<java.lang.String> produces) throws ApiException
produces
- the list of MIME types that this operation can produce, or null to clear the list.ApiException
- if the list could not be set.java.util.List<java.util.List<SecurityRequirement>> getSecurityRequirements()