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.

7

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

 LocalThreadTransaction.get().getDeployerTransaction().getDeployerAction()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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