private void duplicateDeletion ( final String spaceId , final String contentId ) throws TaskExecutionFailedException { if ( existsInSourceManifest ( spaceId , contentId ) ) { throw new TaskExecutionFailedException ( MessageFormat . format ( "item exists in source manifest and thus appears to be " + "missing content. account={0}, storeId={1}, spaceId={2}, contentId={3}" , this . dupTask . getAccount ( ) , this . dupTask . getSourceStoreId ( ) , spaceId , contentId ) ) ; } log . info ( "Duplicating deletion of " + contentId + " in dest space " + spaceId + " in account " + dupTask . getAccount ( ) ) ; try { new Retrier ( ) . execute ( new Retriable ( ) { @ Override public String retry ( ) throws Exception { // Delete content destStore . deleteContent ( spaceId , contentId ) ; return "success" ; } } ) ; } catch ( Exception e ) { String msg = "Error attempting to delete content : " + e . getMessage ( ) ; throw new DuplicationTaskExecutionFailedException ( buildFailureMessage ( msg ) , e ) ; } log . info ( "Successfully deleted content item (content_id=" + contentId + ") in dest space (space_id=" + spaceId + ") where account_id=" + dupTask . getAccount ( ) ) ; }
Deletes a content item in the destination space but only if it does not exists in the source manifest .