public class SchemaUpgrade extends Object implements ActionQueueListener, IfsParameters
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULTS_SECTION_KEY
Key used in the SchemaUpgrade configuration file.
|
static String |
MAX_SCHEMA_VERSION_KEY
Key used in the SchemaUpgrade configuration file.
|
static String |
MIN_SCHEMA_VERSION_KEY
Key used in the SchemaUpgrade configuration file.
|
static String |
OUTCOME_SCHEMA_VERSION_KEY
Key used in the SchemaUpgrade configuration file.
|
static int |
SIGNIFICANT_SCHEMA_VERSION_COMPONENTS
The number of version components that will be considered significant in
determining the schema version.
|
static String |
SKIP_IF_NO_CONTEXT
Key used in the SchemaUpgrade configuration file.
|
static String |
SKIP_IF_NO_PARTITIONING
Key used in the SchemaUpgrade configuration file.
|
static SymbolType |
SYMBOL_TYPE
The SymbolType used to denote variables in the SchemaUpgrade
configuration file that should be replaced with values.
|
static String |
TASKS_KEY
Key used in the SchemaUpgrade configuration file.
|
static String |
TEST_MODE_KEY
Key used in the SchemaUpgrade configuration file.
|
static String |
UPGRADE_KEY
Key used in the SchemaUpgrade configuration file.
|
static int |
UPGRADE_TASK_START_VALUE
The starting value that will be used to keep track of upgrade tasks
that have been attempted.
|
static int |
UPGRADE_TASK_VERSION_COMPONENT
The version components that will be used to determine the current task.
|
APPEND_LOG, DATABASE_TYPE, DATABASE_URL, DB_USER_NAME, DB_USER_PASSWORD, DOMAIN_TYPE, ENABLE_SSL_SUPPORT, FOR_SCHEMA_UPGRADE, IFS_DOMAIN_DISPLAY_NAME, IFS_DOMAIN_NAME, IFS_SCHEMA_NAME, IFS_SCHEMA_PASSWORD, IFS_SERVICE_NAME, IFS_USER_NAME, IFS_USER_PASSWORD, INCLUDE_PATH, INITIAL_CONTEXT_FACTORY, LDAP_URL_DAS_LOOKUP, LDAP_USER_NAME, LDAP_USER_PASSWORD, OUTPUT_FILE, PARAMETER_FILE, REGISTRY, SCHEMA_VERSION_KEY, SECURITY_PROTOCOL_NAME, SERVICE_CONFIGURATION_NAME
Constructor and Description |
---|
SchemaUpgrade(String parameterfile)
Creates a new SchemaUpgrade given a configuration file.
|
Modifier and Type | Method and Description |
---|---|
void |
actionFinished(Action action)
Invoked when an Action has finished successfully.
|
void |
actionQueueFailed(Throwable t)
Invoked if the ActionQueue has failed.
|
void |
actionQueueFinished()
Invoked when the ActionQueue has finished.
|
void |
actionStarting(Action action)
Invoked when an Action is about to be performed.
|
void |
addSettings(oracle.ifs.admin.config.Settings settings)
Copies the properties from the given Settings object
into this instance's options table.
|
AbstractAction |
generateUpgradeAction()
Generates a QueueAction that contains all the Actions necessary
for a schema upgrade.
|
Object |
getValue(String key)
Returns the value bound to the given variable.
|
static void |
main(String[] args)
Executes a schema upgrade given commandline arguments.
|
void |
performUpgrade()
Performs the schema upgrade in an ActionQueue.
|
void |
putValue(String key,
Object value)
Adds a variable/value pair to the options table.
|
void |
setOptions(Hashtable options)
Replaces this instance's options table with the given Hashtable object.
|
public static final SymbolType SYMBOL_TYPE
public static final int UPGRADE_TASK_VERSION_COMPONENT
public static final int UPGRADE_TASK_START_VALUE
50
; the maximum task
number is 99
.public static final int SIGNIFICANT_SCHEMA_VERSION_COMPONENTS
public static final String UPGRADE_KEY
public static final String MIN_SCHEMA_VERSION_KEY
public static final String MAX_SCHEMA_VERSION_KEY
public static final String OUTCOME_SCHEMA_VERSION_KEY
public static final String TASKS_KEY
public static final String DEFAULTS_SECTION_KEY
public static final String TEST_MODE_KEY
public static final String SKIP_IF_NO_CONTEXT
public static final String SKIP_IF_NO_PARTITIONING
public SchemaUpgrade(String parameterfile)
parameterfile
- the path to a ParameterTable configuration file
which describes the schema upgrade.public static void main(String[] args)
args
- commandline arguments:
public void addSettings(oracle.ifs.admin.config.Settings settings)
settings
- the Settings object to use.public void setOptions(Hashtable options)
options
- the Hashtable object to use.public void putValue(String key, Object value)
key
- the name of the variable.value
- the value of the variable.NullPointerException
- if value
is null.public Object getValue(String key)
key
- the name of the variable.public AbstractAction generateUpgradeAction() throws InstantiationException, IllegalAccessException, IfsException, ClassNotFoundException, SQLException, ActionFailedException
The schema to upgrade can be specified in the configuration file, and can be overridden by using the setOption method.
InstantiationException
IllegalAccessException
IfsException
ClassNotFoundException
SQLException
ActionFailedException
public void performUpgrade()
The "outputfile" parameter specified in the configuration file will be used for logging output. The "AppendLog" parameter will be used to determine whether the log file should be appended to or not.
Note: this method blocks until the upgrade has finished or failed.
public void actionQueueFinished()
ActionQueueListener
perform
method has returned successfully.actionQueueFinished
in interface ActionQueueListener
public void actionQueueFailed(Throwable t)
ActionQueueListener
actionQueueFailed
in interface ActionQueueListener
t
- the error that occurred (usually an ActionFailedException).public void actionStarting(Action action)
ActionQueueListener
actionStarting
in interface ActionQueueListener
action
- the Action that will be performed.public void actionFinished(Action action)
ActionQueueListener
actionFinished
in interface ActionQueueListener
action
- the Action that has finished.Copyright © 2023. All rights reserved.