- привязанность 1 должно быть видно только для получателя .
- привязанность 2 должно быть видно только для получателя b .
Код: Выделить всё
AgreementInfo agreementInfo = new AgreementInfo();
// Attachments are retrieved as a list
List attachments = getAttachments();
// For each attachment, a corresponding recipient set is defined
Map attachmentRecipientMap = mapAttachmentsToRecipients(attachments, signatories);
// Create and upload each attachment as a transient document
for (Map.Entry entry : attachmentRecipientMap.entrySet()) {
AttachmentTypeIntf attachment = entry.getKey();
List recipients = entry.getValue();
// Create a temporary file to store the attachment
File tempFile = createTempFile(attachment);
// Upload the file as a transient document
TransientDocumentsApi transientDocumentsApi = new TransientDocumentsApi(apiClient);
TransientDocumentResponse response = transientDocumentsApi.createTransientDocument(
authorization, tempFile, "XAPI_USER", null, attachment.getFileName(), MIMEConstants.APPLICATION_PDF
);
String transientDocumentId = response.getTransientDocumentId();
// Add this file to the agreement
FileInfo fileInfo = new FileInfo();
fileInfo.setTransientDocumentId(transientDocumentId);
agreementInfo.addFileInfosItem(fileInfo);
// Assign the recipient set
for (ESignRecipientInfo recipient : recipients) {
ParticipantSetInfo participantSetInfo = new ParticipantSetInfo();
participantSetInfo.setName(recipient.getName());
participantSetInfo.setOrder(recipient.getDestinationIndex());
participantSetInfo.addMemberInfosItem(new ParticipantSetMemberInfo(recipient.getRecipient()));
agreementInfo.addParticipantSetsInfoItem(participantSetInfo);
}
}
// Set up the agreement
agreementInfo.setName("Agreement with Specific Attachments");
agreementInfo.setSignatureType(AgreementInfo.SignatureTypeEnum.ESIGN);
// Create the agreement
AgreementApi agreementApi = new AgreementApi(apiClient);
AgreementCreationResponse creationResponse = agreementApi.createAgreement(authorization, agreementInfo);
- Я использую временные документы для загрузки вложений. и связывание их с получателями с помощью ParticipantSetInfo.
- Однако я не уверен, гарантирует ли этот метод, что только определенные получатели смогут просматривать связанные с ними вложения. Насколько я понимаю, все вложения могут быть видны всем получателям в одном документе.
- Есть ли способ ограничить видимость вложений получателем в рамках одного соглашения с помощью API Adobe Sign?
- Если нет, то рекомендуемым решением будет создание отдельных соглашений для каждого получателя вложений. группа?
Спасибо за помощь!
Подробнее здесь: https://stackoverflow.com/questions/793 ... in-a-singl
Мобильная версия