org.kuali.rice.krad.maintainablexml
Class ConvertMaintainableXML

java.lang.Object
  extended by org.kuali.rice.krad.maintainablexml.ConvertMaintainableXML

public class ConvertMaintainableXML
extends Object

This is a command line utility class which upgrades the maintenance document xml stored in krns_maint_doc_t.doc_cntnt to be able to still open and use any maintenance documents that were enroute at the time of an upgrade to Rice 2.0.

Instructions:

  1. Backup database.
  2. Add the conversion rules to the rules xml file - ..\rice\development-tools\src\main\resources\org\kuali\rice\devtools\krad\maintainablexml\MaintainableXMLUpgradeRules.xml See comments in the xml file to setup the rules.
  3. Run this class. Note that any classes being converted must be on the classpath.
  4. Enter the rice config file location that has the database connection properties. Only enter the location relative to user.dir. NOTE -- If it is uncommented in ConvertMaintainableXML.java, MaintainableXMLConversionConfig.xml in the user.dir will be used as the conversion config file. runmode, fromRange, and toRange can be specified in this file to avoid prompting the user for this information. An example file can be found in ..\rice\development-tools\src\main\resources\org\kuali\rice\devtools\krad\maintainablexml\MaintainableXMLConversionConfig.xml
  5. If it is not specified in the config file, the user will be prompted for a run mode. Mode 1 will do the xml upgrade and update the krns_maint_doc_t table with the new xml. CANNOT ROLL BACK AFTER THIS HAS BEEN DONE. Mode 2 will only print out the old xml and the new xml - this can be used to test the rules xml setup.
  6. If it is not specified in the config file, the user will be prompted for the document number to upgrade from. Enter "all" in the from range prompt to upgrade all documents. Otherwise this should be an starting document ID such as 1000
  7. If it is not specified in the config file and the fromRange is not "all", the user will be prompted for the document number to upgrade to. If "all" was entered for the fromRange, toRange will be ignored. toRange should be a document ID such as 9999

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
ConvertMaintainableXML()
           
 
Method Summary
static HashMap getSettings(String filePath)
          Parses settings file and put the properties in a map.
static boolean isNumber(String string)
           
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvertMaintainableXML

public ConvertMaintainableXML()
Method Detail

main

public static void main(String[] args)

isNumber

public static boolean isNumber(String string)

getSettings

public static HashMap getSettings(String filePath)
                           throws Exception
Parses settings file and put the properties in a map.

Parameters:
filePath - - the location of the settings file
Returns:
a HashMap populated with the settings
Throws:
Exception


Copyright © 2005-2014 The Kuali Foundation. All Rights Reserved.