@Test public void testSimpleConstruction() throws Exception { String bucketName = "bucket"; String key = "path/to/foobar"; sut = new S3ObjectResource(amazonS3, bucketName, key); assertThat(sut.getDescription(), is("Amazon s3 resource [bucket='bucket', key='path/to/foobar']")); }
@Override public String getDescription() { StringBuilder builder = new StringBuilder().append("Amazon s3 resource [") .append("bucket='").append(bucketName).append("'") .append(", key='").append(key).append("'"); versionId.ifPresent(vid -> { builder.append(", versionId='").append(vid).append('\''); }); builder.append(']'); return builder.toString(); }
S3ObjectResource extends AbstractResource implements WritableResource { @Override public String getDescription() { StringBuilder builder = new StringBuilder().append("Amazon s3 resource [") .append("bucket='").append(bucketName).append("'") .append(", key='").append(key).append("'"); versionId.ifPresent(vid -> { builder.append(", versionId='").append(vid).append('\''); }); builder.append(']'); return builder.toString(); } }
S3ObjectResource extends AbstractResource implements WritableResource { @Override public String getDescription() { StringBuilder builder = new StringBuilder().append("Amazon s3 resource [") .append("bucket='").append(bucketName).append("'") .append(", key='").append(key).append("'"); versionId.ifPresent(vid -> { builder.append(", versionId='").append(vid).append('\''); }); builder.append(']'); return builder.toString(); } S3ObjectResource(AmazonS3 amazonS3, String bucketName, String key, TaskExecutor taskExecutor);  S3ObjectResource(AmazonS3 amazonS3, String bucketName, String key, String versionId,
			TaskExecutor taskExecutor);  S3ObjectResource(AmazonS3 amazonS3, String bucketName, String key, Optional<String> versionId);  S3ObjectResource(AmazonS3 amazonS3, String bucketName, String key, String versionId);  S3ObjectResource(AmazonS3 amazonS3, String bucketName, String key); }
S3ObjectResource extends AbstractResource implements WritableResource { @Override public String getDescription() { StringBuilder builder = new StringBuilder().append("Amazon s3 resource [") .append("bucket='").append(bucketName).append("'") .append(", key='").append(key).append("'"); versionId.ifPresent(vid -> { builder.append(", versionId='").append(vid).append('\''); }); builder.append(']'); return builder.toString(); } S3ObjectResource(AmazonS3 amazonS3, String bucketName, String key, TaskExecutor taskExecutor);  S3ObjectResource(AmazonS3 amazonS3, String bucketName, String key, String versionId,
			TaskExecutor taskExecutor);  S3ObjectResource(AmazonS3 amazonS3, String bucketName, String key, Optional<String> versionId);  S3ObjectResource(AmazonS3 amazonS3, String bucketName, String key, String versionId);  S3ObjectResource(AmazonS3 amazonS3, String bucketName, String key); @Override boolean exists(); @Override URL getURL(); @Override File getFile(); @Override long contentLength(); @Override long lastModified(); @Override S3ObjectResource createRelative(String relativePath); @Override String getFilename(); @Override String getDescription(); @Override InputStream getInputStream(); @Override boolean isWritable(); @Override OutputStream getOutputStream(); }
S3ObjectResource extends AbstractResource implements WritableResource { @Override public String getDescription() { StringBuilder builder = new StringBuilder().append("Amazon s3 resource [") .append("bucket='").append(bucketName).append("'") .append(", key='").append(key).append("'"); versionId.ifPresent(vid -> { builder.append(", versionId='").append(vid).append('\''); }); builder.append(']'); return builder.toString(); } S3ObjectResource(AmazonS3 amazonS3, String bucketName, String key, TaskExecutor taskExecutor);  S3ObjectResource(AmazonS3 amazonS3, String bucketName, String key, String versionId,
			TaskExecutor taskExecutor);  S3ObjectResource(AmazonS3 amazonS3, String bucketName, String key, Optional<String> versionId);  S3ObjectResource(AmazonS3 amazonS3, String bucketName, String key, String versionId);  S3ObjectResource(AmazonS3 amazonS3, String bucketName, String key); @Override boolean exists(); @Override URL getURL(); @Override File getFile(); @Override long contentLength(); @Override long lastModified(); @Override S3ObjectResource createRelative(String relativePath); @Override String getFilename(); @Override String getDescription(); @Override InputStream getInputStream(); @Override boolean isWritable(); @Override OutputStream getOutputStream();  }