Details

    • Sprint:
      Sprint to Beta3 Release
    • Release Notes Text:
      Hide
      The JAX-RS tooling now recognizes method parameters, fields and properties annotated with @BeanParam. The matching type is called a 'ParameterAggregator' and contains itself fields and properties annotated with {{PathParam}}, {{QueryParam}}, etc.
      The JAX-RS Tooling recognizes this Parameter Aggregator element to provide user with correct Endpoint URI Templates in the Project Explorer, and performs the expected validation on all fields/properties/methods.
      Show
      The JAX-RS tooling now recognizes method parameters, fields and properties annotated with @BeanParam. The matching type is called a 'ParameterAggregator' and contains itself fields and properties annotated with {{PathParam}}, {{QueryParam}}, etc. The JAX-RS Tooling recognizes this Parameter Aggregator element to provide user with correct Endpoint URI Templates in the Project Explorer, and performs the expected validation on all fields/properties/methods.

      Description

      See JAX-RS Spec Appendix A (p66):

      BeanParam

      Can be used to inject a user-defined bean whose fields and properties may be annotated with JAX-RS param annotations.

      For example:

      public class MyBeanParam {
          @PathParam("p")
          private String pathParam;
       
          @MatrixParam("m")
          @Encoded
          @DefaultValue("default")
          private String matrixParam;
       
          @HeaderParam("header")
          private String headerParam;
       
          private String queryParam;
       
          public MyBeanParam(@QueryParam("q") String queryParam) {
              this.queryParam = queryParam;
          }
       
          public String getPathParam() {
              return pathParam;
          }
          ...
      }
      

      then

      @POST
      public void post(@BeanParam MyBeanParam beanParam, String entity) {
          final String pathParam = beanParam.getPathParam(); // contains injected path parameter "p"
          ...
      }
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  xcoulon Xavier Coulon
                  Reporter:
                  xcoulon Xavier Coulon
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: