@Test(expected = StorageCommunicationException.class) public void testListBucketsCauseS3CommunicationException() throws S3ServiceException { doThrow(new S3ServiceException()).when(s3Service).listAllBuckets(); template.listContainerNames(); }
public List<String> listContainerNames() { LOG.debug("List buckets"); try { S3Bucket[] s3buckets = s3Service.listAllBuckets(); List<String> bucketNames = new ArrayList<String>(s3buckets.length); for (int i = 0; i < s3buckets.length; i++) { bucketNames.add(s3buckets[i].getName()); } return bucketNames; } catch (S3ServiceException e) { throw new StorageCommunicationException("Bucket list problem", e); } }
JetS3Template extends S3Template { public List<String> listContainerNames() { LOG.debug("List buckets"); try { S3Bucket[] s3buckets = s3Service.listAllBuckets(); List<String> bucketNames = new ArrayList<String>(s3buckets.length); for (int i = 0; i < s3buckets.length; i++) { bucketNames.add(s3buckets[i].getName()); } return bucketNames; } catch (S3ServiceException e) { throw new StorageCommunicationException("Bucket list problem", e); } } }
JetS3Template extends S3Template { public List<String> listContainerNames() { LOG.debug("List buckets"); try { S3Bucket[] s3buckets = s3Service.listAllBuckets(); List<String> bucketNames = new ArrayList<String>(s3buckets.length); for (int i = 0; i < s3buckets.length; i++) { bucketNames.add(s3buckets[i].getName()); } return bucketNames; } catch (S3ServiceException e) { throw new StorageCommunicationException("Bucket list problem", e); } } JetS3Template(final AwsCredentials awsCredentials);  JetS3Template(final AwsCredentials awsCredentials, final String defaultContainerName); }
JetS3Template extends S3Template { public List<String> listContainerNames() { LOG.debug("List buckets"); try { S3Bucket[] s3buckets = s3Service.listAllBuckets(); List<String> bucketNames = new ArrayList<String>(s3buckets.length); for (int i = 0; i < s3buckets.length; i++) { bucketNames.add(s3buckets[i].getName()); } return bucketNames; } catch (S3ServiceException e) { throw new StorageCommunicationException("Bucket list problem", e); } } JetS3Template(final AwsCredentials awsCredentials);  JetS3Template(final AwsCredentials awsCredentials, final String defaultContainerName); boolean createContainer(String containerName); void createPublicContainer(String containerName); void deleteContainer(String containerName); void deleteObject(String objectName); void deleteObject(String containerName, String objectName); List<String> listContainerNames(); List<BlobDetails> listContainerObjectDetails(); ContainerStatus checkContainerStatus(String containerName); List<BlobDetails> listContainerObjectDetails(String containerName); String send(String objectName, String stringToSend); String send(String containerName, String objectName, String stringToSend); String send(File fileToSend); String send(String containerName, File fileToSend); String send(String containerName, String objectName, File fileToSend); String send(String objectName, InputStream is); String send(String containerName, String objectName, InputStream is); String sendAndReceiveUrl(String objectName, String stringToSend); String sendAndReceiveUrl(String containerName, String objectName, String stringToSend); String sendAndReceiveUrl(String containerName, String objectName, File fileToSend); String sendAndReceiveUrl(File fileToSend); String sendAndReceiveUrl(String objectName, InputStream is); String sendAndReceiveUrl(String containerName, File fileToSend); String sendAndReceiveUrl(String containerName, String objectName, InputStream is); String receiveAsString(String keyName); String receiveAsString(String containerName, String objectName); String receiveAndSaveToFile(String objectName, File toFile); String receiveAndSaveToFile(String containerName, String objectName, File toFile); InputStream receiveAsInputStream(String objectName); InputStream receiveAsInputStream(String containerName, String objectName); String createdSignedUrl(String containerName, String objectName, Date expiryDate); }
JetS3Template extends S3Template { public List<String> listContainerNames() { LOG.debug("List buckets"); try { S3Bucket[] s3buckets = s3Service.listAllBuckets(); List<String> bucketNames = new ArrayList<String>(s3buckets.length); for (int i = 0; i < s3buckets.length; i++) { bucketNames.add(s3buckets[i].getName()); } return bucketNames; } catch (S3ServiceException e) { throw new StorageCommunicationException("Bucket list problem", e); } } JetS3Template(final AwsCredentials awsCredentials);  JetS3Template(final AwsCredentials awsCredentials, final String defaultContainerName); boolean createContainer(String containerName); void createPublicContainer(String containerName); void deleteContainer(String containerName); void deleteObject(String objectName); void deleteObject(String containerName, String objectName); List<String> listContainerNames(); List<BlobDetails> listContainerObjectDetails(); ContainerStatus checkContainerStatus(String containerName); List<BlobDetails> listContainerObjectDetails(String containerName); String send(String objectName, String stringToSend); String send(String containerName, String objectName, String stringToSend); String send(File fileToSend); String send(String containerName, File fileToSend); String send(String containerName, String objectName, File fileToSend); String send(String objectName, InputStream is); String send(String containerName, String objectName, InputStream is); String sendAndReceiveUrl(String objectName, String stringToSend); String sendAndReceiveUrl(String containerName, String objectName, String stringToSend); String sendAndReceiveUrl(String containerName, String objectName, File fileToSend); String sendAndReceiveUrl(File fileToSend); String sendAndReceiveUrl(String objectName, InputStream is); String sendAndReceiveUrl(String containerName, File fileToSend); String sendAndReceiveUrl(String containerName, String objectName, InputStream is); String receiveAsString(String keyName); String receiveAsString(String containerName, String objectName); String receiveAndSaveToFile(String objectName, File toFile); String receiveAndSaveToFile(String containerName, String objectName, File toFile); InputStream receiveAsInputStream(String objectName); InputStream receiveAsInputStream(String containerName, String objectName); String createdSignedUrl(String containerName, String objectName, Date expiryDate);  }