@Test(expected = NotfoundException.class) public void testDeleteNotFound() throws Exception { final Path test = new Path(new DropboxHomeFinderFeature(session).find(), UUID.randomUUID().toString(), EnumSet.of(Path.Type.file)); new DropboxDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback()); }
@Override public void delete(final Map<Path, TransferStatus> files, final PasswordCallback prompt, final Callback callback) throws BackgroundException { for(Path file : files.keySet()) { try { callback.delete(file); if(containerService.isContainer(file)) { new DbxUserFilesRequests(session.getClient(file.getParent())).deleteV2(file.getAbsolute()); } else { new DbxUserFilesRequests(session.getClient(file)).deleteV2(containerService.getKey(file)); } } catch(DbxException e) { throw new DropboxExceptionMappingService().map("Cannot delete {0}", e, file); } } }
DropboxDeleteFeature implements Delete { @Override public void delete(final Map<Path, TransferStatus> files, final PasswordCallback prompt, final Callback callback) throws BackgroundException { for(Path file : files.keySet()) { try { callback.delete(file); if(containerService.isContainer(file)) { new DbxUserFilesRequests(session.getClient(file.getParent())).deleteV2(file.getAbsolute()); } else { new DbxUserFilesRequests(session.getClient(file)).deleteV2(containerService.getKey(file)); } } catch(DbxException e) { throw new DropboxExceptionMappingService().map("Cannot delete {0}", e, file); } } } }
DropboxDeleteFeature implements Delete { @Override public void delete(final Map<Path, TransferStatus> files, final PasswordCallback prompt, final Callback callback) throws BackgroundException { for(Path file : files.keySet()) { try { callback.delete(file); if(containerService.isContainer(file)) { new DbxUserFilesRequests(session.getClient(file.getParent())).deleteV2(file.getAbsolute()); } else { new DbxUserFilesRequests(session.getClient(file)).deleteV2(containerService.getKey(file)); } } catch(DbxException e) { throw new DropboxExceptionMappingService().map("Cannot delete {0}", e, file); } } } DropboxDeleteFeature(final DropboxSession session); }
DropboxDeleteFeature implements Delete { @Override public void delete(final Map<Path, TransferStatus> files, final PasswordCallback prompt, final Callback callback) throws BackgroundException { for(Path file : files.keySet()) { try { callback.delete(file); if(containerService.isContainer(file)) { new DbxUserFilesRequests(session.getClient(file.getParent())).deleteV2(file.getAbsolute()); } else { new DbxUserFilesRequests(session.getClient(file)).deleteV2(containerService.getKey(file)); } } catch(DbxException e) { throw new DropboxExceptionMappingService().map("Cannot delete {0}", e, file); } } } DropboxDeleteFeature(final DropboxSession session); @Override void delete(final Map<Path, TransferStatus> files, final PasswordCallback prompt, final Callback callback); @Override boolean isRecursive(); }
DropboxDeleteFeature implements Delete { @Override public void delete(final Map<Path, TransferStatus> files, final PasswordCallback prompt, final Callback callback) throws BackgroundException { for(Path file : files.keySet()) { try { callback.delete(file); if(containerService.isContainer(file)) { new DbxUserFilesRequests(session.getClient(file.getParent())).deleteV2(file.getAbsolute()); } else { new DbxUserFilesRequests(session.getClient(file)).deleteV2(containerService.getKey(file)); } } catch(DbxException e) { throw new DropboxExceptionMappingService().map("Cannot delete {0}", e, file); } } } DropboxDeleteFeature(final DropboxSession session); @Override void delete(final Map<Path, TransferStatus> files, final PasswordCallback prompt, final Callback callback); @Override boolean isRecursive();  }