Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-16329 Support JAX-RS 2.0
  3. JBIDE-16752

Provide validation for JAX-RS 2.0 Interceptors and Filters (with Name Binding)

    XMLWordPrintable

Details

    • Sprint to Beta3 Release
    • Hide
      In addition to support for @NameBinding annotations, a new validator checks if at least a resource/resource method/application is annotated with the same set of binding annotations (ie user-defined annotations themselves annotated with @NameBinding) that those found on new ContainerFilter or Interceptors, and vice-versa.

      Show
      In addition to support for @NameBinding annotations, a new validator checks if at least a resource/resource method/application is annotated with the same set of binding annotations (ie user-defined annotations themselves annotated with @NameBinding) that those found on new ContainerFilter or Interceptors, and vice-versa.

    Description

      Interceptor bindings

      A filter or interceptor class can be decorated with multiple binding annotations. In this case, in accordance with the semantics described in CDI, all those annotations must be present in the resource class or method for the binding to be established. For example, if LoggingFilter is defined as follows:

      @Provider
      @Logged @Verbose
      class LoggingFilter implements ContainerRequestFilter,
                                        ContainerResponseFilter {
      ...
      }
      

      then method hello above must be annotated with both @Logged and @Verbose for the binding to be in effect.

      Binding annotations can also be applied to resource classes and Application subclasses. Binding annotations that decorate resource classes apply to all resource methods defined in them.

      This means that validation should not report an error if binding annotation are found on Filters and Resource classes, Resource methods and the Application subclass (if defined)

      Attachments

        Issue Links

          Activity

            People

              xcoulon@redhat.com Xavier Coulon
              xcoulon@redhat.com Xavier Coulon
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: