2 Replies Latest reply: Oct 1, 2013 8:30 AM by Nitin Khare RSS

    Extend CMS


      Hi All,

      I have to update a property in sku depending on the product/category/data is filled for it.

      I do not want to make it a custom transient property since the property will be used to query the repository.


      How can i add a new function to CatalogMaintainenceService or is there any other possible approach to do it?




        • 1. Re: Extend CMS

          Any suggestions to do it?

          • 2. Re: Extend CMS
            Nitin Khare

            I have not tried it and also not sure if this approach is actually applicable in your overall scheme of things but I guess you can try overriding the postService(boolean pPerformServiceReturn, Repository pRepository, Collection pCatalogIds, List pServiceFunctions) method in your component class for /atg/commerce/catalog/CatalogMaintenanceService which would be extending the OOTB CatalogMaintenanceService class. Check its API details and depending on values you get for various method arguments when it is invoked internally see if you can utilize them to serve your purpose. And make sure you don't forget to call super.postService(..) from your overridden version.


            Another thought is to try using a custom property descriptor for your SKU property so that you can apply some custom logic every time its value is accessed through getPropertyValue().