Class VerbDefinition

    • Constructor Detail

      • VerbDefinition

        public VerbDefinition()
    • Method Detail

      • getShortName

        public String getShortName()
        Specified by:
        getShortName in interface org.apache.camel.NamedNode
      • getLabel

        public String getLabel()
        Specified by:
        getLabel in interface org.apache.camel.NamedNode
      • addOutput

        public void addOutput​(ProcessorDefinition<?> processorDefinition)
        Description copied from interface: Block
        Adds the given definition as output to this block
        Specified by:
        addOutput in interface Block
        Parameters:
        processorDefinition - the processor definition
      • getDeprecated

        public Boolean getDeprecated()
      • deprecated

        public VerbDefinition deprecated()
        Sets deprecated flag in openapi
      • setDeprecated

        public void setDeprecated​(Boolean deprecated)
      • setSecurity

        public void setSecurity​(List<SecurityDefinition> security)
        Sets the security settings for this verb.
      • getMethod

        public String getMethod()
      • setMethod

        public void setMethod​(String method)
        The HTTP verb such as GET, POST, DELETE, etc.
      • getUri

        public String getUri()
      • setUri

        public void setUri​(String uri)
        Uri template of this REST service such as /{id}.
      • getConsumes

        public String getConsumes()
      • setConsumes

        public void setConsumes​(String consumes)
        To define the content type what the REST service consumes (accept as input), such as application/xml or application/json. This option will override what may be configured on a parent level
      • getProduces

        public String getProduces()
      • setProduces

        public void setProduces​(String produces)
        To define the content type what the REST service produces (uses for output), such as application/xml or application/json This option will override what may be configured on a parent level
      • getBindingMode

        public String getBindingMode()
      • setBindingMode

        public void setBindingMode​(String bindingMode)
        Sets the binding mode to use. This option will override what may be configured on a parent level

        The default value is auto

      • getSkipBindingOnErrorCode

        public String getSkipBindingOnErrorCode()
      • setSkipBindingOnErrorCode

        public void setSkipBindingOnErrorCode​(String skipBindingOnErrorCode)
        Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. This option will override what may be configured on a parent level
      • getClientRequestValidation

        public String getClientRequestValidation()
      • setClientRequestValidation

        public 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.

        This can be turned on, to enable this check. In case of validation error, then HTTP Status codes 415 or 406 is returned.

        The default value is false.

      • getEnableCORS

        public String getEnableCORS()
      • setEnableCORS

        public void setEnableCORS​(String enableCORS)
        Whether to enable CORS headers in the HTTP response. This option will override what may be configured on a parent level

        The default value is false.

      • getType

        public String getType()
      • setType

        public void setType​(String type)
        Sets the class name to use for binding from input to POJO for the incoming data This option will override what may be configured on a parent level.

        The name of the class of the input data. Append a [] to the end of the name if you want the input to be an array type.

      • getTypeClass

        public Class<?> getTypeClass()
      • setTypeClass

        public void setTypeClass​(Class<?> typeClass)
        Sets the class to use for binding from input to POJO for the incoming data This option will override what may be configured on a parent level.
      • getOutType

        public String getOutType()
      • setOutType

        public void setOutType​(String outType)
        Sets the class name to use for binding from POJO to output for the outgoing data This option will override what may be configured on a parent level

        The name of the class of the input data. Append a [] to the end of the name if you want the input to be an array type.

      • getOutTypeClass

        public Class<?> getOutTypeClass()
      • setOutTypeClass

        public void setOutTypeClass​(Class<?> outTypeClass)
        Sets the class to use for binding from POJO to output for the outgoing data This option will override what may be configured on a parent level.
      • getRouteId

        public String getRouteId()
      • setRouteId

        public void setRouteId​(String routeId)
        The route id this rest-dsl is using (read-only)
      • getApiDocs

        public String getApiDocs()
      • setApiDocs

        public void setApiDocs​(String apiDocs)
        Whether to include or exclude the VerbDefinition in API documentation.

        The default value is true.

      • setToOrRoute

        public void setToOrRoute​(OptionalIdentifiedDefinition<?> toOrRoute)
        To route from this REST service to a Camel endpoint, or an inlined route
      • asVerb

        public String asVerb()
      • getUsedForGeneratingNodeId

        public Boolean getUsedForGeneratingNodeId()
      • setUsedForGeneratingNodeId

        public void setUsedForGeneratingNodeId​(Boolean usedForGeneratingNodeId)