Специально:
[*] Приложение 1 должно быть видно только для получателя a. < /li>
Приложение 2 должно быть видно только для реципиента b. < /li >
< /ul>
Я исследовал участники. Ниже приведена упрощенная версия моей текущей реализации: < /p>
Код: Выделить всё
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);
< /code>
В этой реализации: < /p>
Я использую переходные документы для загрузки вложений и связывания их с получателями, использующими Участники Detinfo [*] Однако я не уверен, гарантирует ли этот метод, что только конкретные получатели смогут просматривать свои связанные вложения. На мой взгляд, все вложения могут быть видны всем получателям в одном соглашении. /> Есть ли способ ограничить видимость привязанности получателем в пределах одного соглашения, используя API Adobe Знак? Группа привязанности?
Подробнее здесь: https://stackoverflow.com/questions/793 ... -agreement
Мобильная версия