@Metadata(label="rest") public class RestBindingDefinition extends OptionalIdentifiedDefinition<RestBindingDefinition>
Constructor and Description |
---|
RestBindingDefinition() |
Modifier and Type | Method and Description |
---|---|
void |
addDefaultValue(String paramName,
String defaultValue)
Adds a default value for the query parameter
|
void |
addRequiredHeader(String headerName)
Adds a required HTTP header
|
void |
addRequiredQueryParameter(String paramName)
Adds a required query parameter
|
RestBindingMode |
getBindingMode() |
Boolean |
getClientRequestValidation() |
String |
getComponent() |
String |
getConsumes() |
Map<String,String> |
getDefaultValues()
Gets the registered default values for query parameters
|
Boolean |
getEnableCORS() |
String |
getLabel() |
String |
getOutType() |
String |
getProduces() |
Boolean |
getRequiredBody() |
Set<String> |
getRequiredHeaders() |
Set<String> |
getRequiredQueryParameters() |
String |
getShortName() |
Boolean |
getSkipBindingOnErrorCode() |
String |
getType() |
void |
setBindingMode(RestBindingMode bindingMode)
Sets the binding mode to use.
|
void |
setClientRequestValidation(Boolean clientRequestValidation)
Whether to enable validation of the client request to check whether the
Content-Type and Accept headers from the client is supported by the
Rest-DSL configuration of its consumes/produces settings.
|
void |
setComponent(String component)
Sets the component name that this definition will apply to
|
void |
setConsumes(String consumes)
To define the content type what the REST service consumes (accept as
input), such as application/xml or application/json
|
void |
setEnableCORS(Boolean enableCORS)
Whether to enable CORS headers in the HTTP response.
|
void |
setOutType(String outType)
Sets the class name to use for binding from POJO to output for the
outgoing data
The canonical name of the class of the input data.
|
void |
setProduces(String produces)
To define the content type what the REST service produces (uses for
output), such as application/xml or application/json
|
void |
setRequiredBody(Boolean requiredBody) |
void |
setSkipBindingOnErrorCode(Boolean skipBindingOnErrorCode)
Whether to skip binding on output if there is a custom HTTP error code
header.
|
void |
setType(String type)
Sets the class name to use for binding from input to POJO for the
incoming data
The canonical name of the class of the input data.
|
String |
toString() |
description, description, getCustomId, getDescription, getDescriptionText, getId, getParent, hasCustomIdAssigned, id, idOrCreate, setCustomId, setDescription, setId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getReadPropertyPlaceholderOptions, getWritePropertyPlaceholderOptions
public RestBindingDefinition()
public String getConsumes()
public void addDefaultValue(String paramName, String defaultValue)
paramName
- query parameter namedefaultValue
- the default valuepublic void addRequiredQueryParameter(String paramName)
paramName
- query parameter namepublic Set<String> getRequiredQueryParameters()
public void addRequiredHeader(String headerName)
headerName
- HTTP header namepublic Set<String> getRequiredHeaders()
public Boolean getRequiredBody()
public void setRequiredBody(Boolean requiredBody)
public Map<String,String> getDefaultValues()
public void setComponent(String component)
public String getComponent()
public void setConsumes(String consumes)
public String getProduces()
public void setProduces(String produces)
public RestBindingMode getBindingMode()
public void setBindingMode(RestBindingMode bindingMode)
public void setType(String type)
public String getOutType()
public void setOutType(String outType)
public Boolean getSkipBindingOnErrorCode()
public void setSkipBindingOnErrorCode(Boolean skipBindingOnErrorCode)
public Boolean getClientRequestValidation()
public void setClientRequestValidation(Boolean clientRequestValidation)
public Boolean getEnableCORS()
public void setEnableCORS(Boolean enableCORS)
public String getShortName()
Apache Camel