class GoogleStorageDeleteFeature implements Delete {

    @Override
    public void delete(final Map<Path, TransferStatus> files, final PasswordCallback prompt, final Callback callback) throws BackgroundException {
        try {
            for(Path file : files.keySet()) {
                callback.delete(file);
                if(containerService.isContainer(file)) {
                    session.getClient().buckets().delete(file.getName()).execute();
                }
                else {
                    session.getClient().objects().delete(containerService.getContainer(file).getName(), containerService.getKey(file)).execute();
                }
            }
        }
        catch(IOException e) {
            throw new GoogleStorageExceptionMappingService().map(e);
        }
    }

    public  GoogleStorageDeleteFeature(final GoogleStorageSession session);

}