3

We are implementing Storage Extension. Using 2013 SP1.

"remove" method is invoked while unpublishing an item. This method is also invoked while republishing an already published item (and then "create" method is invoked. This is strange as one would expect update method to be invoked instead of remove and 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?).

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 in the remove method.

1 Answer 1

8

In a DAO, you can try to fish out the Deployer Action like so:

 LocalThreadTransaction.get().getDeployerTransaction().getDeployerAction()
1
  • I am developing a storage extension for Tridion DX. LocalThreadTransaction.get() returns me null inside a DAO class. any idea? Mar 18, 2020 at 2:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.