wt.query.template
Class QMLWTUserMigratorR5ToR6

java.lang.Object
  extended bywt.query.template.QMLWTUserMigratorR5ToR6
All Implemented Interfaces:
Migrator

public class QMLWTUserMigratorR5ToR6
extends Object
implements Migrator


Field Summary
private  String basePath
           
private static XMLSourceFactory factory
           
private  Stylesheet style_sheet
           
 
Constructor Summary
QMLWTUserMigratorR5ToR6()
           
 
Method Summary
private  String getBasePath()
           
private  String getPackageAsPath()
          Turns this class' package into a path terminated with a forward slash.
private  Stylesheet getStyleSheet()
          Loads the stylesheet from the directory that this class is in.
 boolean runMigration(Connection windchillDatabaseConnection, PersistentObjectManager pom, PrintWriter logWriter)
          Run the migration.
private  boolean transformQml(ReportTemplate reportTemplate, XMLSource xmlSource)
           
private  XMLSource validateXML(ReportTemplate reportTemplate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

private static final XMLSourceFactory factory

style_sheet

private Stylesheet style_sheet

basePath

private String basePath
Constructor Detail

QMLWTUserMigratorR5ToR6

public QMLWTUserMigratorR5ToR6()
Method Detail

runMigration

public boolean runMigration(Connection windchillDatabaseConnection,
                            PersistentObjectManager pom,
                            PrintWriter logWriter)
                     throws Throwable
Description copied from interface: Migrator
Run the migration.

Migrators should log all output to the given PrintWriter. This is the log that is created by RunMigrators. It is an autoflush writer.

Migrators should return true if they successfully completed migration and false otherwise. It is the migrator's responsibility to log failure reasons to the log.

Migrators should not concern themselves with committing the work on the connection. The MigratorRunner will commit the connection work after running each Migrator.

Specified by:
runMigration in interface Migrator
Parameters:
windchillDatabaseConnection - an open connection to the Windchill database
pom - a persistent object manager against the Windchill database
logWriter - an autoflush printwriter for logging any and all output
Throws:
Throwable - declared so that migrators can let exceptions contibuting to failure pass out of the method. The migrator runner will handle these by logging them.

validateXML

private XMLSource validateXML(ReportTemplate reportTemplate)

transformQml

private boolean transformQml(ReportTemplate reportTemplate,
                             XMLSource xmlSource)
                      throws WTException
Throws:
WTException

getStyleSheet

private Stylesheet getStyleSheet()
                          throws WTException
Loads the stylesheet from the directory that this class is in.

Returns:
an XMLSource for the stylesheet of the file is found, null if not
Throws:
WTException

getBasePath

private String getBasePath()
                    throws FileNotFoundException,
                           IndexOutOfBoundsException
Throws:
FileNotFoundException
IndexOutOfBoundsException

getPackageAsPath

private String getPackageAsPath()
Turns this class' package into a path terminated with a forward slash.