de.maas.afp2web
Class A2WSDK

java.lang.Object
  extended byde.maas.afp2web.A2WSDK

public class A2WSDK
extends java.lang.Object

A native wrapper for AFP2web SDK. AFP2web SDK provides interfaces to convert AFP, TIFF and Line Data spools into web applicable output formats like PDF, JPEG, TIFF etc. Please visit: http://www.oxseed.com to get more information


Method Summary
 int afp2web(java.util.Properties propConfigPar, java.io.ByteArrayInputStream baisInputStreamPar, java.io.ByteArrayOutputStream baosOutputStreamPar)
           Converts 1 input spool (passed as stream) to 1 output document (passed as stream).
 int afp2web(java.util.Properties propConfigPar, java.io.InputStream[] arrInputStreamPar, java.io.InputStream[] arrResourceStreamPar, java.io.InputStream[] arrDocIndexStreamPar, java.io.InputStream[] arrFormDefStreamPar)
           Converts one or N AFP input streams to 1 or N output files based on "FileCreationMode" parameter.
 int afp2web(java.util.Properties propConfigPar, java.io.InputStream[] arrInputStreamPar, java.io.InputStream[] arrResourceStreamPar, java.io.InputStream[] arrDocIndexStreamPar, java.io.InputStream[] arrFormDefStreamPar, A2WDocumentHandler a2wDocumentHandlerPar)
           Converts one or N AFP input streams to 1 or N output documents based on "FileCreationMode" parameter.
 int afp2web(java.util.Properties propConfigPar, java.io.InputStream[] arrInputStreamPar, java.io.InputStream[] arrResourceStreamPar, java.io.InputStream[] arrDocIndexStreamPar, java.io.InputStream[] arrFormDefStreamPar, A2WDocumentWriter a2wDocumentWriterPar)
           Converts one or N AFP input streams to 1 or N output documents based on "FileCreationMode" parameter.
 int afp2web(java.util.Properties propConfigPar, java.lang.String[] sarrFileNameListPar)
           Converts 1 to N input spools (passed as filename list) to 1 to N output files.
 int afp2web(java.util.Properties propConfigPar, java.lang.String[] sarrFileNameListPar, A2WDocumentHandler a2wDocumentHandlerPar)
           Converts 1 to N input spools (passed as filename list) to 1 to N output buffers.
 int afp2web(java.util.Properties propConfigPar, java.lang.String[] sDocumentIdsPar, A2WDocumentReader a2wDocReaderPar, java.io.ByteArrayOutputStream baosOutputStreamPar)
           Converts N input documents to 1 output buffer, Input document will be retrieved using A2WDocumentReader callback implementation by passing in the document id given as parameter to this API, A2WDocumentReader's "read" function is called for each input document id.
 int afp2web(java.util.Properties propConfigPar, java.lang.String[] sDocumentIdsPar, A2WDocumentReader a2wDocReaderPar, java.lang.String sOutputFilenamePar)
           Converts N input documents to 1 output file, Input document will be retrieved using A2WDocumentReader callback implementation by passing in the document id given as parameter to this API, A2WDocumentReader's "read" function is called for each input document id.
 int afp2web(java.util.Properties propConfigPar, java.lang.String[] sarrFileNameListPar, A2WDocumentWriter a2wDocumentWriterPar)
           Converts 1 to N input spools (passed as filename list) to 1 to N output buffers.
 int afp2web(java.util.Properties propConfigPar, java.lang.String[] sarrFileNameListPar, java.io.ByteArrayOutputStream baosOutputStreamPar)
           Converts N input spools (passed as filename list) to 1 output document (passed as stream).
 int createCredit(java.util.Properties propConfigPar, java.lang.String sCreditFilePathPar)
           Creates the Credit file and UCID file
 int displayCredit(java.util.Properties propConfigPar, java.lang.String sCreditFilePathPar)
           Used to display the available credit
 int exportCredit(java.util.Properties propConfigPar, java.lang.String sUCIDFilenamePar)
           Used to move AFP2web installation from one location to another location
 java.lang.String getActiveSpoolname()
          Get active spool name
static A2WSDK getSingleton()
          Returns singleton instance of A2WSDK class, which has to be used to call other methods of A2WSDK class.
 java.lang.String getUniqueSystemId()
          Get Unique System Id
 java.lang.String getUniqueSystemId(java.util.Properties propConfigPar)
           Generates Unique System Id (USID)
 java.lang.String getVersion()
          Get version string of AFP2web SDK
 java.lang.String getVersionAll()
          Get version of all sub components string of AFP2web SDK
 int importCredit(java.util.Properties propConfigPar, java.lang.String sVoucherFilenamePar)
           Import the credit from voucher file to credit file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSingleton

public static A2WSDK getSingleton()
Returns singleton instance of A2WSDK class, which has to be used to call other methods of A2WSDK class.

Returns:
Singleton instance of A2WSDK class


getActiveSpoolname

public java.lang.String getActiveSpoolname()
Get active spool name

Returns:
Active spool name that has been under conversion process. Usefull to generate output filename in document handler callback.

afp2web

public int afp2web(java.util.Properties propConfigPar,
                   java.io.ByteArrayInputStream baisInputStreamPar,
                   java.io.ByteArrayOutputStream baosOutputStreamPar)
            throws A2WException

Converts 1 input spool (passed as stream) to 1 output document (passed as stream). Output format is specified in properties parameter.

Parameters:
propConfigPar - Properties list containing afp2web.ini parameters
baisInputStreamPar - Stream containing input spool data buffer of type java.io.ByteArrayInputStream
baosOutputStreamPar - Stream to receive output document buffer of type java.io.ByteArrayOutputStream

Returns:
  0 on Success
 <0 on Error

 Throws de.maas.afp2web.A2WException in case of error
 
Throws:
A2WException

afp2web

public int afp2web(java.util.Properties propConfigPar,
                   java.lang.String[] sarrFileNameListPar,
                   java.io.ByteArrayOutputStream baosOutputStreamPar)
            throws A2WException

Converts N input spools (passed as filename list) to 1 output document (passed as stream). Output format is specified in properties parameter.

Parameters:
propConfigPar - Properties list containing afp2web.ini parameters of type
sarrFileNameListPar - String Array containing list of filenames
baosOutputStreamPar - Stream to receive output document buffer of type java.io.ByteArrayOutputStream

Returns:
  0 on Success
 <0 on Error

 Throws de.maas.afp2web.A2WException in case of error
 
Throws:
A2WException

afp2web

public int afp2web(java.util.Properties propConfigPar,
                   java.lang.String[] sarrFileNameListPar)
            throws A2WException

Converts 1 to N input spools (passed as filename list) to 1 to N output files. Output format is specified in properties parameter. Setting "MemoryOuptutStream" ini attribute is immaterial to this API.

Parameters:
propConfigPar - Properties list containing afp2web.ini parameters
sarrFileNameListPar - String Array containing list of filenames

Returns:
  0 on Success
 <0 on Error

 Throws de.maas.afp2web.A2WException in case of error

 
Throws:
A2WException

afp2web

public int afp2web(java.util.Properties propConfigPar,
                   java.lang.String[] sarrFileNameListPar,
                   A2WDocumentHandler a2wDocumentHandlerPar)
            throws A2WException

Converts 1 to N input spools (passed as filename list) to 1 to N output buffers. Output format is specified in properties parameter. Document handler's "handle" function is called for each output document with document buffer and index(es) passed as parameters Setting "MemoryOuptutStream" ini attribute is immaterial to this API.

Parameters:
propConfigPar - Properties list containing afp2web.ini parameters
sarrFileNameListPar - String Array containing list of filenames
a2wDocumentHandlerPar - A2WDocumentHandler

Returns:
  0 on Success
 <0 on Error

 Throws de.maas.afp2web.A2WException in case of error

 
Throws:
A2WException

afp2web

public int afp2web(java.util.Properties propConfigPar,
                   java.lang.String[] sarrFileNameListPar,
                   A2WDocumentWriter a2wDocumentWriterPar)
            throws A2WException

Converts 1 to N input spools (passed as filename list) to 1 to N output buffers. Output format is specified in properties parameter. Document writer's "write" function is called for each output document with document buffer, index(es) and user data list passed as parameters Setting "MemoryOuptutStream" ini attribute is immaterial to this API.

Parameters:
propConfigPar - Properties list containing afp2web.ini parameters
sarrFileNameListPar - String Array containing list of filenames
a2wDocumentWriterPar - A2WDocumentWriter

Returns:
  0 on Success
 <0 on Error

 Throws de.maas.afp2web.A2WException in case of error

 
Throws:
A2WException

afp2web

public int afp2web(java.util.Properties propConfigPar,
                   java.io.InputStream[] arrInputStreamPar,
                   java.io.InputStream[] arrResourceStreamPar,
                   java.io.InputStream[] arrDocIndexStreamPar,
                   java.io.InputStream[] arrFormDefStreamPar)
            throws A2WException

Converts one or N AFP input streams to 1 or N output files based on "FileCreationMode" parameter. "FileCreationMode" and "OutputFormat" are specified in properties parameter. Setting "MemoryOuptutStream" ini attribute is immaterial to this API AFP Input Stream given at "N"th index in "arrInputStreamPar" uses resource, document index and formdef streams given at "N"th index of "arrResourceStreamPar", "arrDocIndexStreamPar", "arrFormDefStreamPar" arrays respectively.

Parameters:
propConfigPar - Properties list containing afp2web.ini parameters
arrInputStreamPar - Array of AFP input streams
arrResourceStreamPar - Array of AFP resource streams
arrDocIndexStreamPar - Array of AFP Document index streams
arrFormDefStreamPar - Array of AFP Form Def streams

Returns:
  0 on Success
 <0 on Error

 Throws de.maas.afp2web.A2WException in case of error

 
Throws:
A2WException

afp2web

public int afp2web(java.util.Properties propConfigPar,
                   java.io.InputStream[] arrInputStreamPar,
                   java.io.InputStream[] arrResourceStreamPar,
                   java.io.InputStream[] arrDocIndexStreamPar,
                   java.io.InputStream[] arrFormDefStreamPar,
                   A2WDocumentHandler a2wDocumentHandlerPar)
            throws A2WException

Converts one or N AFP input streams to 1 or N output documents based on "FileCreationMode" parameter. "FileCreationMode" and "OutputFormat" are specified in properties parameter. Setting "MemoryOuptutStream" ini attribute is immaterial to this API Document handler's "handle" function is called for each output document with document buffer and index(es) passed as parameters AFP Input Stream given at "N"th index in "arrInputStreamPar" uses resource, document index and formdef streams given at "N"th index of "arrResourceStreamPar", "arrDocIndexStreamPar", "arrFormDefStreamPar" arrays respectively.

Parameters:
propConfigPar - Properties list containing afp2web.ini parameters
arrInputStreamPar - Array of AFP input streams
arrResourceStreamPar - Array of AFP resource streams
arrDocIndexStreamPar - Array of AFP Document index streams
arrFormDefStreamPar - Array of AFP Form Def streams
a2wDocumentHandlerPar - A2WDocumentHandler

Returns:
  0 on Success
 <0 on Error

 Throws de.maas.afp2web.A2WException in case of error

 
Throws:
A2WException

afp2web

public int afp2web(java.util.Properties propConfigPar,
                   java.io.InputStream[] arrInputStreamPar,
                   java.io.InputStream[] arrResourceStreamPar,
                   java.io.InputStream[] arrDocIndexStreamPar,
                   java.io.InputStream[] arrFormDefStreamPar,
                   A2WDocumentWriter a2wDocumentWriterPar)
            throws A2WException

Converts one or N AFP input streams to 1 or N output documents based on "FileCreationMode" parameter. "FileCreationMode" and "OutputFormat" are specified in properties parameter. Setting "MemoryOuptutStream" ini attribute is immaterial to this API Document writer's "write" function is called for each output document with document buffer, index(es) and user data list passed as parameters AFP Input Stream given at "N"th index in "arrInputStreamPar" uses resource, document index and formdef streams given at "N"th index of "arrResourceStreamPar", "arrDocIndexStreamPar", "arrFormDefStreamPar" arrays respectively.

Parameters:
propConfigPar - Properties list containing afp2web.ini parameters
arrInputStreamPar - Array of AFP input streams
arrResourceStreamPar - Array of AFP resource streams
arrDocIndexStreamPar - Array of AFP Document index streams
arrFormDefStreamPar - Array of AFP Form Def streams
a2wDocumentWriterPar - A2WDocumentWriter

Returns:
  0 on Success
 <0 on Error

 Throws de.maas.afp2web.A2WException in case of error

 
Throws:
A2WException

getUniqueSystemId

public java.lang.String getUniqueSystemId(java.util.Properties propConfigPar)
                                   throws A2WException

Generates Unique System Id (USID)

Parameters:
propConfigPar - Properties list containing afp2web.ini parameters
For Windows OS, MACID(Physical Address of Network Interface Card) property must be set. For other OS propConfigPar can be null.

Returns:
  Returns USID String

 Throws de.maas.afp2web.A2WException in case of error

 
Throws:
A2WException

afp2web

public int afp2web(java.util.Properties propConfigPar,
                   java.lang.String[] sDocumentIdsPar,
                   A2WDocumentReader a2wDocReaderPar,
                   java.lang.String sOutputFilenamePar)
            throws A2WException

Converts N input documents to 1 output file, Input document will be retrieved using A2WDocumentReader callback implementation by passing in the document id given as parameter to this API, A2WDocumentReader's "read" function is called for each input document id. Output format is specified in properties parameter.

Parameters:
propConfigPar - Properties list containing AFP2web INI parameters of type java.util.Properties
sDocumentIdsPar - String Array containing list of Document IDs of type java.lang.String[]
a2wDocReaderPar - A2WDocumentReader of type de.maas.afp2web.A2WDocumentReader
sOutputFilenamePar - File where output document has to be stored of type java.lang.String

Returns:
  0 on Success
 <0 on Error

 Throws de.maas.afp2web.A2WException in case of error
 
Throws:
A2WException

afp2web

public int afp2web(java.util.Properties propConfigPar,
                   java.lang.String[] sDocumentIdsPar,
                   A2WDocumentReader a2wDocReaderPar,
                   java.io.ByteArrayOutputStream baosOutputStreamPar)
            throws A2WException

Converts N input documents to 1 output buffer, Input document will be retrieved using A2WDocumentReader callback implementation by passing in the document id given as parameter to this API, A2WDocumentReader's "read" function is called for each input document id. Output format is specified in properties parameter.

Parameters:
propConfigPar - Properties list containing AFP2web INI parameters of type java.util.Properties
sDocumentIdsPar - String Array containing list of Document IDs of type java.lang.String[]
a2wDocReaderPar - A2WDocumentReader of type de.maas.afp2web.A2WDocumentReader
baosOutputStreamPar - Stream to receive output document buffer of type java.io.ByteArrayOutputStream

Returns:
  0 on Success
 <0 on Error

 Throws de.maas.afp2web.A2WException in case of error
 
Throws:
A2WException

createCredit

public int createCredit(java.util.Properties propConfigPar,
                        java.lang.String sCreditFilePathPar)
                 throws A2WException

Creates the Credit file and UCID file

Parameters:
propConfigPar - Properties list containing AFP2web INI parameters of type java.util.Properties
sCreditFilePathPar - Path to store credit file and UCID file
Returns:
  0 on Success
 <0 on Error

 Throws de.maas.afp2web.A2WException in case of error
 

Throws:
A2WException

importCredit

public int importCredit(java.util.Properties propConfigPar,
                        java.lang.String sVoucherFilenamePar)
                 throws A2WException

Import the credit from voucher file to credit file

Parameters:
propConfigPar - Properties list containing AFP2web INI parameters of type java.util.Properties
sVoucherFilenamePar - Fully qualified voucher filename used to import the credit
Returns:
  0 on Success
 <0 on Error

 Throws de.maas.afp2web.A2WException in case of error
 

Throws:
A2WException

exportCredit

public int exportCredit(java.util.Properties propConfigPar,
                        java.lang.String sUCIDFilenamePar)
                 throws A2WException

Used to move AFP2web installation from one location to another location

Parameters:
propConfigPar - Properties list containing AFP2web INI parameters of type java.util.Properties
sUCIDFilenamePar - Fully qualified UCID filename used to export the credit
Returns:
  0 on Success
 <0 on Error

 Throws de.maas.afp2web.A2WException in case of error
 

Throws:
A2WException

displayCredit

public int displayCredit(java.util.Properties propConfigPar,
                         java.lang.String sCreditFilePathPar)
                  throws A2WException

Used to display the available credit

Parameters:
propConfigPar - Properties list containing AFP2web INI parameters of type java.util.Properties
Returns:
  0 on Success
 <0 on Error

 Throws de.maas.afp2web.A2WException in case of error
 

Throws:
A2WException

getVersion

public java.lang.String getVersion()
Get version string of AFP2web SDK

Returns:
AFP2web SDK version string


getVersionAll

public java.lang.String getVersionAll()
Get version of all sub components string of AFP2web SDK

Returns:
AFP2web SDK version of all sub components string


getUniqueSystemId

public java.lang.String getUniqueSystemId()
Get Unique System Id

Returns:
Unique System Id