com.pega.pegarules.pub.util
Interface EFormUtils


public interface EFormUtils

Utilities for manipulating eForm documents.

Version:
$Revision: 31 $ $Date: 2009-06-24 09:38:04 -0400 (Wed, 24 Jun 2009) $
Author:
David Dority

Field Summary
static java.lang.String COPYRIGHT
           
static java.lang.String DOC_ENCRYPTION_MASTER_PASSWORD
          Optional parameter identifier for concatenateEForms() used to indicate the master password as a String.
static java.lang.String DOC_ENCRYPTION_PERMISSIONS
          Optional parameter identifier for concatenateEForms() used to indicate generated document permissions.
static java.lang.String DOC_ENCRYPTION_STRENGTH
          Optional parameter identifier for concatenateEForms() used to indicate the encryption strength that will be used (acceptable values are "40" (default)or "128").
static java.lang.String DOC_ENCRYPTION_USER_PASSWORD
          Optional parameter identifier for concatenateEForms() used to indicate the user password as a string.
static int EFORM_DOC_PERMISSION_ALLOW_ASSEMBLY
           
static int EFORM_DOC_PERMISSION_ALLOW_COPY
           
static int EFORM_DOC_PERMISSION_ALLOW_DEGRADEDPRINTING
           
static int EFORM_DOC_PERMISSION_ALLOW_FILL_IN
           
static int EFORM_DOC_PERMISSION_ALLOW_MODIFY_ANNOTATIONS
           
static int EFORM_DOC_PERMISSION_ALLOW_MODIFY_CONTENTS
           
static int EFORM_DOC_PERMISSION_ALLOW_PRINTING
           
static int EFORM_DOC_PERMISSION_ALLOW_SCREENREADERS
           
static java.lang.String PERFORM_DOC_ENCRYPTION
          Optional parameter identifier for concatenateEForms() that is used to indicate that document encryption should be performed after eForm documents have been concatenated.
static java.lang.String PERFORM_FORM_FIELD_FLATTENING
          Optional parameter identifier for concatenateEForms() that is used to indicate that form field flattening should be performed after eForm documents have been concatenated.
static java.lang.String VERSION
           
 
Method Summary
 byte[] concatenateEForms(java.util.List aEFormDocuments, java.util.Map aOptionalParameters)
          Concatenates several eForm documents into a single document.
 int extractDataFromEForm(byte[] aEFormBytes, java.lang.String aEFormMappingRule, ClipboardPage aPage)
          Extracts eForm form field values and maps them to the clipboard.
 int extractDataFromEForm(java.io.File aEFormFile, java.lang.String aEFormMappingRule, ClipboardPage aPage)
          Extracts eForm field values and maps them to the clipboard.
 int extractDataFromEForm(java.io.InputStream aEFormInputStream, java.lang.String aEFormMappingRule, ClipboardPage aPage)
          Extracts eForm field values and maps them to the clipboard.
 int extractDataFromEForm(java.lang.String aEFormMappingRule, ClipboardPage aPage)
          Extracts eForm field values and maps them to the clipboard.
 int extractDataFromEForm(java.net.URL aEFormUrl, java.lang.String aEFormMappingRule, ClipboardPage aPage)
          Extracts eForm field values and maps them to the clipboard.
 byte[] generateLabeledEForm(byte[] aEFormBytes)
          Create an eForm in which the value of each field is the field's name.
 byte[] generateLabeledEForm(java.io.File aEFormFile)
          Create an eForm in which the value of each field is the field's name.
 byte[] generateLabeledEForm(java.io.InputStream aEFormInputStream)
          Create an eForm in which the value of each field is the field's name.
 byte[] generateLabeledEForm(java.net.URL aEFormUrl)
          Create an eForm in which the value of each field is the field's name.
 byte[] generatePopulatedEForm(byte[] aEFormBytes, java.lang.String aEFormMappingRule, ClipboardPage aPage)
          Merge clipboard data into a eForm.
 byte[] generatePopulatedEForm(java.io.File aEFormFile, java.lang.String aEFormMappingRule, ClipboardPage aPage)
          Merge clipboard data into a eForm.
 byte[] generatePopulatedEForm(java.io.InputStream aEFormInputStream, java.lang.String aEFormMappingRule, ClipboardPage aPage)
          Merge clipboard data into a eForm.
 byte[] generatePopulatedEForm(java.lang.String aEFormMappingRule, ClipboardPage aPage)
          Merge clipboard data into a eForm.
 byte[] generatePopulatedEForm(java.net.URL aEFormUrl, java.lang.String aEFormMappingRule, ClipboardPage aPage)
          Merge clipboard data into a eForm.
 java.util.List getEFormFieldList(byte[] aEFormBytes)
          Retrieve eForm form field names from a byte[].
 java.util.List getEFormFieldList(java.io.File aEFormFile)
          Retrieve eForm form field names from a byte[].
 java.util.List getEFormFieldList(java.io.InputStream aEFormInputStream)
          Retrieve eForm form field names from a byte[].
 java.util.List getEFormFieldList(java.lang.String aClassName, java.lang.String aFileName, java.lang.String aExtension)
          Retrieve eForm form field names from a Rule-File-eForm instance.
 java.util.List getEFormFieldList(java.net.URL aEFormUrl)
          Retrieve eForm field names from a byte[].
 byte[] markAllEFormFieldsReadOnly(byte[] aPdfBytes)
          Mark all form fields read only.
 byte[] performOptionalProcessing(byte[] aSourceDoc, java.util.Map aParams)
          Perform form flattening and document encryption..
 

Field Detail

COPYRIGHT

static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

VERSION

static final java.lang.String VERSION
See Also:
Constant Field Values

EFORM_DOC_PERMISSION_ALLOW_ASSEMBLY

static final int EFORM_DOC_PERMISSION_ALLOW_ASSEMBLY
See Also:
Constant Field Values

EFORM_DOC_PERMISSION_ALLOW_COPY

static final int EFORM_DOC_PERMISSION_ALLOW_COPY
See Also:
Constant Field Values

EFORM_DOC_PERMISSION_ALLOW_DEGRADEDPRINTING

static final int EFORM_DOC_PERMISSION_ALLOW_DEGRADEDPRINTING
See Also:
Constant Field Values

EFORM_DOC_PERMISSION_ALLOW_FILL_IN

static final int EFORM_DOC_PERMISSION_ALLOW_FILL_IN
See Also:
Constant Field Values

EFORM_DOC_PERMISSION_ALLOW_MODIFY_ANNOTATIONS

static final int EFORM_DOC_PERMISSION_ALLOW_MODIFY_ANNOTATIONS
See Also:
Constant Field Values

EFORM_DOC_PERMISSION_ALLOW_MODIFY_CONTENTS

static final int EFORM_DOC_PERMISSION_ALLOW_MODIFY_CONTENTS
See Also:
Constant Field Values

EFORM_DOC_PERMISSION_ALLOW_PRINTING

static final int EFORM_DOC_PERMISSION_ALLOW_PRINTING
See Also:
Constant Field Values

EFORM_DOC_PERMISSION_ALLOW_SCREENREADERS

static final int EFORM_DOC_PERMISSION_ALLOW_SCREENREADERS
See Also:
Constant Field Values

PERFORM_FORM_FIELD_FLATTENING

static final java.lang.String PERFORM_FORM_FIELD_FLATTENING
Optional parameter identifier for concatenateEForms() that is used to indicate that form field flattening should be performed after eForm documents have been concatenated. (This should be set to any non-blank and non-null value.)

See Also:
Constant Field Values

PERFORM_DOC_ENCRYPTION

static final java.lang.String PERFORM_DOC_ENCRYPTION
Optional parameter identifier for concatenateEForms() that is used to indicate that document encryption should be performed after eForm documents have been concatenated. (This should be set to any non-blank and non-null value.)

See Also:
Constant Field Values

DOC_ENCRYPTION_PERMISSIONS

static final java.lang.String DOC_ENCRYPTION_PERMISSIONS
Optional parameter identifier for concatenateEForms() used to indicate generated document permissions. Should contain Integer wrapping an int whose value is determined logically OR-ing the appropriate permissions together (see EFORM_DOC_PERMISSION_ALLOW_*).

See Also:
Constant Field Values

DOC_ENCRYPTION_STRENGTH

static final java.lang.String DOC_ENCRYPTION_STRENGTH
Optional parameter identifier for concatenateEForms() used to indicate the encryption strength that will be used (acceptable values are "40" (default)or "128").

See Also:
Constant Field Values

DOC_ENCRYPTION_USER_PASSWORD

static final java.lang.String DOC_ENCRYPTION_USER_PASSWORD
Optional parameter identifier for concatenateEForms() used to indicate the user password as a string.

See Also:
Constant Field Values

DOC_ENCRYPTION_MASTER_PASSWORD

static final java.lang.String DOC_ENCRYPTION_MASTER_PASSWORD
Optional parameter identifier for concatenateEForms() used to indicate the master password as a String.

See Also:
Constant Field Values
Method Detail

generatePopulatedEForm

byte[] generatePopulatedEForm(java.lang.String aEFormMappingRule,
                              ClipboardPage aPage)
Merge clipboard data into a eForm. eForm referenced in the eForm mapping rule is used.

Parameters:
aEFormMappingRule - pyName portion of the rule key
aPage - The primary page of the mapping rule.
Returns:
A byte[] containing the new eForm document.

generatePopulatedEForm

byte[] generatePopulatedEForm(byte[] aEFormBytes,
                              java.lang.String aEFormMappingRule,
                              ClipboardPage aPage)
Merge clipboard data into a eForm. (The eForm document specified in the mapping rule is ignored.)

Parameters:
aEFormBytes - byte[] containing the eForm document
aEFormMappingRule - pyName portion of the rule key
aPage - The primary page of the mapping rule.
Returns:
A byte[] containing the new eForm document.

generatePopulatedEForm

byte[] generatePopulatedEForm(java.io.InputStream aEFormInputStream,
                              java.lang.String aEFormMappingRule,
                              ClipboardPage aPage)
Merge clipboard data into a eForm. (The eForm document specified in the mapping rule is ignored.)

Parameters:
aEFormInputStream - InputStream object to read the eForm from.
aEFormMappingRule - pyPurpose portion of the rule key
aPage - The primary page of the mapping rule.
Returns:
A byte[] containing the new eForm document.

generatePopulatedEForm

byte[] generatePopulatedEForm(java.io.File aEFormFile,
                              java.lang.String aEFormMappingRule,
                              ClipboardPage aPage)
Merge clipboard data into a eForm. (The eForm document specified in the mapping rule is ignored.)

Parameters:
aEFormFile - File object from which to read the eForm.
aEFormMappingRule - pyPurpose portion of the rule key
aPage - The primary page of the mapping rule.
Returns:
A byte[] containing the new eForm document.

generatePopulatedEForm

byte[] generatePopulatedEForm(java.net.URL aEFormUrl,
                              java.lang.String aEFormMappingRule,
                              ClipboardPage aPage)
Merge clipboard data into a eForm. (The eForm document specified in the mapping rule is ignored.)

Parameters:
aEFormUrl - The URL from which to retrieve the eForm.
aEFormMappingRule - pyPurpose portion of the rule key
aPage - The primary page of the mapping rule.
Returns:
A byte[] containing the new eForm document.

generateLabeledEForm

byte[] generateLabeledEForm(byte[] aEFormBytes)
Create an eForm in which the value of each field is the field's name.

Parameters:
aEFormBytes - byte[] containing the eForm document
Returns:
A byte[] containing the new eForm document.

generateLabeledEForm

byte[] generateLabeledEForm(java.io.InputStream aEFormInputStream)
Create an eForm in which the value of each field is the field's name.

Parameters:
aEFormInputStream - InputStream object to read the eForm from.
Returns:
A byte[] containing the new eForm document.

generateLabeledEForm

byte[] generateLabeledEForm(java.io.File aEFormFile)
Create an eForm in which the value of each field is the field's name.

Parameters:
aEFormFile - File object from which to read the eForm.
Returns:
A byte[] containing the new eForm document.

generateLabeledEForm

byte[] generateLabeledEForm(java.net.URL aEFormUrl)
Create an eForm in which the value of each field is the field's name.

Parameters:
aEFormUrl - The URL from which to retrieve the eForm.
Returns:
A byte[] containing the new eForm document.

extractDataFromEForm

int extractDataFromEForm(java.lang.String aEFormMappingRule,
                         ClipboardPage aPage)
Extracts eForm field values and maps them to the clipboard. The eForm document referenced by the mapping rule os used.

Parameters:
aEFormMappingRule - pyPurpose portion of the rule key
aPage - The primary page of the mapping rule.
Returns:
The number of field that were mapped.

extractDataFromEForm

int extractDataFromEForm(byte[] aEFormBytes,
                         java.lang.String aEFormMappingRule,
                         ClipboardPage aPage)
Extracts eForm form field values and maps them to the clipboard. (The eForm document specified in the mapping rule is ignored.)

Parameters:
aEFormBytes - byte[] containing the eForm document
aEFormMappingRule - pyPurpose portion of the rule key
aPage - The primary page of the mapping rule.
Returns:
The number of field that were mapped.

extractDataFromEForm

int extractDataFromEForm(java.io.InputStream aEFormInputStream,
                         java.lang.String aEFormMappingRule,
                         ClipboardPage aPage)
Extracts eForm field values and maps them to the clipboard. (The eForm document specified in the mapping rule is ignored.)

Parameters:
aEFormInputStream - InputStream object to read the eForm from.
aEFormMappingRule - pyPurpose portion of the rule key
aPage - The primary page of the mapping rule.
Returns:
The number of field that were mapped.

extractDataFromEForm

int extractDataFromEForm(java.io.File aEFormFile,
                         java.lang.String aEFormMappingRule,
                         ClipboardPage aPage)
Extracts eForm field values and maps them to the clipboard. (The eForm document specified in the mapping rule is ignored.)

Parameters:
aEFormFile - File object from which to read the eForm.
aEFormMappingRule - pyPupose portion of the rule key
aPage - The primary page of the mapping rule.
Returns:
The number of field that were mapped.

extractDataFromEForm

int extractDataFromEForm(java.net.URL aEFormUrl,
                         java.lang.String aEFormMappingRule,
                         ClipboardPage aPage)
Extracts eForm field values and maps them to the clipboard. (The eForm document specified in the mapping rule is ignored.)

Parameters:
aEFormUrl - The URL from which to retrieve the eForm.
aEFormMappingRule - pyPurpose portion of the rule key
aPage - The primary page of the mapping rule.
Returns:
The number of field that were mapped.

concatenateEForms

byte[] concatenateEForms(java.util.List aEFormDocuments,
                         java.util.Map aOptionalParameters)
Concatenates several eForm documents into a single document. This method can also flatten form fields (make them uneditable) and prevent document modification with Adobe Acrobat.

Parameters:
aEFormDocuments - A list of byte[]s containing eForm documents
aOptionalParameters - A Map of optional parameter.
Returns:
The resulting eForm document as a byte[]

getEFormFieldList

java.util.List getEFormFieldList(java.lang.String aClassName,
                                 java.lang.String aFileName,
                                 java.lang.String aExtension)
Retrieve eForm form field names from a Rule-File-eForm instance.

Parameters:
aClassName - Class name Rule-File-eForm key part.
aFileName - File name Rule-File-eForm key part.
aExtension - File extension Rule-File-eForm key part
Returns:
A List of eForm field names (String).

getEFormFieldList

java.util.List getEFormFieldList(byte[] aEFormBytes)
Retrieve eForm form field names from a byte[].

Parameters:
aEFormBytes - byte[] containing the eForm document.
Returns:
A List of eForm field names (String).

getEFormFieldList

java.util.List getEFormFieldList(java.io.InputStream aEFormInputStream)
Retrieve eForm form field names from a byte[].

Parameters:
aEFormInputStream - InputStream object from which to read the eForm.
Returns:
A List of eForm form field names (String).

getEFormFieldList

java.util.List getEFormFieldList(java.io.File aEFormFile)
Retrieve eForm form field names from a byte[].

Parameters:
aEFormFile - A File object to retrieve the eForm from.
Returns:
A List of eForm form field names (String).

getEFormFieldList

java.util.List getEFormFieldList(java.net.URL aEFormUrl)
Retrieve eForm field names from a byte[].

Parameters:
aEFormUrl - The URL from shich to retrieve the eForm.
Returns:
A List of eForm form field names (String).

performOptionalProcessing

byte[] performOptionalProcessing(byte[] aSourceDoc,
                                 java.util.Map aParams)
Perform form flattening and document encryption..

Parameters:
aSourceDoc - eForm as a byte[]
aParams - parameter map
Returns:
the new document as a byte[]

markAllEFormFieldsReadOnly

byte[] markAllEFormFieldsReadOnly(byte[] aPdfBytes)
Mark all form fields read only. This has some advantage over flattening the file when it comes to accessibility tags. Flattening the file seems to corrupt the document structure even though the form renders normally.

Parameters:
aPdfBytes - byte array containin the eForm document
Returns:
updated document as a byte []


Copyright © 2012 Pegasystems Inc. All Rights Reserved.