@Test void shareShouldFailWhenBlobDoesNotExist() { BlobId blobId = new HashBlobId.Factory().forPayload("not existing".getBytes(StandardCharsets.UTF_8)); assertThatThrownBy(() -> testee.blobId(blobId) .with(MailAddressFixture.RECIPIENT1) .explanation("The content of a deleted message vault had been shared with you.") .noFileCustomPrefix() .noFileExtension() .export()) .isInstanceOf(ObjectStoreException.class); }
@Override public ShareeStage blobId(BlobId blobId) { return mailAddress -> explanation -> fileCustomPrefix -> fileExtension -> () -> { String fileUrl = copyBlobToFile(blobId, fileCustomPrefix, fileExtension); sendMail(mailAddress, fileUrl, explanation); }; }
LocalFileBlobExportMechanism implements BlobExportMechanism { @Override public ShareeStage blobId(BlobId blobId) { return mailAddress -> explanation -> fileCustomPrefix -> fileExtension -> () -> { String fileUrl = copyBlobToFile(blobId, fileCustomPrefix, fileExtension); sendMail(mailAddress, fileUrl, explanation); }; } }
LocalFileBlobExportMechanism implements BlobExportMechanism { @Override public ShareeStage blobId(BlobId blobId) { return mailAddress -> explanation -> fileCustomPrefix -> fileExtension -> () -> { String fileUrl = copyBlobToFile(blobId, fileCustomPrefix, fileExtension); sendMail(mailAddress, fileUrl, explanation); }; } @VisibleForTesting @Inject  LocalFileBlobExportMechanism(MailetContext mailetContext, BlobStore blobStore, FileSystem fileSystem, DNSService dnsService, Configuration configuration); }
LocalFileBlobExportMechanism implements BlobExportMechanism { @Override public ShareeStage blobId(BlobId blobId) { return mailAddress -> explanation -> fileCustomPrefix -> fileExtension -> () -> { String fileUrl = copyBlobToFile(blobId, fileCustomPrefix, fileExtension); sendMail(mailAddress, fileUrl, explanation); }; } @VisibleForTesting @Inject  LocalFileBlobExportMechanism(MailetContext mailetContext, BlobStore blobStore, FileSystem fileSystem, DNSService dnsService, Configuration configuration); @Override ShareeStage blobId(BlobId blobId); }
LocalFileBlobExportMechanism implements BlobExportMechanism { @Override public ShareeStage blobId(BlobId blobId) { return mailAddress -> explanation -> fileCustomPrefix -> fileExtension -> () -> { String fileUrl = copyBlobToFile(blobId, fileCustomPrefix, fileExtension); sendMail(mailAddress, fileUrl, explanation); }; } @VisibleForTesting @Inject  LocalFileBlobExportMechanism(MailetContext mailetContext, BlobStore blobStore, FileSystem fileSystem, DNSService dnsService, Configuration configuration); @Override ShareeStage blobId(BlobId blobId);  }