public class EslClient extends Object
The EslClient class creates a E-SignLive client with the given api token and base url.
The base url can be the staging or production url.
For example: http://sandbox.e-signlive.com/api
Provides access to service classes such as PackageService to help create packages.
Constructor and Description |
---|
EslClient(String apiKey,
String baseURL)
The constructor of the EslClient class
|
Modifier and Type | Method and Description |
---|---|
PackageId |
createAndSendPackage(DocumentPackage documentPackage)
Creates a new packages, and immediately sends it to be signed.
|
PackageId |
createPackage(DocumentPackage documentPackage)
Creates the package.
|
PackageId |
createPackageFromTemplate(DocumentPackage documentPackage,
PackageId packageId)
Creates a package based on an existent template
|
PackageId |
createPackageOneStep(DocumentPackage documentPackage)
Creates the package in one step
WARNING: DOES NOT WORK WHEN SENDER HAS A SIGNATURE
|
SessionToken |
createSenderSessionToken()
Deprecated.
Use the
AuthenticationTokensService.createSenderAuthenticationToken(java.lang.String)
or AuthenticationTokensService.createUserAuthenticationToken() depending if you want to
create a token to authenticate as the package sender or the api key user. |
SessionToken |
createSessionToken(PackageId packageId,
String signerId)
|
SessionToken |
createSignerSessionToken(PackageId packageId,
String signerId)
|
byte[] |
downloadDocument(PackageId packageId,
String documentId)
Downloads a document that belongs to a package
|
byte[] |
downloadEvidenceSummary(PackageId packageId)
Downloads the evidence summary for a package
|
byte[] |
downloadOriginalDocument(PackageId packageId,
String documentId)
Downloads an original document that belongs to a package.
|
byte[] |
downloadZippedDocuments(PackageId packageId)
Downloads the zipped documents of a package
|
AccountService |
getAccountService() |
ApprovalService |
getApprovalService() |
AttachmentRequirementService |
getAttachmentRequirementService() |
AuditService |
getAuditService() |
AuthenticationTokensService |
getAuthenticationTokensService()
Facilitates access to the service that creates authentication tokens
|
CustomFieldService |
getCustomFieldService()
Facilitates access to the service that could be used to add custom field
|
EventNotificationService |
getEventNotificationService()
Facilitates access to the service that could be used to register for event notifications
|
FieldSummaryService |
getFieldSummaryService()
Facilitates access to the service that provides a summary of all the document fields and their values
|
List<FieldSummary> |
getFieldValues(PackageId packageId)
Retrieves a summary for all the document fields of the package identified by its packageId
|
GroupService |
getGroupService() |
LayoutService |
getLayoutService() |
DocumentPackage |
getPackage(PackageId packageId) |
PackageService |
getPackageService()
Gets the package service
|
QRCodeService |
getQrCodeService() |
ReminderService |
getReminderService() |
SessionService |
getSessionService() |
SigningStatus |
getSigningStatus(PackageId packageId,
SignerId signerId,
DocumentId documentId) |
TemplateService |
getTemplateService() |
void |
sendPackage(PackageId id)
It does the followings for the package ID specified as argument:
|
void |
uploadDocument(Document document,
DocumentPackage documentPackage) |
void |
uploadDocument(String fileName,
byte[] fileContent,
Document document,
DocumentPackage documentPackage) |
public PackageService getPackageService()
public SessionService getSessionService()
public FieldSummaryService getFieldSummaryService()
public AuditService getAuditService()
public EventNotificationService getEventNotificationService()
public AuthenticationTokensService getAuthenticationTokensService()
public CustomFieldService getCustomFieldService()
public PackageId createPackage(DocumentPackage documentPackage)
Creates the package.
This basically does the followings:
- converts the document package to JSON format
- makes an eSL REST call to actually create the package. Is is using as payload the above generated JSON content.
documentPackage
- the document packagepublic PackageId createPackageOneStep(DocumentPackage documentPackage)
documentPackage
- the document packagepublic PackageId createAndSendPackage(DocumentPackage documentPackage)
Creates a new packages, and immediately sends it to be signed.
documentPackage
- the document package to be created and signedpublic PackageId createPackageFromTemplate(DocumentPackage documentPackage, PackageId packageId)
documentPackage
- the document packagepackageId
- the package ID used as template for the new packagepublic void sendPackage(PackageId id)
It does the followings for the package ID specified as argument:
- activates the package
- send emails to signers and the package owner
- sends notifications (if any)
id
- the package IDpublic List<FieldSummary> getFieldValues(PackageId packageId)
packageId
- the package ID@Deprecated public SessionToken createSenderSessionToken()
AuthenticationTokensService.createSenderAuthenticationToken(java.lang.String)
or AuthenticationTokensService.createUserAuthenticationToken()
depending if you want to
create a token to authenticate as the package sender or the api key user.@Deprecated public SessionToken createSignerSessionToken(PackageId packageId, String signerId) throws EslException
AuthenticationTokensService.createSignerAuthenticationToken(java.lang.String, java.lang.String)
.EslException
@Deprecated public SessionToken createSessionToken(PackageId packageId, String signerId) throws EslException
AuthenticationTokensService.createSignerAuthenticationToken(java.lang.String, java.lang.String)
.Creates a session token for the package and user provided as parameters.
The content of SessionToken that is returned by this method is needed to access
the signing ceremony on behalf of the signer for whom the session was generated
packageId
- the package IDsignerId
- the signer IDEslException
public DocumentPackage getPackage(PackageId packageId)
packageId
- The document package identifierpublic byte[] downloadDocument(PackageId packageId, String documentId)
packageId
- the package IDdocumentId
- the document IDpublic byte[] downloadOriginalDocument(PackageId packageId, String documentId)
packageId
- the package IDdocumentId
- the document IDpublic byte[] downloadEvidenceSummary(PackageId packageId)
packageId
- the package IDpublic byte[] downloadZippedDocuments(PackageId packageId)
packageId
- the package IDpublic SigningStatus getSigningStatus(PackageId packageId, SignerId signerId, DocumentId documentId)
public void uploadDocument(String fileName, byte[] fileContent, Document document, DocumentPackage documentPackage)
public void uploadDocument(Document document, DocumentPackage documentPackage)
public GroupService getGroupService()
public AccountService getAccountService()
public ApprovalService getApprovalService()
public ReminderService getReminderService()
public TemplateService getTemplateService()
public AttachmentRequirementService getAttachmentRequirementService()
public LayoutService getLayoutService()
public QRCodeService getQrCodeService()
Copyright 2014, Silanis Technology, Inc. All rights reserved.