Page tree
Skip to end of metadata
Go to start of metadata

This examples shows the DXF template, how this template will be displayed in the user interface as an HTML form, and then the XML file which is produced after the user fills out the form and clicks "Save".

On this page:

Why DXF? 

Determine exactly why you need to use DXF. This will determine what file you will need to create or edit.

  1. I am Creating an Application Bundle
    1. If you want to specify properties to be edited by the administrator when your application is installed, you will need to edit the DXF Template stored in config/application-dxf.xml.
  2. I am Creating a Connector 
    1. If you are creating a connector, you will likely need to create a DXF template stored in src/main/resources/dxf/contentSource.xml.
      • This file will be used to specify the properties that are required for every content source which is submitted to your connector.
  3. I want to use DXF for something else 
    1. This is certainly possible, but not well documented at this stage. The entry point will be the DXFMain class (found in aspire-framework), which takes the dxf.xml template plus an XML of your initialization data and produces two JSON objects: one for the template and one for the initialization data. This can then be used by a JavaScript program, dxf.js, found inside aspire-application to display the form to the end user and gather up the resulting XML form data.

The Template

In the template, tags strictly for DXF purposes are prefixed with "dxf:". All other tags are copied to output when the form is submitted.

In the example below, all tags which start with <dxf:...> are special tags which control how the user interface is displayed. The tags <properties> and <managerExternalRDB> and similar are application-specific tags which are used to structure the metadata when the resulting XML data is produced.

Example DXF Template:

<dxf:template version="1.0" xmlns:dxf="">
     <managerExternalRDB display="Use external RDB?" type="boolean">
       <dxf:help>Check this box if the CS Manager should be using an external relational database to hold data for the CS administration user interface. 
				Otherwise, it will use an embedded Apache Derby database inside the CS Manager itself.</dxf:help>
     <managerRDB display="Internal RDB Component Name" type="string" validations="required">
       <dxf:help>The name of the Aspire component to use for the internal database. Should always be CSRDB when using the internal RDB, 
				or CSExternalRDBConnector when using the external RDB.</dxf:help>
     <managerExternalJDBCUrl display="JDBC URL" type="string" validations="required, url" protocols="jdbc">
       <dxf:help>If using an external RDB to hold admin UI information, this is the JDBC URL which identifies the server and database of the server to use. 
				Something like "" for Oracle, "jdbc:mysql://localhost/test" for My SQL, 
				or "jdbc:sqlserver://localhost\SQLEXPRESS:1433" for SQL Server.</dxf:help>
     <managerExternalJDBCDriverJar display="JDBC driver" type="string" validations="required, path">
       <dxf:help>The jar file inside the Aspire distribution which contains the JDBC driver for your external database. 
				This will typically be a file in the lib directory, such as "lib/ojdbc6.jar" (Oracle), 
				"lib/mysql-connector-java.jar" (My SQL), or "lib/sqljdbc4.jar" (SQL Server).</dxf:help>
     <managerExternalJDBCUser display="JDBC user" type="string" validations="required">
       <dxf:help>The user name that will be used to log into the external database, if one is configured.</dxf:help>
     <managerExternalJDBCPassword display="JDBC password" type="password" validations="required">
       <dxf:help>The password that will be used to log into the external database, if one is configured.</dxf:help>
     <debug display="Debug" type="boolean">
       <dxf:help>Turn on debugging. Debug messages will be written to the log files.</dxf:help>

User Interface Form

When shown in a browser, the user interface for the dxf.xml template shown above will look like this:

Note that each ? icon is a tooltip help which will display the contents of the <dxf:help> tag for each input element (admittedly, the help expressed above is not wonderful, it is left as an exercise for the reader to come up with better help text).

XML Output

Once the user has filled out the information in the form and has clicked on "Save", DXF will produce the following XML as output:


Then What Happens?

What happens next depends on the application. If installing a new application, the admin UI will take the XML and write it as properties along with the application to the admin RESTful interface. The properties are then stored in the settings.xml file as part of the application's auto-start properties.

If the DXF is used to configure a content source for a particular connector, the XML is written to a database BLOB. When the content source is then crawled, the XML will be provided to the connector so that it knows what to crawl and has all of the other information (user name, password, include patterns, exclude patterns, etc.) it needs to execute the crawl.

Finally, if the DXF is used to configure an individual Aspire component, then the resulting XML will be sent to the component's component factory, will will shut down the old version of the component and then restart the component with the new configuration.