@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
|
String |
getBindingMode() |
String |
getClientRequestValidation() |
String |
getComponent() |
String |
getConsumes() |
Map<String,String> |
getDefaultValues()
Gets the registered default values for query parameters
|
String |
getEnableCORS() |
String |
getLabel() |
String |
getOutType() |
Class<?> |
getOutTypeClass() |
String |
getProduces() |
Boolean |
getRequiredBody() |
Set<String> |
getRequiredHeaders() |
Set<String> |
getRequiredQueryParameters() |
String |
getShortName() |
String |
getSkipBindingOnErrorCode() |
String |
getType() |
Class<?> |
getTypeClass() |
void |
setBindingMode(String bindingMode)
Sets the binding mode to use.
|
void |
setClientRequestValidation(String 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(String 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 name of the class of the input data.
|
void |
setOutTypeClass(Class<?> outTypeClass)
Sets the class name to use for binding from POJO to output for the outgoing 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(String 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 name of the class of the input data.
|
void |
setTypeClass(Class<?> typeClass)
Sets the class to use for binding from input to POJO for the incoming data
|
String |
toString() |
description, description, getCustomId, getDescription, getDescriptionText, getId, getParent, hasCustomIdAssigned, id, idOrCreate, setCustomId, setDescription, setGeneratedId, setId
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 void addRequiredHeader(String headerName)
headerName
- HTTP header namepublic 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 String getBindingMode()
public void setBindingMode(String bindingMode)
public String getType()
public void setType(String type)
public Class<?> getTypeClass()
public void setTypeClass(Class<?> typeClass)
public String getOutType()
public void setOutType(String outType)
public Class<?> getOutTypeClass()
public void setOutTypeClass(Class<?> outTypeClass)
public String getSkipBindingOnErrorCode()
public void setSkipBindingOnErrorCode(String skipBindingOnErrorCode)
public String getClientRequestValidation()
public void setClientRequestValidation(String clientRequestValidation)
public String getEnableCORS()
public void setEnableCORS(String enableCORS)
public String getShortName()
public String getLabel()
Apache Camel