public class PackageService extends Object
| Constructor and Description |
|---|
PackageService(RestClient client,
String baseUrl) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDocumentWithExternalContent(String packageId,
List<Document> providerDocuments)
Upload documents with external content to the package.
|
Role |
addRole(PackageId packageId,
Role role)
Adds a role to the package.
|
String |
addSigner(PackageId packageId,
Signer signer)
Adds a signer to the specified package
|
void |
archive(PackageId packageId)
Archive the specified package.
|
void |
changePackageStatusToDraft(PackageId packageId)
Change the package's status to DRAFT.
|
void |
configureDocumentVisibility(PackageId packageId,
DocumentVisibility visibility)
Configure a document visibility.
|
PackageId |
createPackage(Package aPackage)
Creates a package with roles.
|
PackageId |
createPackageFromTemplate(PackageId packageId,
Package aPackage)
Create a new package based on an existing template.
|
PackageId |
createPackageOneStep(Package aPackage,
Collection<Document> documents)
Creates a package and uploads the documents in one step
|
void |
deleteDocument(PackageId packageId,
String documentId)
Deletes the document from the package.
|
void |
deleteDocuments(PackageId packageId,
DocumentId... documentIds)
Deletes the documents from the package.
|
void |
deletePackage(PackageId packageId)
Deletes the specified package.
|
void |
deleteRole(PackageId packageId,
Role role)
Deletes a role from the package.
|
CompletionReport |
downloadCompletionReport(PackageStatus packageStatus,
Date from,
Date to)
|
CompletionReport |
downloadCompletionReport(PackageStatus packageStatus,
String senderId,
Date from,
Date to)
|
String |
downloadCompletionReportAsCSV(PackageStatus packageStatus,
Date from,
Date to)
|
String |
downloadCompletionReportAsCSV(PackageStatus packageStatus,
String senderId,
Date from,
Date to)
|
byte[] |
downloadDocument(PackageId packageId,
Document document)
Downloads a document from the package and returns a byte[].
|
byte[] |
downloadDocument(PackageId packageId,
String documentId) |
byte[] |
downloadEvidenceSummary(PackageId packageId)
Downloads the evidence summary (in PDF) from the package and returns a byte[].
|
byte[] |
downloadOriginalDocument(PackageId packageId,
String documentId)
Downloads the original document (without fields) from the package and returns a byte[].
|
UsageReport |
downloadUsageReport(Date from,
Date to)
Deprecated.
|
String |
downloadUsageReportAsCSV(Date from,
Date to)
Deprecated.
|
byte[] |
downloadZippedDocuments(PackageId packageId)
Downloads the documents (in a zip archive) from the package and returns a byte[].
|
Package |
getApiPackage(String packageId)
Gets the package.
|
SupportConfiguration |
getConfig(PackageId packageId)
Get package support configuration.
|
Document |
getDocumentMetadata(DocumentPackage documentPackage,
String documentId)
Get the document's metadata from the package.
|
List<Document> |
getDocuments()
Gets the documents from the history list
|
List<Document> |
getDocuments(PackageId packageId,
String signerId) |
DocumentVisibility |
getDocumentVisibility(PackageId packageId)
Get a document visibility.
|
List<NotaryJournalEntry> |
getJournalEntries(String userId)
Get Journal Entries.
|
DownloadedFile |
getJournalEntriesAsCSV(String userId)
Get Journal Entries in csv format.
|
DocumentPackage |
getPackage(PackageId packageId) |
Page<DocumentPackage> |
getPackages(String status,
PageRequest request)
Returns a Page of DocumentPackages, which represents a paginated query response.
|
Page<Map<String,String>> |
getPackagesFields(PackageStatus status,
PageRequest request,
Set<String> fields)
Returns a Page of Map, which represents a paginated query response which contains package fields and their values.
|
ReferencedConditions |
getReferencedConditions(String packageId) |
ReferencedConditions |
getReferencedConditions(String packageId,
String documentId) |
ReferencedConditions |
getReferencedConditions(String packageId,
String documentId,
String fieldId) |
List<Role> |
getRoles(PackageId packageId)
Gets the roles for a package.
|
Signer |
getSigner(PackageId packageId,
String signerId)
Get a signer from the specified package
|
List<Signer> |
getSigners(PackageId packageId,
String documentId) |
SigningStatus |
getSigningStatus(PackageId packageId,
SignerId signerId,
DocumentId documentId)
Retrieves the current signing status of the DocumentPackage, Document or Signer specified.
|
String |
getSigningUrl(PackageId packageId,
String signerId)
Get a signing url
|
Page<DocumentPackage> |
getTemplates(PageRequest request) |
Page<DocumentPackage> |
getTemplates(PageRequest request,
Visibility visibility) |
String |
getThankYouDialogContent(PackageId packageId)
Get thank you dialog content.
|
Page<DocumentPackage> |
getUpdatedPackagesWithinDateRange(PackageStatus status,
PageRequest request,
Date from,
Date to)
Returns a Page of DocumentPackages, that last updated in time range, which represents a paginated query response.
|
void |
markComplete(PackageId packageId)
Mark complete on the specified package.
|
void |
notifySigner(PackageId packageId,
GroupId groupId) |
void |
notifySigner(PackageId packageId,
String signerEmail,
String message)
Notifies the specified signer by email, including a custom message.
|
void |
orderDocuments(DocumentPackage documentPackage)
Updates the documents signing order
|
void |
orderSigners(DocumentPackage documentPackage)
Updates the signer order in a package.
|
void |
removeSigner(PackageId packageId,
String signerId)
Removes a signer from a package
|
void |
restore(PackageId packageId)
Restores the specified package.
|
void |
sendPackage(PackageId packageId)
Sends the package.
|
void |
sendSmsToSigner(PackageId packageId,
Signer signer)
Send SMS to the signer.
|
String |
startFastTrack(PackageId packageId,
List<FastTrackSigner> signers)
Create Fast Track Package.
|
void |
trash(PackageId packageId)
Trash the specified package.
|
void |
unlockSigner(PackageId packageId,
String signerId)
Unlock a signer which has been locked out due to too many failed authentication attempts.
|
void |
updateDocumentMetadata(DocumentPackage documentPackage,
Document document)
Updates the document's metadata from the package.
|
void |
updatePackage(PackageId packageId,
DocumentPackage sdkPackage)
Updates the package's fields and roles.
|
Role |
updateRole(PackageId packageId,
Role role)
Updates a role from the package.
|
void |
updateSigner(PackageId packageId,
Signer signer)
Updates a signer's information from a package
|
Document |
uploadApiDocument(String packageId,
String fileName,
byte[] fileBytes,
Document document) |
Document |
uploadDocument(PackageId packageId,
String fileName,
byte[] fileBytes,
Document document)
Uploads the Document and file in byte[] to the package.
|
Document |
uploadDocument(PackageId packageId,
String fileName,
byte[] fileBytes,
Document document,
DocumentPackage documentPackage)
Deprecated.
Please use uploadDocument(PackageId packageId, String fileName, byte[] fileBytes, com.silanis.esl.sdk.Document document) instead of this method.
|
List<Document> |
uploadDocuments(String packageId,
List<Document> documents) |
public PackageService(RestClient client, String baseUrl)
public PackageId createPackage(Package aPackage) throws EslException
aPackage - EslExceptionpublic PackageId createPackageOneStep(Package aPackage, Collection<Document> documents) throws EslException
aPackage - documents - EslExceptionpublic PackageId createPackageFromTemplate(PackageId packageId, Package aPackage)
packageId - aPackage - public void updatePackage(PackageId packageId, DocumentPackage sdkPackage) throws EslException
packageId - sdkPackage - EslExceptionpublic void changePackageStatusToDraft(PackageId packageId) throws EslException
packageId - EslExceptionpublic void configureDocumentVisibility(PackageId packageId, DocumentVisibility visibility) throws EslException
packageId - visibility - the document visibilityEslExceptionpublic DocumentVisibility getDocumentVisibility(PackageId packageId) throws EslException
packageId - EslExceptionpublic DocumentPackage getPackage(PackageId packageId)
public Package getApiPackage(String packageId) throws EslException
packageId - EslException@Deprecated public Document uploadDocument(PackageId packageId, String fileName, byte[] fileBytes, Document document, DocumentPackage documentPackage) throws EslException
EslExceptionpublic Document uploadDocument(PackageId packageId, String fileName, byte[] fileBytes, Document document) throws EslException
packageId - fileName - Name of the filefileBytes - The file to upload in bytesdocument - The document with approvals and fieldsEslExceptionpublic Document uploadApiDocument(String packageId, String fileName, byte[] fileBytes, Document document)
public void deleteDocument(PackageId packageId, String documentId) throws EslException
packageId - documentId - EslExceptionpublic void deleteDocuments(PackageId packageId, DocumentId... documentIds) throws EslException
packageId - documentIds - EslExceptionpublic Document getDocumentMetadata(DocumentPackage documentPackage, String documentId)
documentPackage - The DocumentPackage we want to get document from.documentId - Id of document to get.public void updateDocumentMetadata(DocumentPackage documentPackage, Document document)
documentPackage - document - public void orderDocuments(DocumentPackage documentPackage)
documentPackage - public void addDocumentWithExternalContent(String packageId, List<Document> providerDocuments)
packageId - public void sendPackage(PackageId packageId) throws EslException
packageId - EslExceptionpublic List<Role> getRoles(PackageId packageId) throws EslException
packageId - EslExceptionpublic Role addRole(PackageId packageId, Role role) throws EslException
packageId - role - EslExceptionpublic Role updateRole(PackageId packageId, Role role) throws EslException
packageId - role - EslExceptionpublic void deleteRole(PackageId packageId, Role role) throws EslException
packageId - role - EslExceptionpublic byte[] downloadDocument(PackageId packageId, Document document) throws EslException
packageId - Id of the DocumentPackage we want to downloaddocument - Id of the Document we want to downloadEslExceptionpublic byte[] downloadDocument(PackageId packageId, String documentId) throws EslException
EslExceptionpublic byte[] downloadOriginalDocument(PackageId packageId, String documentId) throws EslException
packageId - Id of the DocumentPackage we want to downloaddocumentId - Id of the Document we want to downloadEslExceptionpublic byte[] downloadZippedDocuments(PackageId packageId) throws EslException
packageId - Id of the DocumentPackage we want to downloadEslExceptionpublic byte[] downloadEvidenceSummary(PackageId packageId) throws EslException
packageId - EslExceptionpublic SigningStatus getSigningStatus(PackageId packageId, SignerId signerId, DocumentId documentId)
packageId - Id of the DocumentPackage who's status we are to retrievesignerId - If not null, the id of the signer who's status we are to retrievedocumentId - If not null, the id of the document who's status we are to retrievepublic Page<DocumentPackage> getPackages(String status, PageRequest request)
status - Returned DocumentPackages must have their status set to this value to be included in the result setownerUserId - ownerEmail - request - Identifying which page of results to returnpublic Page<Map<String,String>> getPackagesFields(PackageStatus status, PageRequest request, Set<String> fields)
status - Packages must have their status set to this value to be included in the result setrequest - Identifying which page of results to returnfields - Identifying which package fields to returnpublic Page<DocumentPackage> getUpdatedPackagesWithinDateRange(PackageStatus status, PageRequest request, Date from, Date to)
status - Returned DocumentPackages must have their status set to this value to be included in the result setrequest - Identifying which page of results to returnfrom - Date range starting from this date includedto - Date range ending of this date includedpublic void deletePackage(PackageId packageId)
packageId - The id of the package to be deletedpublic void restore(PackageId packageId)
packageId - The id of the package to be restoredpublic void trash(PackageId packageId)
packageId - The id of the package to be trashedpublic void archive(PackageId packageId)
packageId - The id of the package to be archivedpublic void markComplete(PackageId packageId)
packageId - The id of the package to be marked complete onpublic void notifySigner(PackageId packageId, String signerEmail, String message)
packageId - The id of the package containing the signer to be notifiedsignerEmail - The email of the signer to be notifiedmessage - The custom message to be included in the email sent as notification to the signerpublic Page<DocumentPackage> getTemplates(PageRequest request)
public Page<DocumentPackage> getTemplates(PageRequest request, Visibility visibility)
public String addSigner(PackageId packageId, Signer signer)
packageId - The id of the package in which the signer will be addedsigner - The signer to be addedpublic Signer getSigner(PackageId packageId, String signerId)
packageId - The id of the package in which to get the signersignerId - The id of signer to getpublic void removeSigner(PackageId packageId, String signerId)
packageId - The id of the package containing the signer to be deletedsignerId - The role id of the signer to be deletedpublic void orderSigners(DocumentPackage documentPackage)
documentPackage - The id of the package to update signer orderpublic void updateSigner(PackageId packageId, Signer signer)
packageId - The id of the package containing the signer to be updatedsigner - The signer with the updated informationpublic void unlockSigner(PackageId packageId, String signerId)
signerId - If not null, the id of the signer who's status we are to retrieve@Deprecated public CompletionReport downloadCompletionReport(PackageStatus packageStatus, String senderId, Date from, Date to)
@Deprecated public String downloadCompletionReportAsCSV(PackageStatus packageStatus, String senderId, Date from, Date to)
@Deprecated public CompletionReport downloadCompletionReport(PackageStatus packageStatus, Date from, Date to)
@Deprecated public String downloadCompletionReportAsCSV(PackageStatus packageStatus, Date from, Date to)
@Deprecated public UsageReport downloadUsageReport(Date from, Date to)
ReportService.downloadUsageReport(java.util.Date, java.util.Date).@Deprecated public String downloadUsageReportAsCSV(Date from, Date to)
ReportService.downloadUsageReportAsCSV(java.util.Date, java.util.Date).public String getSigningUrl(PackageId packageId, String signerId)
packageId - The id of the package in which to get the signing urlsignerId - The id of signer to get the signing urlpublic String startFastTrack(PackageId packageId, List<FastTrackSigner> signers)
packageId - The id of the package to start FastTracksigners - The signers to get the signing urlpublic void sendSmsToSigner(PackageId packageId, Signer signer)
packageId - The id of the package to start FastTracksigner - The signers to get the signing urlpublic List<NotaryJournalEntry> getJournalEntries(String userId)
userId - The ID of the user whose e-journal entries are being retrieved.public DownloadedFile getJournalEntriesAsCSV(String userId)
userId - The ID of the user whose e-journal entries are being retrieved.public String getThankYouDialogContent(PackageId packageId)
packageId - The id of the package to get thank you dialog content.public SupportConfiguration getConfig(PackageId packageId)
packageId - The id of the package to get package support configuration.public ReferencedConditions getReferencedConditions(String packageId)
packageId - Package IDpublic ReferencedConditions getReferencedConditions(String packageId, String documentId)
packageId - Package IDdocumentId - document to be filtered bypublic ReferencedConditions getReferencedConditions(String packageId, String documentId, String fieldId)
packageId - Package IDdocumentId - document to be filtered byfieldId - field to be filtered byCopyright 2022 OneSpan All rights reserved.