@Test public void testEmptyThirdPartyProvider() { final Host host = new Host(new S3Protocol(), "mys3", new Credentials( PreferencesFactory.get().getProperty("connection.login.anon.name"), null )); final S3Session session = new S3Session(host); assertTrue(new S3LocationFeature(session).getLocations().isEmpty()); }
@Override public Set<Name> getLocations() { if(StringUtils.isNotBlank(session.getHost().getRegion())) { return Collections.singleton(new S3Region(session.getHost().getRegion())); } if(S3Session.isAwsHostname(session.getHost().getHostname())) { return session.getHost().getProtocol().getRegions(); } return Collections.emptySet(); }
S3LocationFeature implements Location { @Override public Set<Name> getLocations() { if(StringUtils.isNotBlank(session.getHost().getRegion())) { return Collections.singleton(new S3Region(session.getHost().getRegion())); } if(S3Session.isAwsHostname(session.getHost().getHostname())) { return session.getHost().getProtocol().getRegions(); } return Collections.emptySet(); } }
S3LocationFeature implements Location { @Override public Set<Name> getLocations() { if(StringUtils.isNotBlank(session.getHost().getRegion())) { return Collections.singleton(new S3Region(session.getHost().getRegion())); } if(S3Session.isAwsHostname(session.getHost().getHostname())) { return session.getHost().getProtocol().getRegions(); } return Collections.emptySet(); } S3LocationFeature(final S3Session session);  S3LocationFeature(final S3Session session, final RegionEndpointCache cache); }
S3LocationFeature implements Location { @Override public Set<Name> getLocations() { if(StringUtils.isNotBlank(session.getHost().getRegion())) { return Collections.singleton(new S3Region(session.getHost().getRegion())); } if(S3Session.isAwsHostname(session.getHost().getHostname())) { return session.getHost().getProtocol().getRegions(); } return Collections.emptySet(); } S3LocationFeature(final S3Session session);  S3LocationFeature(final S3Session session, final RegionEndpointCache cache); @Override Set<Name> getLocations(); @Override Name getLocation(final Path file); }
S3LocationFeature implements Location { @Override public Set<Name> getLocations() { if(StringUtils.isNotBlank(session.getHost().getRegion())) { return Collections.singleton(new S3Region(session.getHost().getRegion())); } if(S3Session.isAwsHostname(session.getHost().getHostname())) { return session.getHost().getProtocol().getRegions(); } return Collections.emptySet(); } S3LocationFeature(final S3Session session);  S3LocationFeature(final S3Session session, final RegionEndpointCache cache); @Override Set<Name> getLocations(); @Override Name getLocation(final Path file);  }