visit Kofax web site

de.softpro.signware.SPSignware Class Reference

List of all members.

Detailed Description

Signware base class.

This class will load the SignWare native code and provide for version and error handling.

Note:
SignWare requires a jvm version 1.5 or higher. To query the jvm version: open a command prompt and enter java -fullversion to see the jvm version)

The Java SDK does not create a log file or write any messages. Please use the SignWare logging feature for debugging purposes.

Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)


Static Public Member Functions

static synchronized void addLibraryPath (String strPath) throws SPSignwareException
static void closeSession (int iUsage, String strSession) throws SPSignwareException
 Inform license manager to close a session.
static int daysLM () throws SPSignwareException
 Query how many days the license will be valid.
static byte[] decodeBase64 (String strBase64) throws SPSignwareException
 Decode a Base64 String.
static String encodeBase64 (byte[] bData) throws SPSignwareException
 Encode data to a Base64 String.
static long getActualTime () throws SPSignwareException
static String getBrowserTicket (String strRequestUrl, SPTicket pTicket) throws SPSignwareException
 Create a Browser ticket.
static int getBuild (int iVersion)
 Query the build version from a SignWare version number.
static long getCurrentTime () throws SPSignwareException
static String getErrorString (int iError)
 Return an error code to a String.
static String getInstallationCode () throws SPSignwareException
 Query the installation code.
static int getMajor (int iVersion)
 Query the major version from a SignWare version number.
static int getMinor (int iVersion)
 Query the minor version from a SignWare version number.
static String getVersion (int iModule) throws SPSignwareException
 Query the version of Signware modules.
static boolean isLoaded ()
 Query if the native Signware modules could be loaded successfully.
static int loadedModules () throws SPSignwareException
 Query which modules have been loaded.
static int makeVersion (int iMajor, int iMinor, int iBuild)
 Convert minor, major and built to a SignWare version integer.
static int moduleCount ()
 Query the total number of modules that may be loaded.
static boolean needTicket () throws SPSignwareException
 Query if the installed license requires Tickets.
static void openSession (int iUsage, String strSession) throws SPSignwareException
 Inform license manager to open a new session.
static void println (String strMessage)
 Debug output ...
static void printStackTrace (Throwable th)
 Debug output ...
static void setLicenseKey (byte[] bKey, String sProduct, String sVersion, byte[] bToken) throws SPSignwareException
 Initialize the license manager with a license key.
static void setLM2 (int uiLmId1, int uiLmId2) throws SPSignwareException
 Initialize the license manager for using a license file.
static void setLogStream (java.io.PrintStream str)
 Set the debug output stream.
static void setTicket (SPTicket spTicket) throws SPSignwareException
 Pass a license ticket.
static void viewLM (java.awt.Component c, String strOptions) throws SPSignwareException
 display license information
static void viewLM (java.awt.Component c) throws SPSignwareException
 display license information

Static Public Attributes

static final int JSDK = 1
 Flag Signware native module is loaded.
static final int JSPLM2 = 2
 Flag Signware license manager module is loaded.
static final int SP_AWT_LOADED = 0x40
 Loaded external library jawt (java awt access).
static final int SP_GRAPHICLIB_LOADED = 0x10
 Loaded external image processing library.
static final int SP_SDK_LOADED = 1
 Loaded (myself) Library SDK.

Static Protected Member Functions

static synchronized int isInitialized () throws SPSignwareException

Static Protected Attributes

static int iJSpLmVersion = 0x0

Static Package Functions

static void lprintf (int iLvl, String aMsg)
static void lprintf1 (String aMsg)
static void lprintf2 (String aMsg)
static void lprintf3 (String aMsg)
static void lprintf4 (String aMsg)
static void lprintf5 (String aMsg)

Static Package Attributes

static java.io.PrintStream logger = null
 debug output stream


Member Function Documentation

static synchronized void de.softpro.signware.SPSignware.addLibraryPath String  strPath  )  throws SPSignwareException [static]
 

Append a path to the list of paths to load the native libraries

Note:
You cannot add any library paths once the native libraries were required
Parameters:
strPath [i] a Path to be added to the list of paths
Exceptions:
SPSignwareException 
Operating Systems:
Windows (Win32)

static void de.softpro.signware.SPSignware.closeSession int  iUsage,
String  strSession
throws SPSignwareException [static]
 

Inform license manager to close a session.

This function is reserved for Kofax internal use.

Deprecated:
Please use a license key.
Parameters:
iUsage [i] usage of the ticket (SP_TICKET_LOAD_SIGNWARE etc.)
strSession [i] session identifier, same session id as used in the open call
Exceptions:
SPSignwareException on errors
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a)

static int de.softpro.signware.SPSignware.daysLM  )  throws SPSignwareException [static]
 

Query how many days the license will be valid.

Returns:
int The number of days left.
Other return values include:
  • -1 license has expired
  • 0 license expires today
  • 1 license expires tomorrow
  • 0x7FFFFFFF license is unlimited (> 4 years)
Exceptions:
SPSignwareException on errors
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)

static byte [] de.softpro.signware.SPSignware.decodeBase64 String  strBase64  )  throws SPSignwareException [static]
 

Decode a Base64 String.

Parameters:
strBase64 [i] the Base64 encoded data
Returns:
byte[] the decoded data
Exceptions:
SPSignwareException 
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)
See also:
encodeBase64, SPBase64Decode

static String de.softpro.signware.SPSignware.encodeBase64 byte[]  bData  )  throws SPSignwareException [static]
 

Encode data to a Base64 String.

Parameters:
bData [i] the data to encode
Returns:
String the encoded Base64 String
Exceptions:
SPSignwareException 
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)
See also:
decodeBase64, SPBase64Encode

static long de.softpro.signware.SPSignware.getActualTime  )  throws SPSignwareException [static]
 

Query the current time as a long

Note:
The timestamp is included in a signature.
Returns:
long the actual time as timestamp
Exceptions:
SPSignwareException on errors
Deprecated:
Replaced by de.softpro.signware.SPSignware.getCurrentTime().
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)
See also:
SPSignature.getTimeStamp, SPSignatureGetTimeStamp

static String de.softpro.signware.SPSignware.getBrowserTicket String  strRequestUrl,
SPTicket  pTicket
throws SPSignwareException [static]
 

Create a Browser ticket.

The Kofax capture plugin will request a local license if the parameter Auth is omitted. The plugins will return an error if the parameter Auth is passed but does not contain a valid ticket. The created ticket is valid for the specified request URL only.

Parameters:
strRequestUrl [i] the URL that will also be passed to the Browserplugin in the parameter sendTo
pTicket [i] optional License ticket, required if ticket licenses are used, else you may pass null. The ticket must be charged with action SPTicket.ticket_capture
Returns:
String: a string that contains the valid ticket. Pass the result to the browser plugin in the Auth parameter
Exceptions:
SPSignwareException on errors
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a)

static int de.softpro.signware.SPSignware.getBuild int  iVersion  )  [static]
 

Query the build version from a SignWare version number.

Parameters:
iVersion [i] Signware version
Returns:
int the build version
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)

static long de.softpro.signware.SPSignware.getCurrentTime  )  throws SPSignwareException [static]
 

Query the current time as a long

The timestamp is included in a signature.

Returns:
long the actual time as timestamp
Exceptions:
SPSignwareException on errors
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)
See also:
SPSignature.getTimeStamp, SPSignatureGetTimeStamp

static String de.softpro.signware.SPSignware.getErrorString int  iError  )  [static]
 

Return an error code to a String.

Parameters:
iError [i] the error code
Returns:
String the readable error code
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)

static String de.softpro.signware.SPSignware.getInstallationCode  )  throws SPSignwareException [static]
 

Query the installation code.

Returns:
String The installation code
Exceptions:
SPSignwareException on errors
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64)

static int de.softpro.signware.SPSignware.getMajor int  iVersion  )  [static]
 

Query the major version from a SignWare version number.

Parameters:
iVersion [i] Signware version
Returns:
int the major version
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)

static int de.softpro.signware.SPSignware.getMinor int  iVersion  )  [static]
 

Query the minor version from a SignWare version number.

Parameters:
iVersion [i] Signware version
Returns:
int the minor version
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)

static String de.softpro.signware.SPSignware.getVersion int  iModule  )  throws SPSignwareException [static]
 

Query the version of Signware modules.

Parameters:
iModule [i] the module index
Returns:
String Version and load information of the module
Exceptions:
SPSignwareException on error
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)
Example:
 int iModule = 0; 
 int iStatus = 0; 
 try { 
     iStatus = loadedModules(); 
 } catch (SPSignwareException spe) { }
 for(iModule = 0; iModule < SPSignware.moduleCount(); iModule++) { 
     if(iStatus & (1 << iModule) == 0) continue; 
     try {
         String strVersion = SPSignware.getVersion(iModule);
         System.out.println("Signware Module[" + iModule + "]: "  + strVersion);
     } catch (SPSignwareException spe) { }
 }

static synchronized int de.softpro.signware.SPSignware.isInitialized  )  throws SPSignwareException [static, protected]
 

static boolean de.softpro.signware.SPSignware.isLoaded  )  [static]
 

Query if the native Signware modules could be loaded successfully.

A return value true does not imply that additional modules such as compare engines were loaded successfully.

Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)
Returns:
boolean true SignWare was loaded

static int de.softpro.signware.SPSignware.loadedModules  )  throws SPSignwareException [static]
 

Query which modules have been loaded.

There is no flag to indicate if SignWare is loaded. loadedModules() will throw an exception with error code SP_LINKLIBRARYERR if SignWare could not be loaded.

Returns:
int a bit pattern for the loaded modules
Exceptions:
SPSignwareException on error
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)
See also:
SP_GRAPHICLIB_LOADED, SP_AWT_LOADED

static void de.softpro.signware.SPSignware.lprintf int  iLvl,
String  aMsg
[static, package]
 

static void de.softpro.signware.SPSignware.lprintf1 String  aMsg  )  [static, package]
 

static void de.softpro.signware.SPSignware.lprintf2 String  aMsg  )  [static, package]
 

static void de.softpro.signware.SPSignware.lprintf3 String  aMsg  )  [static, package]
 

static void de.softpro.signware.SPSignware.lprintf4 String  aMsg  )  [static, package]
 

static void de.softpro.signware.SPSignware.lprintf5 String  aMsg  )  [static, package]
 

static int de.softpro.signware.SPSignware.makeVersion int  iMajor,
int  iMinor,
int  iBuild
[static]
 

Convert minor, major and built to a SignWare version integer.

Parameters:
iMajor [i] the major version number (range 0 .. 15)
iMinor [i] the minor version number (range 0 .. 255)
iBuild [i] the build version number (range 0 .. 4095)
Returns:
int the version number as an integer
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)

static int de.softpro.signware.SPSignware.moduleCount  )  [static]
 

Query the total number of modules that may be loaded.

Returns:
int the number of modules
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)
See also:
loadedModules

SP_SDK_LOADED, SP_GRAPHICLIB_LOADED, SP_AWT_LOADED

static boolean de.softpro.signware.SPSignware.needTicket  )  throws SPSignwareException [static]
 

Query if the installed license requires Tickets.

You must call setLM (if applicable) before you can query the license type.

Deprecated:
Please use a license key.
Returns:
true the application must create and pass tickets
Exceptions:
SPSignwareException 
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a)

static void de.softpro.signware.SPSignware.openSession int  iUsage,
String  strSession
throws SPSignwareException [static]
 

Inform license manager to open a new session.

This function is reserved for Kofax internal use.

Deprecated:
Please use a license key.
Parameters:
iUsage [i] usage of the ticket (SP_TICKET_LOAD_SIGNWARE etc.)
strSession [i] session identifier, same session id as used in the open call
Exceptions:
SPSignwareException on errors
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a)

static void de.softpro.signware.SPSignware.println String  strMessage  )  [static]
 

Debug output ...

Parameters:
strMessage [i] the message to be printed
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)

static void de.softpro.signware.SPSignware.printStackTrace Throwable  th  )  [static]
 

Debug output ...

Parameters:
th [i] Exception to be printed
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)

static void de.softpro.signware.SPSignware.setLicenseKey byte[]  bKey,
String  sProduct,
String  sVersion,
byte[]  bToken
throws SPSignwareException [static]
 

Initialize the license manager with a license key.

This must be the very first function called in SignWare, else the call will be ignored.

A license key tells the License Manager which actions are allowed. You can use either a license key for SignWare or a license key for SignDoc SDK.

Please contact your Kofax sales representative.

Parameters:
bKey [i] The license key as array of bytes (ASCII or UTF-8).
sProduct [i] Must be null.
sVersion [i] Must be null.
bToken [i] null or the token. Should be null.
Exceptions:
SPSignwareException on errors
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)
See also:
setLM2

static void de.softpro.signware.SPSignware.setLM2 int  uiLmId1,
int  uiLmId2
throws SPSignwareException [static]
 

Initialize the license manager for using a license file.

This must be the very first function called in SignWare, else the call will be ignored.
Applications only need to initialize the license manager if a personalized license is available, else the standard SignWare license is used.

Note:
The standard SignWare license ID is (809213154, 373825325)
Deprecated:
Please use setLicenseKey().
Parameters:
uiLmId1 [i] License ID part1, please contact Kofax for more information
uiLmId2 [i] License ID part2, please contact Kofax for more information
Exceptions:
SPSignwareException on errors
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a)
See also:
setLicenseKey

static void de.softpro.signware.SPSignware.setLogStream java.io.PrintStream  str  )  [static]
 

Set the debug output stream.

Parameters:
str [i] output stream for debug / trace information
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a), Darwin (x86_64)

static void de.softpro.signware.SPSignware.setTicket SPTicket  spTicket  )  throws SPSignwareException [static]
 

Pass a license ticket.

When using network license: you must pass the ticket before you can create any SignWare object (except for SPTicket).

Usage of the ticket:

Deprecated:
Please use a license key.
Parameters:
spTicket [i] a valid and charged ticket
Exceptions:
SPSignwareException 
Operating Systems:
Windows (Win32), Linux (i386), Linux (x86_64), Android (ARMv7a)

static void de.softpro.signware.SPSignware.viewLM java.awt.Component  c,
String  strOptions
throws SPSignwareException [static]
 

display license information

The information displayed should be used when requesting a SignWare license.

Parameters:
c [i] heavy weight component that will be used as a parent of the modal dialog.
strOptions [i] a set of additional string parameters, separated by ';' characters
  • option1 the language identifyer for the dialog
    • de german
    • en english (default)
    • uk english
  • option2 The QT version, or empty if this is not a QT application. Pass the QTVersion as the string returned from QApplication.qVersion()
Exceptions:
SPSignwareException on errors
Operating Systems:
Windows (Win32)
Example:
      // display License information, german, QT 3.3.5
      SPSignware.viewLM(this, "de;3.3.5");
      // display License information, uk english, pure java environemnt
      SPSignware.viewLM(this, "uk");

static void de.softpro.signware.SPSignware.viewLM java.awt.Component  c  )  throws SPSignwareException [static]
 

display license information

The information displayed should be used when requesting a SignWare license.

Parameters:
c [i] heavy weight component that will be used as a parent of the modal dialog.
Exceptions:
SPSignwareException on errors
Operating Systems:
Windows (Win32)


Member Data Documentation

int de.softpro.signware.SPSignware.iJSpLmVersion = 0x0 [static, protected]
 

final int de.softpro.signware.SPSignware.JSDK = 1 [static]
 

Flag Signware native module is loaded.

See also:
isLoaded, isInitialized

final int de.softpro.signware.SPSignware.JSPLM2 = 2 [static]
 

Flag Signware license manager module is loaded.

See also:
isLoaded, isInitialized

java.io.PrintStream de.softpro.signware.SPSignware.logger = null [static, package]
 

debug output stream

final int de.softpro.signware.SPSignware.SP_AWT_LOADED = 0x40 [static]
 

Loaded external library jawt (java awt access).

See also:
loadedModules

final int de.softpro.signware.SPSignware.SP_GRAPHICLIB_LOADED = 0x10 [static]
 

Loaded external image processing library.

See also:
loadedModules

final int de.softpro.signware.SPSignware.SP_SDK_LOADED = 1 [static]
 

Loaded (myself) Library SDK.

See also:
loadedModules


The documentation for this class was generated from the following file: