com.bigbross.bossa.io
Class EventsXMLHelper

java.lang.Object
  extended bycom.bigbross.bossa.io.EventsXMLHelper

public class EventsXMLHelper
extends Object

This class provides a static method to convert an event list to a XML encoded file.

The XML encoding is as follows:

<events>
  <event>
   <id>open_work_item</id>
   <time>1071696763305</time>
   <attribute id="case_type_id">purchase</attribute>
   <attribute id="resource_id">joedoe</attribute>
   <attribute id="case_id">1</attribute>
   <attribute id="work_item_id">check_price</attribute>
  </event>
 </events>
The events element is used to group a list of events. The event element represents a single event and it is composed by a single id element, a single time element and zero or more attribute elements.

The id element contains the id of the event. The time element contains the time of the event as the number of milliseconds since January 1, 1970, 00:00:00 GMT. Each attribute element represents one attribute mapping of the event.

Author:
BigBross Team

Constructor Summary
EventsXMLHelper()
           
 
Method Summary
static void export(List events, String file)
          Converts the provided event list to a XML file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventsXMLHelper

public EventsXMLHelper()
Method Detail

export

public static void export(List events,
                          String file)
                   throws DataTransferException
Converts the provided event list to a XML file. If the file exists, it will be overwritten.

Parameters:
events - the events to be exported.
file - the name of the file.
Throws:
DataTransferException - if an error happens during the export.


Copyright © 2003,2004 OpenBR Sistemas S/C Ltda.