org.kuali.rice.krad.devtools.maintainablexml
Class FileConverter

java.lang.Object
  extended by org.kuali.rice.krad.devtools.maintainablexml.FileConverter

public class FileConverter
extends Object

Used to upgrade 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.

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

Constructor Summary
FileConverter()
           
 
Method Summary
static DataSource getDataSource(HashMap settingsMap)
          Creates the data source from the settings map
 void processDocumentRow(String docId, String docCntnt, EncryptionService encryptServ, String runMode)
          Called for each row in the processRow method of the spring query.
 void runFileConversion(HashMap settingsMap, String runMode, String fromRange, String toRange, boolean hasRangeParameters)
          Selects all the encrypted xml documents from krns_maint_doc_t, decrypts them, runs the rules to upgrade them, encrypt them and update krns_maint_doc_t with the upgraded xml.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileConverter

public FileConverter()
Method Detail

runFileConversion

public void runFileConversion(HashMap settingsMap,
                              String runMode,
                              String fromRange,
                              String toRange,
                              boolean hasRangeParameters)
                       throws Exception
Selects all the encrypted xml documents from krns_maint_doc_t, decrypts them, runs the rules to upgrade them, encrypt them and update krns_maint_doc_t with the upgraded xml.

Parameters:
settingsMap - - the settings
Throws:
Exception

getDataSource

public static DataSource getDataSource(HashMap settingsMap)
Creates the data source from the settings map

Parameters:
settingsMap - - the settingMap containing the db connection settings
Returns:
the DataSource object

processDocumentRow

public void processDocumentRow(String docId,
                               String docCntnt,
                               EncryptionService encryptServ,
                               String runMode)
Called for each row in the processRow method of the spring query. Upgrades the xml and update the krns_maint_doc_t table.

Parameters:
docId - - the document id string
docCntnt - - the old xml string
encryptServ - - the encryption service used to encrypt/decrypt the xml


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