Web API

Document

Other API in Package

User

Internal Tunnel

Internal Web

Tunnel

This class also used in (click to expand):
Method Summary
Attachment addAttachment(Attachment attachment, String targetId, String name, String description, boolean embed)

HTML documents only. See Packet.addAttachment(File...) and Packet.getAttachment. This method works only from an attachment obtained from the packet.

boolean addAudioSignature(String sigId, String role, String target, int limit)

Adds an audio signature to the document... (see addClickSignature). The audio recording will be limited to the number of minutes specified in limit.If this limit exceeds that allowed by the activation, the activation limit will be used.

boolean addChart(Chart chart)

Adds chart to document. Method supported only for html documents. For pdf method silently returns false. Only server charts supported (created using ChartTool) otherwise exception occurs

boolean addClickSignature(String sigId, String role, String target)

Adds a click signature to the document, identified by sigId, signable by role, referencing target. If the document is of type pdf, target can be null. If the document is html, the document must have a span or div tag with an id attribute matching the supplied sigId as well as a div tag with id matching target. If the document is HTML and you pass null for target, the cp-root div will be used as the target. The sigId must be unique (no two signatures in this document can have the same id). The sigId is the same id used to reference the signature that will be created. This method returns false if the signature cannot be added because the document content referenced by target has already been signed.

boolean addExclusiveInitial(String sigId, String ref, String role, String target, String group, boolean required)

Adds an exclusive initial signature to the document... (see addClickSignature). Note that initial signatures require the existance of a non initial signature (ref) in order to function correctly.

Attachment addFile(File file, String targetId, String name, String description, boolean embed)

HTML documents only. Adds the content of the given file to the document as a child of the element identified by targetId. If embed is true,it will attempt to embed the file-- meaning the contents of the file will be rendered by the browser as opposed to being presented as a download link. Future access to the attachment will be by unique name. Pass null for name to have a GUID automatically assigned. The description is what you should display to the user, it is the description of the attachment.

  addFilter(String field, String role)

Enables filtering on a field

int addFragment(String targetId, Fragment fragment, boolean append, boolean index)

Appends to or replaces the content in the element identified by targetId with the content in the fragment. If index is true, the fragment should have an id or name attribute on the root element. This element and any child elements with an id or name attribute are re-indexed and the index is returned. Support for HTML documents only.

boolean addImageSignature(String sigId, String role, String target)

Adds an image signature to the document... (see addClickSignature)

boolean addInitial(String sigId, String ref, String role, String target, boolean required)

Adds an initial signature to the document... (see addClickSignature). Note that initial signatures require the existance of a non initial signature (ref) in order to function correctly.

  addPdfPage(int destinationPage, PdfFile sourcePdf, int sourcePage)

Adds the page from the source PDF to this PDF at the specified location. Controlled by Max Max Doc Size of activation key. Exception if not a PDF document or doc is tamper sealed.

String addTarget(String id)

Creates a div element with the specified ID and appends it to the root document element. If id is null, a GUID is created and returned. This method is for HTML documents only.

  addWizard(String targetId, Wizard wizard, String dialogName)

Adds the content and data from the given wizard dialog to the document. Supported for HTML documents only.

  appendPdf(PdfFile sourcePdf)

Appends the source PDF to this PDF. Controlled by Max Document Size of activation key. Exception if not a PDF document or doc is tamper sealed.

boolean createCheckboxGroup(String[] fields)

Makes the specified fields behave like radio buttons in terms of browser behavior and validation. Returns false if the document has been signed, if the document is not compatible (PDF), or if any of the specified fields to not exist in the document.

boolean createPdfTamperSeal()

Creates a Digital Signature 'tamper seal' on this PDF document. This should be called only once, when all data and signatures have been applied. Returns false if this document is not a PDF or if this method has already been applied to the document.

boolean deleteAttachment(String name)

Deletes the attachment with the given name. Returns false if no attachment exists with the name. This method also returns false if the document has any signed signatures.

  deletePdfPage(int pageNumber)

Deletes the specified page. Throws exception if this is not a PDF document or it has been tamper sealed.

boolean deleteSignature(String sigId)

Deletes the signature identified by id. This method returns false if the signature has already been signed and therefore cannot be deleted.

  enableEditing()

Enables editing of data by the active user.

  enableEditing(String[] fieldNames)

Allows specified fields to be edited

boolean enableSignature(String sigId, String acceptAction, String rejectAction)

Enables signing of the specified signature by the active user. This willreturn acceptAction or rejectAction depending on the choice the user makes. Returns false if the active user does not have a role.

boolean enableSigning(String acceptAction, String rejectAction)

Enables signing of the next signature allowed for the active user based on the user's role(s). This willreturn acceptAction or rejectAction depending on the choice the user makes. Returns false if the active user does not have a role.

Data getAllData(String nullValue)

Returns (Read only) all the data elements contained in this document. If the value of the element is null, its value is set to nullValue in this Data object. Any pending updates (Document.getData().setValue or Document.setValue) are committed when this call is made.

Attachment getAttachment(String name)

Returns the attachment identified by name. Returns null if no attachment exists with the given name.

DataList getAttachments()

Returns a DataList containing information on all attachments of this document.

AudioFile getAudioRecording(String sigId)

Returns the audio file associated with the specified signature. Returns null if no audio recording exists.

int getAudioRecordingLength(String sigId)

Returns the length of the audio recording (in seconds) for the specified audio signature. Returns -1 if the signature does not exist, is not signed, or is not audio.

DataList getAuditLogs()

Returns the audit log entries associated with this Document.

String getBillingReference()

Returns the billing reference associated with the execution fee for this Document. Deployed Documents only.

Date getCreateDate()

Returns the date this document was created

String getCurrentSignature()

Returns the id of the signature that was presented for signing.

Data getData()

Returns all the data that has values contained in this document.

String getDescription()

Returns the description of this document.

DisplaySettings getDisplaySettings()

Returns the DisplaySettings for this Document. DisplaySettings are used for rendering to Browser or print to PDF.

Fragment getFragment(String targetId)

Returns a portion of the xhtml of the document identified with an id of targetId. This method will return null if no element exists or if the content has been signed.

Payload getLayerPayload()

Returns the layer as a non persistent Payload. To persist changes, call setLayerPayload.

Date getModifiedDate()

Returns last modified date of the document

String getModifiedEmail()

Returns email of last modifier of the document

String getModifiedUser()

Returns name of last modifier of the document

String getName()

Returns the name of this document.

String getNextSignature(String role)

Gets the next signature id to be signed by role.

String getNextUserSignature(String email)

Gets the next signature id to be signed. See setSigner.

int getPageCount()

Returns the number of pages in this document. For PDF and ad-hoc, it returns the actual number of pages. For html, it returns 1 regardless of how many pages there may be.

int getPageHeight()

Returns height of the first page in pixels. Method is for pdf documents. For html always returns 0

int getPageWidth()

Returns width of the first page in pixels. Method is for pdf documents. For html always returns 0

DataList getRoles()

Returns a unique datalist of role names associated with the signatures in this document.

SignSettings getSignSettings()

Returns sign settings for the document. Sign settings can be used to customize signature appearance. Sign settings are not stored with document in packet

ImageFile getSignatureImage(String signatureId)

Returns the image file, if any, of the specified signed signature.

DataList getSignatures(String role)

Returns a DataList containing signature information for this document. Pass * for all roles

String getSmartDocId()

If this document was created from a Smart Document, this method returns the smart doc ID. See Packet.createDocument(SmartDoc,Data).

int getSortOrder()

Returns the sort order of this document in the packet. Default is 0.

String getStatus()

Returns the status of this document.

String getType()

Returns the type of document. Typically this is html or pdf. May also be 'files' or 'adhoc'.

DataList getUserSignatures(String email)

Returns a DataList containing signature information for this document for specified user.

  insertImage(String target, File file)

Inserts image into document into specified target element

boolean isAllSigned(String role)

Returns true if all required signatures in this document have been signed by the indicated role. Pass * for all roles. Returns false if the role does not exist in any signature.

boolean isAllUserSigned(String email)

Returns true if all required signatures in this document have been signed by user with the email provided. Method returns false if there are no signatures associated with the specified email. See also Document.setSigner(email) and Document.getUserSignatures(email)

boolean isEditAttachmentsAllowed()

Returns true if the document has no signatures or if no signatures have been signed.

boolean isPdf()

Returns true if this Document is PDF.

boolean isSealed()

Returns true if this is a PDF document and has been tamper sealed.

boolean isSignable()

Returns true if the document has been presented to the user for signing. For this to be true, 1) the document must have been enabled for signing, and 2) the user must have submitted the action associated with signing.

boolean isSignatureSigned(String sigId)

Returns true if signature is signed or completed. Returns false if no signature exists with the given id or it has not been signed.

boolean isSigned(String role)

Returns true if any signature in this document has been signed by the indicated role. Pass * for all roles.

  mergeLayerPayload()

Merges the layer into the document. Throws exception if any signature has been signed.

  proxyClickSign(String name)

Performs a proxy sign in behalf of the person identified by name. Name will appear in the signature rendering and an audit entry will be created indicating the signature was signed in behalf of the name. This should only be called on a single signature of type 'click'.

  proxySign(String name)

Performs a proxy sign in behalf of the person identified by name. Name will appear in the signature rendering and an audit entry will be created indicating the signature was signed in behalf of the name. This should only be called on a single signature of type audio.

  proxySign(String sigId, String displayName, File file)

Performs a proxy sign in behalf of the person identified by name. Name will appear in the signature rendering and an audit entry will be created indicating the signature was signed in behalf of the name. File should be of MPEG or AMR audio type. Recording length validated against activation key constraints. This should only be called on a single signature of type audio.

  rebuildFromPal(Data data)

Assembles the document again from the template contained in the Pal using the supplied data to populate matching fields in the template. This method will throw an exception if any signature on the document has been signed.

  removeFragment(String targetId)

Removes the element identified by targetId from the document. The element cannot be referenced by any signed signatures. Support for HTML documents only.

  rollbackSignatures(String reason)

Resets all signatures in the document to the new/unsigned state and creates an audit trail for the event.

  setAjaxSigning(boolean enabled)

Call this method in conjunction with enableSigning or enableSignature. See also ClientPal.reloadDocument.

  setBillingReference(String reference)

Sets the billing reference associated with the execution fee for this Document. Deployed Documents only.

  setData(Data data)

Immediately sets the document field values for those fields referenced in Data. If this is a PDF document with checkboxes, any checkbox not referenced in the Data is unchecked.

  setDescription(String description)

Sets the description of this document. Max length is 80 characters.

  setLayerPayload(Payload payload)

Stores the payload layer with the document. Does not merge.

boolean setSigner(String sigId, String email, String auditName, String data)

Sets signer information for signature. Returns false if the signature doesn't exist or is already signed.

  setSortOrder(int sortOrder)

Sets the sort order of this document in the packet. Order is not unique and not automatic, two documents can have the same sort order.

  setStatus(String status)

Sets the status of this document. Max length is 128 characters.

  setValue(String fieldName, String value)

Adds the fieldName/value pair to the data object for this document, over-writing any set that already exists with name key. Shortcut for getData().setValue(key,value)

  showSaveButtons(String saveId, String saveAction, String saveLabel, String cancelId, String cancelAction, String cancelLabel, String ajaxHandler)

Renders save and cancel buttons in the document. See document.enableEditing. This method is mutually exclusive with signing. You can have sign buttons or save buttons, but not both at the same time. Pass null for ajaxHandler if you are not using AJAX. For PDF documents this works only if you are rendering as 'smart' documents. The saveId and cancelId targets should be 'saveTop', 'cancelTop', 'saveBottom', 'cancelBottom', 'saveBoth', or 'cancelBoth'. For PDF, the buttons will be contained in divs with ID 'navTop' and 'navBottom' For HTML documents, they should be elements with an ID that already exists in the document DOM.

String sign()

Completes signing and returns the id of the signature signed. This method will throw an error if the user is not in a signing path.

  signOverride(boolean override, String sigIds, String initialIds)

If true, overrides the default signing behavior which requires the document to be presented before signing. If false, resets to the default behavior. This method has a lifespan of the workflow event only. It is not persistent and must be called each time you intend to override. For some signing methods, such as Document.sign(), which signature to sign is handled by the presentation layer. In this case since the document has not been displayed, you must specify which signature(s) and/or initial(s) (comma separated) you intend to sign. If you will be signing with an API that specifies the signature, use null for these parameters.

  signSignature(String sigId)

Call immediately after sign() method. Signs this signature with the same signature signed with the sign() method.

boolean softAudioSign(String sigId, File file)

Signs the specified audio signature for the active user. Audit trail indicates a 'soft' sign. File must contain valid audio content. Role not required.

boolean softImageSign(String sigId, File file)

Signs the specified audio signature for the active user. Audit trail indicates a 'soft' sign. File must contain valid image content. Role not required.

boolean softSign(String sigId)

Signs the specified signature for the active user. Audit trail indicates a 'soft' sign. Role not required.

PdfFile toPdf(String filename, boolean includeAudio)

Exports this document to PDF file optionally including/excluding any audio signatures.

String toString()

Returns a description of this object.

boolean updateFragment(String targetId, Fragment fragment)

Updates the contents of target with the given fragment. Support for HTML documents only.

ValidityCheck validate(Data data, String role, String validationTarget, boolean showErrors)

Validates the data for the given Role. This method is used for SmartDocuments.

Method Detail


Attachment addAttachment(Attachment attachment, String targetId, String name, String description, boolean embed)

HTML documents only. See Packet.addAttachment(File...) and Packet.getAttachment. This method works only from an attachment obtained from the packet.

Parameters:

  • Attachment   attachment
  • String   targetId
  • String   name
  • String   description
  • boolean   embed

Returns:  Attachment

Since: 09-24-2009

top

boolean addAudioSignature(String sigId, String role, String target, int limit)

Adds an audio signature to the document... (see addClickSignature). The audio recording will be limited to the number of minutes specified in limit.If this limit exceeds that allowed by the activation, the activation limit will be used.

Parameters:

  • String   sigId Required parameter.
  • String   role Required parameter. Maximum allowed size of parameter: 80
  • String   target
  • int   limit Required parameter.

Returns:  boolean

Since: 11-24-2007

top

boolean addChart(Chart chart)

Adds chart to document. Method supported only for html documents. For pdf method silently returns false. Only server charts supported (created using ChartTool) otherwise exception occurs

Parameters:

Returns:  boolean

Since: 11-12-2009

top

boolean addClickSignature(String sigId, String role, String target)

Adds a click signature to the document, identified by sigId, signable by role, referencing target. If the document is of type pdf, target can be null. If the document is html, the document must have a span or div tag with an id attribute matching the supplied sigId as well as a div tag with id matching target. If the document is HTML and you pass null for target, the cp-root div will be used as the target. The sigId must be unique (no two signatures in this document can have the same id). The sigId is the same id used to reference the signature that will be created. This method returns false if the signature cannot be added because the document content referenced by target has already been signed.

Parameters:

  • String   sigId Required parameter.
  • String   role Required parameter. Maximum allowed size of parameter: 80
  • String   target

Returns:  boolean

Since: 11-24-2007

top

boolean addExclusiveInitial(String sigId, String ref, String role, String target, String group, boolean required)

Adds an exclusive initial signature to the document... (see addClickSignature). Note that initial signatures require the existance of a non initial signature (ref) in order to function correctly.

Parameters:

  • String   sigId Required parameter.
  • String   ref Required parameter.
  • String   role Required parameter. Maximum allowed size of parameter: 80
  • String   target
  • String   group
  • boolean   required Required parameter.

Returns:  boolean

Since: 11-24-2007

top

Attachment addFile(File file, String targetId, String name, String description, boolean embed)

HTML documents only. Adds the content of the given file to the document as a child of the element identified by targetId. If embed is true,it will attempt to embed the file-- meaning the contents of the file will be rendered by the browser as opposed to being presented as a download link. Future access to the attachment will be by unique name. Pass null for name to have a GUID automatically assigned. The description is what you should display to the user, it is the description of the attachment.

Parameters:

  • File   file
  • String   targetId
  • String   name
  • String   description
  • boolean   embed

Returns:  Attachment

Since: 06-07-2012

top

addFilter(String field, String role)

Enables filtering on a field

Parameters:

  • String   field
  • String   role

Since: 07-17-2008

top

int addFragment(String targetId, Fragment fragment, boolean append, boolean index)

Appends to or replaces the content in the element identified by targetId with the content in the fragment. If index is true, the fragment should have an id or name attribute on the root element. This element and any child elements with an id or name attribute are re-indexed and the index is returned. Support for HTML documents only.

Parameters:

  • String   targetId Required parameter.
  • Fragment   fragment Required parameter.
  • boolean   append
  • boolean   index

Returns:  int

Since: 05-31-2007

top

boolean addImageSignature(String sigId, String role, String target)

Adds an image signature to the document... (see addClickSignature)

Parameters:

  • String   sigId Required parameter.
  • String   role Required parameter. Maximum allowed size of parameter: 80
  • String   target

Returns:  boolean

Since: 11-24-2007

top

boolean addInitial(String sigId, String ref, String role, String target, boolean required)

Adds an initial signature to the document... (see addClickSignature). Note that initial signatures require the existance of a non initial signature (ref) in order to function correctly.

Parameters:

  • String   sigId Required parameter.
  • String   ref Required parameter.
  • String   role Required parameter. Maximum allowed size of parameter: 80
  • String   target
  • boolean   required Required parameter.

Returns:  boolean

Since: 11-24-2007

top

addPdfPage(int destinationPage, PdfFile sourcePdf, int sourcePage)

Adds the page from the source PDF to this PDF at the specified location. Controlled by Max Max Doc Size of activation key. Exception if not a PDF document or doc is tamper sealed.

Parameters:

  • int   destinationPage  - Where in this PDF to add the new page (shift others if applicable), 1 based..
  • PdfFile   sourcePdf  - PDF containing the source page.. Required parameter.
  • int   sourcePage  - Page number in source pdf, 1 based..

Since: 02-17-2012

top

String addTarget(String id)

Creates a div element with the specified ID and appends it to the root document element. If id is null, a GUID is created and returned. This method is for HTML documents only.

Parameters:

  • String   id

Returns:  String

Since: 05-04-2009

top

addWizard(String targetId, Wizard wizard, String dialogName)

Adds the content and data from the given wizard dialog to the document. Supported for HTML documents only.

Parameters:

  • String   targetId Required parameter.
  • Wizard   wizard Required parameter.
  • String   dialogName Required parameter.

Since: 06-02-2009

top

appendPdf(PdfFile sourcePdf)

Appends the source PDF to this PDF. Controlled by Max Document Size of activation key. Exception if not a PDF document or doc is tamper sealed.

Parameters:

  • PdfFile   sourcePdf  - PDF containing the source page. Required parameter.

Since: 02-17-2012

top

boolean createCheckboxGroup(String[] fields)

Makes the specified fields behave like radio buttons in terms of browser behavior and validation. Returns false if the document has been signed, if the document is not compatible (PDF), or if any of the specified fields to not exist in the document.

Parameters:

  • String[]   fields

Returns:  boolean

Since: 02-05-2010

top

boolean createPdfTamperSeal()

Creates a Digital Signature 'tamper seal' on this PDF document. This should be called only once, when all data and signatures have been applied. Returns false if this document is not a PDF or if this method has already been applied to the document.

Returns:  boolean

Since: 07-10-2008

top

boolean deleteAttachment(String name)

Deletes the attachment with the given name. Returns false if no attachment exists with the name. This method also returns false if the document has any signed signatures.

Parameters:

  • String   name

Returns:  boolean

Since: 11-26-2008

top

deletePdfPage(int pageNumber)

Deletes the specified page. Throws exception if this is not a PDF document or it has been tamper sealed.

Parameters:

  • int   pageNumber

Since: 02-17-2012

top

boolean deleteSignature(String sigId)

Deletes the signature identified by id. This method returns false if the signature has already been signed and therefore cannot be deleted.

Parameters:

  • String   sigId Required parameter.

Returns:  boolean

Since: 02-13-2008

top

enableEditing()

Enables editing of data by the active user.

Since: 05-31-2007

top

enableEditing(String[] fieldNames)

Allows specified fields to be edited

Parameters:

  • String[]   fieldNames

Since: 01-19-2009

top

boolean enableSignature(String sigId, String acceptAction, String rejectAction)

Enables signing of the specified signature by the active user. This willreturn acceptAction or rejectAction depending on the choice the user makes. Returns false if the active user does not have a role.

Parameters:

  • String   sigId
  • String   acceptAction
  • String   rejectAction

Returns:  boolean

Since: 05-31-2007

top

boolean enableSigning(String acceptAction, String rejectAction)

Enables signing of the next signature allowed for the active user based on the user's role(s). This willreturn acceptAction or rejectAction depending on the choice the user makes. Returns false if the active user does not have a role.

Parameters:

  • String   acceptAction
  • String   rejectAction

Returns:  boolean

Since: 05-31-2007

top

Data getAllData(String nullValue)

Returns (Read only) all the data elements contained in this document. If the value of the element is null, its value is set to nullValue in this Data object. Any pending updates (Document.getData().setValue or Document.setValue) are committed when this call is made.

Parameters:

  • String   nullValue

Returns:  Data

Since: 09-03-2009

top

Attachment getAttachment(String name)

Returns the attachment identified by name. Returns null if no attachment exists with the given name.

Parameters:

  • String   name

Returns:  Attachment

Since: 11-18-2008

top

DataList getAttachments()

Returns a DataList containing information on all attachments of this document.

Returns:  DataList


DataList Name: attachments
DataList Fields: id, name, description, filename, contentType, createDate, size, type, creator, lastModifier, lastModifiedDate, htmlConversionSupported

Since: 11-18-2008

top

AudioFile getAudioRecording(String sigId)

Returns the audio file associated with the specified signature. Returns null if no audio recording exists.

Parameters:

  • String   sigId Required parameter.

Returns:  AudioFile

Since: 09-03-2014

top

int getAudioRecordingLength(String sigId)

Returns the length of the audio recording (in seconds) for the specified audio signature. Returns -1 if the signature does not exist, is not signed, or is not audio.

Parameters:

  • String   sigId

Returns:  int

Since: 06-02-2008

top

DataList getAuditLogs()

Returns the audit log entries associated with this Document.

Returns:  DataList


DataList Name: docauditlogs
DataList Fields: event, description, date, email, role, ipaddress, palversion, useragent

Since: 12-03-2008

top

String getBillingReference()

Returns the billing reference associated with the execution fee for this Document. Deployed Documents only.

Returns:  String

Since: 04-01-2011

top

Date getCreateDate()

Returns the date this document was created

Returns:  Date

Since: 09-15-2009

top

String getCurrentSignature()

Returns the id of the signature that was presented for signing.

Returns:  String

Since: 05-31-2007

top

Data getData()

Returns all the data that has values contained in this document.

Returns:  Data

Since: 05-31-2007

top

String getDescription()

Returns the description of this document.

Returns:  String

Since: 05-31-2007

top

DisplaySettings getDisplaySettings()

Returns the DisplaySettings for this Document. DisplaySettings are used for rendering to Browser or print to PDF.

Returns:  DisplaySettings

Since: 02-06-2009

top

Fragment getFragment(String targetId)

Returns a portion of the xhtml of the document identified with an id of targetId. This method will return null if no element exists or if the content has been signed.

Parameters:

  • String   targetId Required parameter.

Returns:  Fragment

Since: 11-30-2007

top

Payload getLayerPayload()

Returns the layer as a non persistent Payload. To persist changes, call setLayerPayload.

Returns:  Payload

Since: 06-28-2012

top

Date getModifiedDate()

Returns last modified date of the document

Returns:  Date

Since: 09-15-2009

top

String getModifiedEmail()

Returns email of last modifier of the document

Returns:  String

Since: 09-15-2009

top

String getModifiedUser()

Returns name of last modifier of the document

Returns:  String

Since: 09-15-2009

top

String getName()

Returns the name of this document.

Returns:  String

Since: 07-19-2007

top

String getNextSignature(String role)

Gets the next signature id to be signed by role.

Parameters:

  • String   role

Returns:  String

Since: 01-27-2010

top

String getNextUserSignature(String email)

Gets the next signature id to be signed. See setSigner.

Parameters:

  • String   email

Returns:  String

Since: 01-27-2010

top

int getPageCount()

Returns the number of pages in this document. For PDF and ad-hoc, it returns the actual number of pages. For html, it returns 1 regardless of how many pages there may be.

Returns:  int

Since: 11-09-2009

top

int getPageHeight()

Returns height of the first page in pixels. Method is for pdf documents. For html always returns 0

Returns:  int

Since: 12-15-2009

top

int getPageWidth()

Returns width of the first page in pixels. Method is for pdf documents. For html always returns 0

Returns:  int

Since: 12-15-2009

top

DataList getRoles()

Returns a unique datalist of role names associated with the signatures in this document.

Returns:  DataList


DataList Name: roles
DataList Fields: role

Since: 08-07-2009

top

SignSettings getSignSettings()

Returns sign settings for the document. Sign settings can be used to customize signature appearance. Sign settings are not stored with document in packet

Returns:  SignSettings

Since: 06-09-2010

top

ImageFile getSignatureImage(String signatureId)

Returns the image file, if any, of the specified signed signature.

Parameters:

  • String   signatureId Required parameter.

Returns:  ImageFile

Since: 11-13-2017

top

DataList getSignatures(String role)

Returns a DataList containing signature information for this document. Pass * for all roles

Parameters:

  • String   role Required parameter.

Returns:  DataList


DataList Name: signatures
DataList Fields: id, type, role, signed, email, auditName, data, ipAddress

Since: 12-21-2007

top

String getSmartDocId()

If this document was created from a Smart Document, this method returns the smart doc ID. See Packet.createDocument(SmartDoc,Data).

Returns:  String

Since: 06-28-2012

top

int getSortOrder()

Returns the sort order of this document in the packet. Default is 0.

Returns:  int

Since: 03-16-2010

top

String getStatus()

Returns the status of this document.

Returns:  String

Since: 05-31-2007

top

String getType()

Returns the type of document. Typically this is html or pdf. May also be 'files' or 'adhoc'.

Returns:  String

Since: 11-07-2016

top

DataList getUserSignatures(String email)

Returns a DataList containing signature information for this document for specified user.

Parameters:

  • String   email

Returns:  DataList


DataList Name: signatures
DataList Fields: id, type, role, signed, email, auditName, data

Since: 09-15-2009

top

insertImage(String target, File file)

Inserts image into document into specified target element

Parameters:

  • String   target  - id of the element to insert image into. Required parameter.
  • File   file  - file with image contents. Required parameter.

Since: 06-09-2011

top

boolean isAllSigned(String role)

Returns true if all required signatures in this document have been signed by the indicated role. Pass * for all roles. Returns false if the role does not exist in any signature.

Parameters:

  • String   role Required parameter.

Returns:  boolean

Since: 12-21-2007

top

boolean isAllUserSigned(String email)

Returns true if all required signatures in this document have been signed by user with the email provided. Method returns false if there are no signatures associated with the specified email. See also Document.setSigner(email) and Document.getUserSignatures(email)

Parameters:

  • String   email Required parameter.

Returns:  boolean

Since: 03-02-2010

top

boolean isEditAttachmentsAllowed()

Returns true if the document has no signatures or if no signatures have been signed.

Returns:  boolean

Since: 11-26-2008

top

boolean isPdf()

Returns true if this Document is PDF.

Returns:  boolean

Since: 02-06-2009

top

boolean isSealed()

Returns true if this is a PDF document and has been tamper sealed.

Returns:  boolean

Since: 02-17-2012

top

boolean isSignable()

Returns true if the document has been presented to the user for signing. For this to be true, 1) the document must have been enabled for signing, and 2) the user must have submitted the action associated with signing.

Returns:  boolean

Since: 05-10-2012

top

boolean isSignatureSigned(String sigId)

Returns true if signature is signed or completed. Returns false if no signature exists with the given id or it has not been signed.

Parameters:

  • String   sigId

Returns:  boolean

Since: 08-27-2008

top

boolean isSigned(String role)

Returns true if any signature in this document has been signed by the indicated role. Pass * for all roles.

Parameters:

  • String   role Required parameter.

Returns:  boolean

Since: 05-31-2007

top

mergeLayerPayload()

Merges the layer into the document. Throws exception if any signature has been signed.

Since: 06-28-2012

top

proxyClickSign(String name)

Performs a proxy sign in behalf of the person identified by name. Name will appear in the signature rendering and an audit entry will be created indicating the signature was signed in behalf of the name. This should only be called on a single signature of type 'click'.

Parameters:

  • String   name Required parameter.

Since: 09-19-2012

top

proxySign(String name)

Performs a proxy sign in behalf of the person identified by name. Name will appear in the signature rendering and an audit entry will be created indicating the signature was signed in behalf of the name. This should only be called on a single signature of type audio.

Parameters:

  • String   name

Since: 03-13-2008

top

proxySign(String sigId, String displayName, File file)

Performs a proxy sign in behalf of the person identified by name. Name will appear in the signature rendering and an audit entry will be created indicating the signature was signed in behalf of the name. File should be of MPEG or AMR audio type. Recording length validated against activation key constraints. This should only be called on a single signature of type audio.

Parameters:

  • String   sigId  - id of a single signature to sign. Required parameter.
  • String   displayName  - person name. Required parameter.
  • File   file  - audio recording. Required parameter.

Since: 12-24-2010

top

rebuildFromPal(Data data)

Assembles the document again from the template contained in the Pal using the supplied data to populate matching fields in the template. This method will throw an exception if any signature on the document has been signed.

Parameters:

Since: 05-13-2008

top

removeFragment(String targetId)

Removes the element identified by targetId from the document. The element cannot be referenced by any signed signatures. Support for HTML documents only.

Parameters:

  • String   targetId Required parameter.

Since: 05-31-2007

top

rollbackSignatures(String reason)

Resets all signatures in the document to the new/unsigned state and creates an audit trail for the event.

Parameters:

  • String   reason  - Audit log reason for the reset. Required parameter.

Since: 01-14-2011

top

setAjaxSigning(boolean enabled)

Call this method in conjunction with enableSigning or enableSignature. See also ClientPal.reloadDocument.

Parameters:

  • boolean   enabled

Since: 02-05-2010

top

setBillingReference(String reference)

Sets the billing reference associated with the execution fee for this Document. Deployed Documents only.

Parameters:

  • String   reference Maximum allowed size of parameter: 15

Since: 04-01-2011

top

setData(Data data)

Immediately sets the document field values for those fields referenced in Data. If this is a PDF document with checkboxes, any checkbox not referenced in the Data is unchecked.

Parameters:

  • Data   data Required parameter.

Since: 11-08-2010

top

setDescription(String description)

Sets the description of this document. Max length is 80 characters.

Parameters:

  • String   description Maximum allowed size of parameter: 80

Since: 05-31-2007

top

setLayerPayload(Payload payload)

Stores the payload layer with the document. Does not merge.

Parameters:

  • Payload   payload Required parameter.

Since: 06-28-2012

top

boolean setSigner(String sigId, String email, String auditName, String data)

Sets signer information for signature. Returns false if the signature doesn't exist or is already signed.

Parameters:

  • String   sigId
  • String   email
  • String   auditName
  • String   data

Returns:  boolean

Since: 09-15-2009

top

setSortOrder(int sortOrder)

Sets the sort order of this document in the packet. Order is not unique and not automatic, two documents can have the same sort order.

Parameters:

  • int   sortOrder

Since: 03-16-2010

top

setStatus(String status)

Sets the status of this document. Max length is 128 characters.

Parameters:

  • String   status Maximum allowed size of parameter: 128

Since: 05-31-2007

top

setValue(String fieldName, String value)

Adds the fieldName/value pair to the data object for this document, over-writing any set that already exists with name key. Shortcut for getData().setValue(key,value)

Parameters:

  • String   fieldName
  • String   value

Since: 01-08-2007

top

showSaveButtons(String saveId, String saveAction, String saveLabel, String cancelId, String cancelAction, String cancelLabel, String ajaxHandler)

Renders save and cancel buttons in the document. See document.enableEditing. This method is mutually exclusive with signing. You can have sign buttons or save buttons, but not both at the same time. Pass null for ajaxHandler if you are not using AJAX. For PDF documents this works only if you are rendering as 'smart' documents. The saveId and cancelId targets should be 'saveTop', 'cancelTop', 'saveBottom', 'cancelBottom', 'saveBoth', or 'cancelBoth'. For PDF, the buttons will be contained in divs with ID 'navTop' and 'navBottom' For HTML documents, they should be elements with an ID that already exists in the document DOM.

Parameters:

  • String   saveId
  • String   saveAction
  • String   saveLabel
  • String   cancelId
  • String   cancelAction
  • String   cancelLabel
  • String   ajaxHandler

Since: 08-17-2009

top

String sign()

Completes signing and returns the id of the signature signed. This method will throw an error if the user is not in a signing path.

Returns:  String

Since: 05-31-2007

top

signOverride(boolean override, String sigIds, String initialIds)

If true, overrides the default signing behavior which requires the document to be presented before signing. If false, resets to the default behavior. This method has a lifespan of the workflow event only. It is not persistent and must be called each time you intend to override. For some signing methods, such as Document.sign(), which signature to sign is handled by the presentation layer. In this case since the document has not been displayed, you must specify which signature(s) and/or initial(s) (comma separated) you intend to sign. If you will be signing with an API that specifies the signature, use null for these parameters.

Parameters:

  • boolean   override
  • String   sigIds
  • String   initialIds

Since: 07-23-2015

top

signSignature(String sigId)

Call immediately after sign() method. Signs this signature with the same signature signed with the sign() method.

Parameters:

  • String   sigId

Since: 05-31-2007

top

boolean softAudioSign(String sigId, File file)

Signs the specified audio signature for the active user. Audit trail indicates a 'soft' sign. File must contain valid audio content. Role not required.

Parameters:

  • String   sigId
  • File   file Required parameter.

Returns:  boolean

Since: 06-23-2011

top

boolean softImageSign(String sigId, File file)

Signs the specified audio signature for the active user. Audit trail indicates a 'soft' sign. File must contain valid image content. Role not required.

Parameters:

  • String   sigId
  • File   file Required parameter.

Returns:  boolean

Since: 06-23-2011

top

boolean softSign(String sigId)

Signs the specified signature for the active user. Audit trail indicates a 'soft' sign. Role not required.

Parameters:

  • String   sigId Required parameter.

Returns:  boolean

Since: 06-23-2011

top

PdfFile toPdf(String filename, boolean includeAudio)

Exports this document to PDF file optionally including/excluding any audio signatures.

Parameters:

  • String   filename  - file name. Required parameter.
  • boolean   includeAudio  - attach audio signatures.

Returns:  PdfFile

Since: 11-19-2010

top

String toString()

Returns a description of this object.

Returns:  String

Since: 06-14-2007

top

boolean updateFragment(String targetId, Fragment fragment)

Updates the contents of target with the given fragment. Support for HTML documents only.

Parameters:

  • String   targetId Required parameter.
  • Fragment   fragment Required parameter.

Returns:  boolean

Since: 01-30-2007

top

ValidityCheck validate(Data data, String role, String validationTarget, boolean showErrors)

Validates the data for the given Role. This method is used for SmartDocuments.

Parameters:

  • Data   data Required parameter.
  • String   role  - The role to check validation against.. Required parameter.
  • String   validationTarget
  • boolean   showErrors  - If true, errors if any will be displayed in the document on the next rendering..

Returns:  ValidityCheck

Since: 11-01-2012

top
Copyright © 2006 - 2024, ContractPal, Inc. All rights reserved. API Date: Dec 03, 2024 10:24 AM