@Test public void testList() throws Exception { final SDSNodeIdProvider nodeid = new SDSNodeIdProvider(session).withCache(cache); final Path room = new SDSDirectoryFeature(session, nodeid).mkdir( new Path(new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory, Path.Type.volume, Path.Type.triplecrypt)), null, new TransferStatus()); assertTrue(new SDSListService(session, nodeid).list(room, new DisabledListProgressListener()).isEmpty()); new SDSTouchFeature(session, nodeid).touch(new Path(room, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), new TransferStatus()); assertEquals(1, (new SDSListService(session, nodeid).list(room, new DisabledListProgressListener(), 1).size())); new SDSTouchFeature(session, nodeid).touch(new Path(room, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), new TransferStatus()); assertEquals(2, (new SDSListService(session, nodeid).list(room, new DisabledListProgressListener(), 1).size())); assertEquals(2, (new SDSListService(session, nodeid).list(room, new DisabledListProgressListener()).size())); new SDSTouchFeature(session, nodeid).touch(new Path(room, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), new TransferStatus()); assertEquals(3, (new SDSListService(session, nodeid).list(room, new DisabledListProgressListener(), 1).size())); assertEquals(3, (new SDSListService(session, nodeid).list(room, new DisabledListProgressListener()).size())); new SDSDeleteFeature(session, nodeid).delete(Collections.<Path>singletonList(room), new DisabledLoginCallback(), new Delete.DisabledCallback()); }
@Override public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException { return this.list(directory, listener, PreferencesFactory.get().getInteger("sds.listing.chunksize")); }
SDSListService implements ListService { @Override public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException { return this.list(directory, listener, PreferencesFactory.get().getInteger("sds.listing.chunksize")); } }
SDSListService implements ListService { @Override public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException { return this.list(directory, listener, PreferencesFactory.get().getInteger("sds.listing.chunksize")); } SDSListService(final SDSSession session, final SDSNodeIdProvider nodeid);  SDSListService(final SDSSession session, final SDSNodeIdProvider nodeid, final boolean references); }
SDSListService implements ListService { @Override public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException { return this.list(directory, listener, PreferencesFactory.get().getInteger("sds.listing.chunksize")); } SDSListService(final SDSSession session, final SDSNodeIdProvider nodeid);  SDSListService(final SDSSession session, final SDSNodeIdProvider nodeid, final boolean references); @Override AttributedList<Path> list(final Path directory, final ListProgressListener listener); @Override ListService withCache(final Cache<Path> cache); }
SDSListService implements ListService { @Override public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException { return this.list(directory, listener, PreferencesFactory.get().getInteger("sds.listing.chunksize")); } SDSListService(final SDSSession session, final SDSNodeIdProvider nodeid);  SDSListService(final SDSSession session, final SDSNodeIdProvider nodeid, final boolean references); @Override AttributedList<Path> list(final Path directory, final ListProgressListener listener); @Override ListService withCache(final Cache<Path> cache);  }