msi.web.client
Class MsiAppOriginator

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by msi.web.client.MsiAppOriginator
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class MsiAppOriginator
extends org.xml.sax.helpers.DefaultHandler

This is the super xml object that takes an xml document as input and then creates and application record. The xml document can contain the following IN ORDER:
1) One Customer record
2) Multiple (Co)Lessee records
3) Multiple Guarantor records
4) One Vendor record
5) One Broker record
6) One Application record
7) One Asset Delete record
8) Multiple Asset records
9) One Insurance record
10) Multiple UDF records
11) One Notebook record

Author:
Joseph Acosta Copyright by MSI - Nov 22, 2004

Constructor Summary
MsiAppOriginator()
           
 
Method Summary
 java.lang.String batchApplication(java.lang.String applicationNumber, boolean pendingAssetsOnly, boolean disburseChecks)
           
 void characters(char[] ch, int start, int length)
           
 java.lang.String createAppAsUserRetMsg(java.lang.String username, java.lang.String pwd, java.lang.String xmlDocument, boolean addOnly)
          Call this when you want to add or update using a specific user name.
 boolean createApplication(java.lang.String xmlDocument, boolean addOnly)
          Call this when you want to update or add using the API username and password.
 boolean createApplicationAsUser(java.lang.String username, java.lang.String pwd, java.lang.String xmlDocument, boolean addOnly)
          Call this when you want to add or update using a specific user name.
 java.lang.String createAppRetMsg(java.lang.String xmlDocument, boolean addOnly)
          Call this when you want to update or add using the API username and password.
 boolean deleteAssets(java.lang.String applicationNumber)
           
 boolean deleteAssetsAsUser(java.lang.String username, java.lang.String pwd, java.lang.String applicationNumber)
           
 void endDocument()
           
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
           
 java.lang.String getMessages()
          This gets the message that occured during the transaction.
 java.lang.String getMessages(java.lang.String xsltFileName)
          This returns the messages in a proper XML with each message divided into <RECORD>, <KEY> and <MESSAGE> subelements.
 void startDocument()
           
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MsiAppOriginator

public MsiAppOriginator()
Method Detail

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Specified by:
startDocument in interface org.xml.sax.ContentHandler
Overrides:
startDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Specified by:
endDocument in interface org.xml.sax.ContentHandler
Overrides:
endDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

createApplication

public boolean createApplication(java.lang.String xmlDocument,
                                 boolean addOnly)
                          throws java.rmi.RemoteException
Call this when you want to update or add using the API username and password.

Parameters:
xmlDocument - - super massive xml document
addOnly - - weather or not you only want to add this document or also allow updates
Returns:
boolean - true on success or false on fail.
Throws:
java.rmi.RemoteException

createApplicationAsUser

public boolean createApplicationAsUser(java.lang.String username,
                                       java.lang.String pwd,
                                       java.lang.String xmlDocument,
                                       boolean addOnly)
                                throws java.rmi.RemoteException
Call this when you want to add or update using a specific user name.

Parameters:
username - - username
pwd - - leasepak pretty password
xmlDocument - - super massive xml document
addOnly - - weather or not you only want to add this document or also allow updates
Returns:
boolean - true on success or false on fail.
Throws:
java.rmi.RemoteException

createAppRetMsg

public java.lang.String createAppRetMsg(java.lang.String xmlDocument,
                                        boolean addOnly)
                                 throws java.rmi.RemoteException
Call this when you want to update or add using the API username and password. This is a single synchronous, stateless API call. No session needs to be sent or stored.

Parameters:
xmlDocument - - super massive xml document
addOnly - - weather or not you only want to add this document or also allow updates
Returns:
String - same as getMessages().
Throws:
java.rmi.RemoteException

createAppAsUserRetMsg

public java.lang.String createAppAsUserRetMsg(java.lang.String username,
                                              java.lang.String pwd,
                                              java.lang.String xmlDocument,
                                              boolean addOnly)
                                       throws java.rmi.RemoteException
Call this when you want to add or update using a specific user name. This is a single synchronous, stateless API call. No session needs to be sent or stored.

Parameters:
username - - username
pwd - - leasepak pretty password
xmlDocument - - super massive xml document
addOnly - - weather or not you only want to add this document or also allow updates
Returns:
String - same as getMessages().
Throws:
java.rmi.RemoteException

getMessages

public java.lang.String getMessages()
                             throws java.rmi.RemoteException
This gets the message that occured during the transaction. There are 2 elements in the resulting xml document:
1) INFO - this contains an informational message
2) ERROR - this contains an error message.
There will be only one ERROR message in an xml document, but possibly many INFO messages.
 
<!ELEMENT MSI_APP_ORIG_MSGS (INFO+, ERROR?)>
<!ELEMENT INFO (#PCDATA)>
<!ELEMENT ERROR (#PCDATA)>

Returns:
xml document containing the messages.
Throws:
java.rmi.RemoteException

getMessages

public java.lang.String getMessages(java.lang.String xsltFileName)
                             throws java.rmi.RemoteException
This returns the messages in a proper XML with each message divided into <RECORD>, <KEY> and <MESSAGE> subelements. This allows greater control over the presentation of these messages.

Returns:
xml document containing the messages.
Throws:
java.rmi.RemoteException

deleteAssets

public boolean deleteAssets(java.lang.String applicationNumber)
                     throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

deleteAssetsAsUser

public boolean deleteAssetsAsUser(java.lang.String username,
                                  java.lang.String pwd,
                                  java.lang.String applicationNumber)
                           throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

batchApplication

public java.lang.String batchApplication(java.lang.String applicationNumber,
                                         boolean pendingAssetsOnly,
                                         boolean disburseChecks)
                                  throws java.rmi.RemoteException
Parameters:
applicationNumber -
pendingAssetsOnly -
disburseChecks -
Returns:
Throws:
java.lang.Exception
java.rmi.RemoteException


© 2009 by McCue Systems Incorporated.

All rights reserved.The information contained in this document is the property of McCue Systems, Inc. Use of the information contained herein is restricted. Conditions of use are subject to change without notice. McCue Systems, Inc. assumes no liability for any inaccuracy that may appear in this document; the contents of this document do not constitute a promise or warranty. The software described in this document is furnished under license and may be used or copied only in accordance with the terms of said license. Unauthorized use, alteration, or reproduction of this document without the written consent of McCue Systems, Inc. is prohibited.