org.jbind.xml.facade
Class ApplicationCode

java.lang.Object
  extended byorg.jbind.xml.facade.XmlCode
      extended byorg.jbind.xml.facade.ConfigurationCode
          extended byorg.jbind.xml.facade.ApplicationCode
All Implemented Interfaces:
IApplicationCode, IConfigurationCode, IXmlCode

public class ApplicationCode
extends ConfigurationCode
implements IApplicationCode


Nested Class Summary
 
Nested classes inherited from class org.jbind.xml.facade.ConfigurationCode
ConfigurationCode.SetupVisitor, ConfigurationCode.TearDownVisitor
 
Constructor Summary
ApplicationCode(org.xml.sax.InputSource anInputSource, IDataContext aDataContext)
           
ApplicationCode(java.net.URL aUrl, IDataContext aDataContext)
           
 
Method Summary
protected  int doExecuteApplication(IApplication anApplication)
          Hook method for executing the application.
 int execute()
          Executes the application.
 IApplication getApplication()
          Gets the application.
static void main(java.lang.String[] anArgs)
          Executes an XML application.
 
Methods inherited from class org.jbind.xml.facade.ConfigurationCode
getConfiguration, setup, tearDown
 
Methods inherited from class org.jbind.xml.facade.XmlCode
getCode, getUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jbind.xml.code.IXmlCode
getCode, getUrl
 

Constructor Detail

ApplicationCode

public ApplicationCode(java.net.URL aUrl,
                       IDataContext aDataContext)

ApplicationCode

public ApplicationCode(org.xml.sax.InputSource anInputSource,
                       IDataContext aDataContext)
Method Detail

getApplication

public IApplication getApplication()
                            throws XmlException
Description copied from interface: IApplicationCode
Gets the application.

Specified by:
getApplication in interface IApplicationCode
Returns:
(required).
Throws:
XmlException - Raised if the application could not be instantiated properly.

execute

public int execute()
            throws XmlException
Description copied from interface: IApplicationCode
Executes the application. The excecution consists of the following steps:
  1. Setup the application.
  2. Execute the application.
  3. Tear down the application.

Specified by:
execute in interface IApplicationCode
Returns:
Returns the return code that the application returned from its execute method (cf. IApplication.execute()).
Throws:
XmlException - Raised if the application could not be instantiated properly.

doExecuteApplication

protected int doExecuteApplication(IApplication anApplication)
Hook method for executing the application. The default implementation simply calls the execute method of the application.

Returns:
The error code returned by the execute method of the application.

main

public static void main(java.lang.String[] anArgs)
Executes an XML application.

Parameters:
anArgs - (required). The recognized arguments are:
  • -url (url of an XML instance document that contains an application)