@Test public void testGetName() { final S3Session session = new S3Session(new Host(new S3Protocol(), new S3Protocol().getDefaultHostname())); final CloudFrontDistributionConfiguration configuration = new WebsiteCloudFrontDistributionConfiguration( session, new DisabledX509TrustManager(), new DefaultX509KeyManager(), Collections.emptyMap() ); assertEquals("Amazon CloudFront", configuration.getName()); assertEquals("Amazon CloudFront", configuration.getName(Distribution.DOWNLOAD)); assertEquals("Amazon CloudFront", configuration.getName(Distribution.STREAMING)); assertEquals("Amazon CloudFront", configuration.getName(Distribution.WEBSITE_CDN)); assertEquals("Website Configuration (HTTP)", configuration.getName(Distribution.WEBSITE)); }
@Override public String getName(final Distribution.Method method) { if(method.equals(Distribution.WEBSITE)) { return method.toString(); } return super.getName(method); }
WebsiteCloudFrontDistributionConfiguration extends CloudFrontDistributionConfiguration { @Override public String getName(final Distribution.Method method) { if(method.equals(Distribution.WEBSITE)) { return method.toString(); } return super.getName(method); } }
WebsiteCloudFrontDistributionConfiguration extends CloudFrontDistributionConfiguration { @Override public String getName(final Distribution.Method method) { if(method.equals(Distribution.WEBSITE)) { return method.toString(); } return super.getName(method); } WebsiteCloudFrontDistributionConfiguration(final S3Session session, final X509TrustManager trust, final X509KeyManager key,
                                                      final Map<Path, Distribution> distributions); }
WebsiteCloudFrontDistributionConfiguration extends CloudFrontDistributionConfiguration { @Override public String getName(final Distribution.Method method) { if(method.equals(Distribution.WEBSITE)) { return method.toString(); } return super.getName(method); } WebsiteCloudFrontDistributionConfiguration(final S3Session session, final X509TrustManager trust, final X509KeyManager key,
                                                      final Map<Path, Distribution> distributions); @Override List<Distribution.Method> getMethods(final Path container); @Override String getName(final Distribution.Method method); @Override Distribution read(final Path container, final Distribution.Method method, final LoginCallback prompt); @Override void write(final Path container, final Distribution distribution, final LoginCallback prompt); @Override @SuppressWarnings("unchecked") T getFeature(final Class<T> type, final Distribution.Method method); }
WebsiteCloudFrontDistributionConfiguration extends CloudFrontDistributionConfiguration { @Override public String getName(final Distribution.Method method) { if(method.equals(Distribution.WEBSITE)) { return method.toString(); } return super.getName(method); } WebsiteCloudFrontDistributionConfiguration(final S3Session session, final X509TrustManager trust, final X509KeyManager key,
                                                      final Map<Path, Distribution> distributions); @Override List<Distribution.Method> getMethods(final Path container); @Override String getName(final Distribution.Method method); @Override Distribution read(final Path container, final Distribution.Method method, final LoginCallback prompt); @Override void write(final Path container, final Distribution distribution, final LoginCallback prompt); @Override @SuppressWarnings("unchecked") T getFeature(final Class<T> type, final Distribution.Method method);  }