3 Replies Latest reply on Jun 5, 2013 2:23 PM by rush_pawan

    Customizing the DefaultResponseParser




      I am able to successfully create a 'com.adobe.cq.commerce.hybris.importer.MyResponseParser' which extends the 'DefaultResponseParser'. Now instead of calling the DefaultResponseParser, MyResponseParser is being invoked.


      I understand that it is not a good practice to make any changes inside the library files.


      So, is there any way to place 'MyResponseParser.java' file outside of the cq-hybris-content-5.6.2, in my bundle and use it ?

      While trying that, I saw a lot of dependencies are present with other classes of the cq-hybris-content-5.6.2 package.

        • 1. Re: Customizing the DefaultResponseParser
          rush_pawan Level 4



          To make it work first you have to deploy all dependencies as bundle in OSGI and of course confirm that all these bundle should export the required packages that you need your bundle to work usine "export-package" property in .bnd or Meta-Inf file.


          Now after deploying these dependent bundle, in your bundle file define the "import-package" to all the packages that you need this bundle to use.


          I hope above helps you to resolve your issue. Let me know for more information.




          • 2. Re: Customizing the DefaultResponseParser
            Sakshi19 Level 1

            Hi Pawan,


            Thanks for your answer.


            But for export package, I need to change the Meta-Inf file (pom.xml) of the existing bundle which again comes to my previous question, whether it is right to do any change in the existing code.


            Please provide your views over this.




            • 3. Re: Customizing the DefaultResponseParser
              rush_pawan Level 4

              If it is a bundle to integrate hybris in cq environment then i believe it will also have export package option defined by default (you can check) and if its not then i dont think its problem if you are modifying the import/export option in bundle which not the code (as you have valid license) change. I also suggest you to  check if there is other version of bundle available from Hybris with export option.