@Test void testTruncatedListings() throws Exception { AmazonS3 amazonS3 = prepareMockForTestTruncatedListings(); ResourcePatternResolver resourceLoader = getResourceLoader(amazonS3); assertThat(resourceLoader.getResources("s3: "Test that all parts are returned when object summaries are truncated") .isEqualTo(5); assertThat(resourceLoader .getResources("s3: "Test that all parts are return when common prefixes are truncated") .isEqualTo(1); assertThat(resourceLoader.getResources("s3: .as("Test that all parts are returned when only bucket name is used") .isEqualTo(1); }
@Override public Resource[] getResources(String locationPattern) throws IOException { if (SimpleStorageNameUtils.isSimpleStorageResource(locationPattern)) { if (this.pathMatcher .isPattern(SimpleStorageNameUtils.stripProtocol(locationPattern))) { LOGGER.debug("Found wildcard pattern in location {}", locationPattern); return findPathMatchingResources(locationPattern); } else { return new Resource[] { this.resourcePatternResolverDelegate .getResource(locationPattern) }; } } else { return this.resourcePatternResolverDelegate.getResources(locationPattern); } }
PathMatchingSimpleStorageResourcePatternResolver implements ResourcePatternResolver { @Override public Resource[] getResources(String locationPattern) throws IOException { if (SimpleStorageNameUtils.isSimpleStorageResource(locationPattern)) { if (this.pathMatcher .isPattern(SimpleStorageNameUtils.stripProtocol(locationPattern))) { LOGGER.debug("Found wildcard pattern in location {}", locationPattern); return findPathMatchingResources(locationPattern); } else { return new Resource[] { this.resourcePatternResolverDelegate .getResource(locationPattern) }; } } else { return this.resourcePatternResolverDelegate.getResources(locationPattern); } } }
PathMatchingSimpleStorageResourcePatternResolver implements ResourcePatternResolver { @Override public Resource[] getResources(String locationPattern) throws IOException { if (SimpleStorageNameUtils.isSimpleStorageResource(locationPattern)) { if (this.pathMatcher .isPattern(SimpleStorageNameUtils.stripProtocol(locationPattern))) { LOGGER.debug("Found wildcard pattern in location {}", locationPattern); return findPathMatchingResources(locationPattern); } else { return new Resource[] { this.resourcePatternResolverDelegate .getResource(locationPattern) }; } } else { return this.resourcePatternResolverDelegate.getResources(locationPattern); } } PathMatchingSimpleStorageResourcePatternResolver(AmazonS3 amazonS3,
			ResourcePatternResolver resourcePatternResolverDelegate); }
PathMatchingSimpleStorageResourcePatternResolver implements ResourcePatternResolver { @Override public Resource[] getResources(String locationPattern) throws IOException { if (SimpleStorageNameUtils.isSimpleStorageResource(locationPattern)) { if (this.pathMatcher .isPattern(SimpleStorageNameUtils.stripProtocol(locationPattern))) { LOGGER.debug("Found wildcard pattern in location {}", locationPattern); return findPathMatchingResources(locationPattern); } else { return new Resource[] { this.resourcePatternResolverDelegate .getResource(locationPattern) }; } } else { return this.resourcePatternResolverDelegate.getResources(locationPattern); } } PathMatchingSimpleStorageResourcePatternResolver(AmazonS3 amazonS3,
			ResourcePatternResolver resourcePatternResolverDelegate); void setPathMatcher(PathMatcher pathMatcher); @Override Resource[] getResources(String locationPattern); @Override Resource getResource(String location); @Override ClassLoader getClassLoader(); }
PathMatchingSimpleStorageResourcePatternResolver implements ResourcePatternResolver { @Override public Resource[] getResources(String locationPattern) throws IOException { if (SimpleStorageNameUtils.isSimpleStorageResource(locationPattern)) { if (this.pathMatcher .isPattern(SimpleStorageNameUtils.stripProtocol(locationPattern))) { LOGGER.debug("Found wildcard pattern in location {}", locationPattern); return findPathMatchingResources(locationPattern); } else { return new Resource[] { this.resourcePatternResolverDelegate .getResource(locationPattern) }; } } else { return this.resourcePatternResolverDelegate.getResources(locationPattern); } } PathMatchingSimpleStorageResourcePatternResolver(AmazonS3 amazonS3,
			ResourcePatternResolver resourcePatternResolverDelegate); void setPathMatcher(PathMatcher pathMatcher); @Override Resource[] getResources(String locationPattern); @Override Resource getResource(String location); @Override ClassLoader getClassLoader();  }