@Override
    public void deleteAssetAndAttachments(final String assetId) throws IOException, RequestFailureException {
        Asset ass = getUnverifiedAsset(assetId);
        List<Attachment> attachments = ass.getAttachments();
        if (attachments != null) {
            for (Attachment attachment : attachments) {
                deleteAttachment(assetId, attachment.get_id());
            }
        }
        // Now delete the asset
        deleteAsset(assetId);
    }
@ Override public void deleteAssetAndAttachments ( final String assetId ) throws IOException , RequestFailureException { Asset ass = getUnverifiedAsset ( assetId ) ; List < Attachment > attachments = ass . getAttachments ( ) ; if ( attachments != null ) { for ( Attachment attachment : attachments ) { deleteAttachment ( assetId , attachment . get_id ( ) ) ; } } deleteAsset ( assetId ) ; }
This will delete an asset and all its attachments

@param assetId
The id of the asset
@return <code>true</code> if the asset and all its attachments are
deleted. Note this is not atomic so some attachments may be
deleted and <code>false</code> returned.
@throws IOException
@throws RequestFailureException