Package com.ibm.di.migam
Class MigrateAmConfig
- java.lang.Object
-
- com.ibm.di.migration.BaseMigrationUtility
-
- com.ibm.di.migam.MigrateAmConfig
-
public class MigrateAmConfig extends BaseMigrationUtility
The MigrateAmConfig class is a small program that will migrate any am.properties file from 6.0, 6.1, 6.1.1, or 7.0 to 7.1. See the main method for information of valid parameters that can be passed into the command. The program relies on the icu4j library for globalization. It relies on log4j for logging.
-
-
Field Summary
-
Fields inherited from class com.ibm.di.migration.BaseMigrationUtility
SWITCH_HELP, SWITCH_MIG_FILE, SWITCH_MIG_FILE_BAKUP, SWITCH_MIG_FILE_NEW, SWITCH_VERBOSE
-
-
Constructor Summary
Constructors Constructor Description MigrateAmConfig(java.lang.String[] args, org.apache.log4j.Logger log)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<ChangeDescription>defineChanges(java.util.Map<java.lang.String,java.lang.String> props)Defines the changes that will be done over the properties of the source file.protected voidinterpretCommandLineOptions()Called to parse the passed command line arguments.static voidmain(java.lang.String[] args)The main method of the Migrate Global Properties Command.protected voidparseArgs(java.lang.String[] args)Parses the command line arguments by fillingBaseMigrationUtility.commandLineOptionsandBaseMigrationUtility.commandValuesListstructures.protected voidprintHelpInformation()Called to print the help information to the stdOut.voidsetTdiDir(java.lang.String tdiDir)Sets TDI installation folder.protected voidvalidateCommandLineOptions()Called to check whether the parsed arguments are valid enough for the migration utility to continue.-
Methods inherited from class com.ibm.di.migration.BaseMigrationUtility
applyChanges, backupFile, getCommandStandaloneValuesList, getCommandValueBySwitch, getLog, isHelpRequested, isSwitch, isVerboseMode, migrateFile, parseFile, parseFile, performPropertyAddition, performPropertyCommenting, performPropertyDeletion, performPropertyModification, performPropertyUncommenting, readFile, setLog, writeFile
-
-
-
-
Method Detail
-
setTdiDir
public void setTdiDir(java.lang.String tdiDir)
Sets TDI installation folder.- Parameters:
tdiDir-
-
parseArgs
protected void parseArgs(java.lang.String[] args)
Description copied from class:BaseMigrationUtilityParses the command line arguments by fillingBaseMigrationUtility.commandLineOptionsandBaseMigrationUtility.commandValuesListstructures.- Overrides:
parseArgsin classBaseMigrationUtility- Parameters:
args- the array of all the command line arguments.
-
interpretCommandLineOptions
protected void interpretCommandLineOptions()
Description copied from class:BaseMigrationUtilityCalled to parse the passed command line arguments.
The default implementation is to get the values of the common switches:BaseMigrationUtility.SWITCH_HELP,BaseMigrationUtility.SWITCH_MIG_FILE_BAKUP,BaseMigrationUtility.SWITCH_MIG_FILE_NEW,BaseMigrationUtility.SWITCH_MIG_FILEandBaseMigrationUtility.SWITCH_VERBOSE
TheBaseMigrationUtility.SWITCH_HELPis checked first, if it is specified then the rest of the common switches will not be considered.- Overrides:
interpretCommandLineOptionsin classBaseMigrationUtility
-
defineChanges
protected java.util.List<ChangeDescription> defineChanges(java.util.Map<java.lang.String,java.lang.String> props)
Description copied from class:BaseMigrationUtilityDefines the changes that will be done over the properties of the source file.- Specified by:
defineChangesin classBaseMigrationUtility- Parameters:
props- theMapof properties read from the source file. Note this is an immutable representation of the map.- Returns:
- a
Mapdefining the changes that will be done. The keys of this map represent the names of the properties. The corresponding values describe the particular changes that should be done done over the specific property. Must not benull - See Also:
ChangeDescription
-
printHelpInformation
protected void printHelpInformation()
Description copied from class:BaseMigrationUtilityCalled to print the help information to the stdOut.- Overrides:
printHelpInformationin classBaseMigrationUtility
-
validateCommandLineOptions
protected void validateCommandLineOptions()
Description copied from class:BaseMigrationUtilityCalled to check whether the parsed arguments are valid enough for the migration utility to continue. If an invalid argument is found anIllegalArgumentExceptionshould be thrown.
The default implementation checks the validity of the common command line parameters - file names, existence, permissions, etc.- Overrides:
validateCommandLineOptionsin classBaseMigrationUtility
-
main
public static void main(java.lang.String[] args)
The main method of the Migrate Global Properties Command. The command exits with a 0 if it completes successfully. If the command failes it exits with a -1.- Parameters:
args- The arguments passed into the command. Valid arguments are:
-
-