We are implementing a Storage Extension using SDL Web 8.5.
remove method is invoked while unpublishing an item, but this method is also invoked while republishing an already published item (afterwards the
create method is invoked). This is strange as one would expect the
update method to be invoked instead of
create. Apparently this is a known behavior as I see in How do I get my Storage Extension to call the 'update' method when republishing a Dynamic Component Presentation?).
When I posted this question for Tridion 2013 SP1,
LocalThreadTransaction.get().getDeployerTransaction().getDeployerAction() was the answer and it worked OK. But the same is not working in SDL Web 8.5.
How can I find out within the
remove method if it is invoked in the context of unpublishing or republishing? We have got a reason why we need to differentiate these 2.