@Test public void testListBuckenameAnonymous() throws Exception { final Host host = new Host(new S3Protocol(), "dist.springframework.org.s3.amazonaws.com", new Credentials( PreferencesFactory.get().getProperty("connection.login.anon.name"), null )); final S3Session session = new S3Session(host); final LoginConnectionService login = new LoginConnectionService(new DisabledLoginCallback() { @Override public Credentials prompt(final Host bookmark, final String username, final String title, final String reason, final LoginOptions options) { fail(reason); return null; } }, new DisabledHostKeyCallback(), new DisabledPasswordStore(), new DisabledProgressListener()); login.check(session, PathCache.empty(), new DisabledCancelCallback()); final AttributedList<Path> list = new S3ObjectListService(session).list(new Path("/dist.springframework.org", EnumSet.of(Path.Type.directory)), new DisabledListProgressListener()); assertFalse(list.isEmpty()); assertTrue(list.contains(new Path("/dist.springframework.org/release", EnumSet.of(Path.Type.directory, Path.Type.placeholder)))); assertTrue(list.contains(new Path("/dist.springframework.org/milestone", EnumSet.of(Path.Type.directory, Path.Type.placeholder)))); assertTrue(list.contains(new Path("/dist.springframework.org/snapshot", EnumSet.of(Path.Type.directory, Path.Type.placeholder)))); }
@Override public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException { return this.list(directory, listener, String.valueOf(Path.DELIMITER)); }
S3ObjectListService extends S3AbstractListService implements ListService { @Override public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException { return this.list(directory, listener, String.valueOf(Path.DELIMITER)); } }
S3ObjectListService extends S3AbstractListService implements ListService { @Override public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException { return this.list(directory, listener, String.valueOf(Path.DELIMITER)); } S3ObjectListService(final S3Session session); }
S3ObjectListService extends S3AbstractListService implements ListService { @Override public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException { return this.list(directory, listener, String.valueOf(Path.DELIMITER)); } S3ObjectListService(final S3Session session); @Override ListService withCache(final Cache<Path> cache); @Override AttributedList<Path> list(final Path directory, final ListProgressListener listener); AttributedList<Path> list(final Path directory, final ListProgressListener listener, final String delimiter); AttributedList<Path> list(final Path directory, final ListProgressListener listener, final String delimiter, final int chunksize); }
S3ObjectListService extends S3AbstractListService implements ListService { @Override public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException { return this.list(directory, listener, String.valueOf(Path.DELIMITER)); } S3ObjectListService(final S3Session session); @Override ListService withCache(final Cache<Path> cache); @Override AttributedList<Path> list(final Path directory, final ListProgressListener listener); AttributedList<Path> list(final Path directory, final ListProgressListener listener, final String delimiter); AttributedList<Path> list(final Path directory, final ListProgressListener listener, final String delimiter, final int chunksize);  }