com.opnworks.timesheet.serializers
Class XmlSerializer

java.lang.Object
  extended bycom.opnworks.timesheet.serializers.XmlSerializer
All Implemented Interfaces:
IHrXmlTimeCard, IXmlSerializer, IXmlTimesheet

public class XmlSerializer
extends java.lang.Object
implements IHrXmlTimeCard, IXmlTimesheet, IXmlSerializer

Description of the Class

Author:
Laurent

Field Summary
 
Fields inherited from interface com.opnworks.timesheet.serializers.IHrXmlTimeCard
ATT_APPROVER_TYPE, ATT_BILLABLE, ATT_ID, ATT_STATUS, ATT_TYPE, DURATION_PREFIX, DURATION_SUFFIX, PERIOD_DATE_FORMAT, TIMECARD_ACTIVITY_TYPE, TIMECARD_ACTIVITY_TYPES, TIMECARD_ADDITIONAL_DATA, TIMECARD_APPROVAL_DATETIME, TIMECARD_APPROVAL_INFO, TIMECARD_AUTHOR, TIMECARD_CHILDREN, TIMECARD_CODE, TIMECARD_COMMENT, TIMECARD_DURATION, TIMECARD_END_DATETIME, TIMECARD_FORMATTED_NAME, TIMECARD_ID, TIMECARD_ID_VALUE, TIMECARD_NAME, TIMECARD_PARTIES, TIMECARD_PARTY, TIMECARD_PERIOD_END_DATE, TIMECARD_PERIOD_START_DATE, TIMECARD_PERSON, TIMECARD_PERSON_NAME, TIMECARD_PROJECT, TIMECARD_PROJECTS, TIMECARD_REPORTED_RESOURCE, TIMECARD_REPORTED_TIME, TIMECARD_ROOT, TIMECARD_SPONSOR, TIMECARD_START_DATETIME, TIMECARD_SUBMITTER_INFO, TIMECARD_TEXT, TIMECARD_TIME_INTERVAL, TIMECARD_TIMESTAMP, TYPE_ACTIVITY, TYPE_COST_CENTER, TYPE_PROJECT
 
Fields inherited from interface com.opnworks.timesheet.serializers.IXmlTimesheet
ADDRESS_1, ADDRESS_2, ATT_ENDDATE, ATT_HOURS, ATT_INDEX, ATT_NAME, ATT_STARTDATE, ATT_VALUE, CITY, COUNTRY, FIRST_NAME, INVOICE_CUSTOMER, INVOICE_LINE_ITEMS, INVOICE_ROOT, NAME, POSTAL_CODE, PROVINCE_STATE, STREET_ADDRESS, TIMESHEET_ACTIVITY_TYPE, TIMESHEET_DAY, TIMESHEET_HOURS, TIMESHEET_LINEITEM, TIMESHEET_NOTE, TIMESHEET_PROJECT, TIMESHEET_SPONSOR, TIMESHEET_STATE, TIMESHEET_WEEK
 
Constructor Summary
XmlSerializer()
           
 
Method Summary
 org.dom4j.Document asDOM(ActivityType[] activityType)
          Description of the Method
 org.dom4j.Document asDOM(Invoice invoice)
          Description of the Method
 org.dom4j.Document asDOM(IParty[] parties)
          Description of the Method
 org.dom4j.Document asDOM(Project[] projects)
          Description of the Method
 org.dom4j.Document asDOM(Timesheet timesheet)
          Description of the Method
 void loadActivityTypes(org.dom4j.Document document)
          Description of the Method
 void loadActivityTypes(org.dom4j.Element root)
          Description of the Method
 void loadProjects(org.dom4j.Document document)
          Description of the Method
 void populateElement(org.dom4j.Element element, IParty party)
          Description of the Method
 void populateElement(org.dom4j.Element element, IPerson person)
          Description of the Method
 void populateElement(org.dom4j.Element element, IStreetAddress address)
          Description of the Method
 void populateElement(org.dom4j.Element element, Project project)
          Description of the Method
static void printDocument(org.dom4j.Document doc, java.io.OutputStream out, java.lang.String aEncodingScheme)
          Description of the Method
static void transform(org.dom4j.Document doc, java.io.OutputStream out, java.io.InputStream xslInput)
           
static void transform(org.w3c.dom.Document doc, java.io.OutputStream out, java.io.InputStream xslInput)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlSerializer

public XmlSerializer()
Method Detail

asDOM

public org.dom4j.Document asDOM(Timesheet timesheet)
                         throws TimesheetException
Description of the Method

Specified by:
asDOM in interface IXmlSerializer
Parameters:
timesheet - Description of Parameter
Returns:
Description of the Returned Value
Throws:
TimesheetException - Description of Exception

asDOM

public org.dom4j.Document asDOM(Invoice invoice)
                         throws TimesheetException
Description of the Method

Specified by:
asDOM in interface IXmlSerializer
Parameters:
invoice - Description of Parameter
Returns:
Description of the Returned Value
Throws:
TimesheetException - Description of Exception

asDOM

public org.dom4j.Document asDOM(IParty[] parties)
                         throws TimesheetException
Description of the Method

Specified by:
asDOM in interface IXmlSerializer
Parameters:
parties - Description of Parameter
Returns:
Description of the Returned Value
Throws:
TimesheetException - Description of Exception

asDOM

public org.dom4j.Document asDOM(Project[] projects)
                         throws TimesheetException
Description of the Method

Specified by:
asDOM in interface IXmlSerializer
Parameters:
projects - Description of Parameter
Returns:
Description of the Returned Value
Throws:
TimesheetException - Description of Exception

populateElement

public void populateElement(org.dom4j.Element element,
                            IParty party)
Description of the Method

Parameters:
element - Description of Parameter
party - Description of Parameter

populateElement

public void populateElement(org.dom4j.Element element,
                            Project project)
Description of the Method

Parameters:
element - Description of Parameter
project - Description of Parameter

populateElement

public void populateElement(org.dom4j.Element element,
                            IPerson person)
Description of the Method

Parameters:
element - Description of Parameter
person - Description of Parameter

populateElement

public void populateElement(org.dom4j.Element element,
                            IStreetAddress address)
Description of the Method

Parameters:
element - Description of Parameter
address - Description of Parameter

asDOM

public org.dom4j.Document asDOM(ActivityType[] activityType)
                         throws TimesheetException
Description of the Method

Specified by:
asDOM in interface IXmlSerializer
Parameters:
activityType - Description of Parameter
Returns:
Description of the Returned Value
Throws:
TimesheetException - Description of Exception

loadActivityTypes

public void loadActivityTypes(org.dom4j.Element root)
                       throws TimesheetException
Description of the Method

Parameters:
root - Description of Parameter
Throws:
TimesheetException - Description of Exception

loadActivityTypes

public void loadActivityTypes(org.dom4j.Document document)
                       throws TimesheetException
Description of the Method

Specified by:
loadActivityTypes in interface IXmlSerializer
Parameters:
document - Description of Parameter
Throws:
TimesheetException - Description of Exception

loadProjects

public void loadProjects(org.dom4j.Document document)
                  throws TimesheetException
Description of the Method

Specified by:
loadProjects in interface IXmlSerializer
Parameters:
document - Description of Parameter
Throws:
TimesheetException - Description of Exception

printDocument

public static void printDocument(org.dom4j.Document doc,
                                 java.io.OutputStream out,
                                 java.lang.String aEncodingScheme)
                          throws java.io.IOException
Description of the Method

Parameters:
doc - Description of Parameter
out - Description of Parameter
aEncodingScheme - Description of Parameter
Throws:
java.io.IOException - Description of Exception

transform

public static void transform(org.dom4j.Document doc,
                             java.io.OutputStream out,
                             java.io.InputStream xslInput)
                      throws java.io.IOException
Parameters:
doc -
out -
xslInput -
Throws:
java.io.IOException

transform

public static void transform(org.w3c.dom.Document doc,
                             java.io.OutputStream out,
                             java.io.InputStream xslInput)
                      throws java.io.IOException
Parameters:
doc -
out -
xslInput -
Throws:
java.io.IOException