MsiAppOriginatorDocLit allows you to load XML-format Client, Application, Asset, Insurance, Notebook, and User Defined Fields information into the LeasePak database. It also enables you to delete pending assets.
The Supported Fields document lists the fields (and their LeasePak database column equivalents) you can use with MsiAppOriginatorDocLit.
If you need additional information, Sun Microsystems maintains a Java developers' site at http://java.sun.com that includes API specifications, sample code and applications, and technical articles and tips.
MsiAppOriginatorDocLit contains only one method, createApplicationDocLit
. For more information on this method, refer to
the Java Call Reference.
<localAddUpdate>true</localAddUpdate>
. This allows for greater control of which
records get updated.
The method throws java.rmi.RemoteException
.
The available XML child elements within MSI_APP_ORIG are:
CUSTOMER_RECORD (none required, only 1 allowed) LESSEE_RECORD (at least one required, many allowed) GUARANTOR_RECORD (none required, many allowed) VENDOR_RECORD (none required, many allowed) BROKER_RECORD (none required, many allowed) APPLICATION_RECORD (none required, only 1 allowed) ASSET_DELETE (none required, only 1 allowed) ASSET_RECORD (none required, many allowed) INSURANCE_RECORD (none required, only 1 allowed) NOTEBOOK_RECORD (none required, only 1 allowed) UDF_FIELDS_RECORD (none required, many allowed)
Child elements are processed in the order specified above: all Customer elements first, then all Lessee elements, etc. If processing a child element results in an error or exception, no adds or updates are made for that element, and no further processing of child elements within the parent MSI_APP_ORIG element occurs.
Any of the above child elements (with the exception of ASSET_DELETE
--see below) can contain the localAddOnly
element when needed. For example:
<LESSEE_RECORD> <localAddOnly>boolean</localAddOnly> </LESSEE_RECORD>
where boolean is either 'true' or 'false'. If 'true', the LeasePak record will only be added if the corresponding key
number does not already exist. If 'false', LeasePak will either add a record to the database or update an existing record with a matching
key number. If you do not include a localAddOnly
element, the default behavior is 'true'.
Use this child element to delete all pending assets from an application:
<ASSET_DELETE> <appNumber>application_number</appNumber> </ASSET_DELETE>
where application_number is the application for which you wish to delete all pending assets.
Data within the xmlDocument string must meet the following requirements:
<appNumber></appNumber>
in the XML string will throw an error;String xml = new String(); // where xml is the XML document (as a String) containing the records you wish to add to LeasePak StringBuffer data = new StringBuffer(); BufferedReader reader = new BufferedReader(new StringReader(xml)); String res = reader.readLine(); while ( res != null ) { data.append(res.trim()); res = reader.readLine(); }