wt.projmgmt.msproject
Class Importer

java.lang.Object
  extended bywt.projmgmt.msproject.Importer

public class Importer
extends Object

This class imports a ProjectPlan from a Microsoft Project XML file.


Field Summary
private static String PARSER_CLASS
           
private static String RESOURCE
           
 
Constructor Summary
Importer()
           
 
Method Summary
private static void adoptOrphanDeliverables(DeliverableHolder holder)
          If necessary, have the plan "adopt" the deliverables that belong to the specified wt.projmgmt.execution.DeliverableHolder.
 ProjectPlan createPlan(InputSource source, ImportInfo info)
          Create a new ProjectPlan based on the data supplied by the InputSource.
private  XMLReader createXMLReader()
           
private static void deleteExecutionObject(ExecutionObject exObj)
          Delete the specified ExecutionObject.
private static WfContainer deleteProjectNodes(WfContainer c)
          Delete all the project nodes in the specified plan or summary activity.
private static String getLocationString(ContentHandler handler)
          Returns a string of the location of the exception.
private static Throwable getNestedThrowable(Throwable t)
          Extract the embedded Throwable from the supplied Throwable if one exists.
private  MPPPlan parse(InputSource source, ImportInfo info)
           
 WfContainer updatePlan(WfContainer c, InputSource source, ImportInfo info)
          Update the specified ProjectPlan or SummaryActivity using the data supplied by the InputSource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARSER_CLASS

private static final String PARSER_CLASS

RESOURCE

private static String RESOURCE
Constructor Detail

Importer

public Importer()
Method Detail

createPlan

public ProjectPlan createPlan(InputSource source,
                              ImportInfo info)
                       throws WTException,
                              WTPropertyVetoException
Create a new ProjectPlan based on the data supplied by the InputSource.

Throws:
WTException
WTPropertyVetoException

updatePlan

public WfContainer updatePlan(WfContainer c,
                              InputSource source,
                              ImportInfo info)
                       throws WTException,
                              WTPropertyVetoException
Update the specified ProjectPlan or SummaryActivity using the data supplied by the InputSource.

Throws:
WTException
WTPropertyVetoException

createXMLReader

private final XMLReader createXMLReader()
                                 throws SAXException
Throws:
SAXException

parse

private final MPPPlan parse(InputSource source,
                            ImportInfo info)
                     throws WTException
Throws:
WTException

getNestedThrowable

private static final Throwable getNestedThrowable(Throwable t)
Extract the embedded Throwable from the supplied Throwable if one exists. Otherwise, just return the given Throwable.


getLocationString

private static final String getLocationString(ContentHandler handler)
Returns a string of the location of the exception.


deleteProjectNodes

private static final WfContainer deleteProjectNodes(WfContainer c)
                                             throws WTException
Delete all the project nodes in the specified plan or summary activity.

Note: This method does not roll-up or propagate changes. It assumes that these actions will be performed by the caller.

Note: This method uses low-level database access which by-passes access control.

Throws:
WTException

deleteExecutionObject

private static final void deleteExecutionObject(ExecutionObject exObj)
                                         throws WTException
Delete the specified ExecutionObject.

Note: This method does not roll-up or propagate changes. It assumes that these actions will be performed by the caller.

Note: This method uses low-level database access which by-passes access control.

Throws:
WTException

adoptOrphanDeliverables

private static final void adoptOrphanDeliverables(DeliverableHolder holder)
                                           throws WTException
If necessary, have the plan "adopt" the deliverables that belong to the specified wt.projmgmt.execution.DeliverableHolder.

This is a private helper method that is used by deleteExecutionObject(wt.projmgmt.execution.ExecutionObject)

Note: This method uses low-level database access which by-passes access control.

Throws:
WTException