We want to allow our users (non admins) to download expired assets. There is an OOTB assetdownloadserviceImpl (java) that prevents them from doing so since it checks if an asset is expired or not. I have changed this behavior and implemented custom assetdownloadservice. Now the problem is there are two service implementations for the same service and the OOTB service implementation is getting priority over the custom one. I tried to set the service.ranking property to Integer=10000 for the custom implementation to see if that would help, but no luck. If I manually disable the OOTB service component through OSGI system console, my custom implementation gets called.
So my question is, is it possible to give priority to custom implementation in any other way than the service.ranking, if not, is it possible to disable the OOTB implementation using configuration or programmatically?
Other option I could think of is to overlay downloadassetservlet to call custom service and register the servlet on a custom selector instead of assetdownload selector that way overlay of UI would use the new selector. But I feel this is all unnecessary and the higher service ranking should have done the trick.