In case you have written any SDL Tridion Content Delivery Deployer extensions, you have noticed there is no easy way in intercepting the unpublish/undeploy of a binary. This blog post shows how to intercept such an action and execute your custom code on it. The reason why it is hard to intercept a binary undeploy is because in fact the binary remove does not happen at Deployer level; rather, it takes place in the storage level. So the extension point to be used in not a Deployer extension, but a storage FileSystem or JPA extension. File System The following code implements a storage extension that intercepts the removal of a binary from the File System Content Data Storage (fka the File system broker): package com . tridion . storage . toolkit ; @Component ( "FSBinaryDAOExtension" ) @Scope ( "prototype" ) public class FSBinaryDAOExtension extends FSBinaryContentDAO implements BinaryContentDAO { @Override public void remove ( int publ...
talk is cheap. show me the code.