Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-5934

Make WadlGenerator more easily extensible

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.1
    • 2.7.13, 3.0.2, 3.1
    • None
    • None
    • Unknown

    Description

      Trying to extend wadl generator is a pain today (= implies duplication). Would be great to get more protected method to do it faster.

      Here some of them (well the one I hoped ):

      • preEndMethod: in org.apache.cxf.jaxrs.model.wadl.WadlGenerator#handleOperation before writing </method>. That's basically the symmetric of org.apache.cxf.jaxrs.model.wadl.WadlGenerator#startMethodTag
      • startMethodTag should be IMO protected too
      • pre/post <request />, <response />, <resource /> (startResourceTag protected for pre part)

      Basically idea is to be able to add before or after playing with super:

      public class MyWadlGenerator extends WadlGenerator {
          @Override
         protected void startResourceTag(StringBuilder sb, Class<?> serviceClass, String path) {
               super.startResourceTag(sb, serviceClass, path);
              sb.append(...);
         }
      }
      

      Personally I desire it for resources and methods but request and response would be nice to have.

      PS: handleGrammars is nice for its pupose IMO

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            romain.manni-bucau Romain Manni-Bucau
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: