ICanHasAttachment attachmentHandler = null;
ContentHandler contentHandler = ContentManager.getHandler( item.getFormat() );
if ( contentHandler instanceof ICanHasAttachment ) {
attachmentHandler = (ICanHasAttachment) contentHandler;
try {
attachmentHandler.onAttachmentRemoved( item );
} catch ( IOException ioe ) {
log.error( "Unable to remove asset attachment",
ioe );
}
}