org.apache.jetspeed.tools.migration
Interface JetspeedMigration


public interface JetspeedMigration

Jetspeed Migration interface.

Version:
$Id$
Author:
Randy Watler

Nested Class Summary
static class JetspeedMigration.Static
          Static utility functions class.
 
Field Summary
static int FETCH_SIZE
           
static int JETSPEED_SCHEMA_VERSION_2_1_3
           
static int JETSPEED_SCHEMA_VERSION_2_1_4
           
static int JETSPEED_SCHEMA_VERSION_2_2_0
           
static int JETSPEED_SCHEMA_VERSION_2_2_1
           
static int JETSPEED_SCHEMA_VERSION_UNKNOWN
           
static java.util.Map<java.lang.String,java.lang.String> LAYOUT_DECORATOR_2_1_X_TO_2_2_X_MIGRATION_MAP
           
static java.util.Map<java.lang.String,java.lang.String> PORTLET_DECORATOR_2_1_X_TO_2_2_X_MIGRATION_MAP
           
static java.util.Map<java.lang.String,java.lang.String> PORTLET_NAME_2_1_X_TO_2_2_X_MIGRATION_MAP
           
 
Method Summary
 int detectSourceVersion(java.sql.Connection sourceConnection, int sourceVersion)
          Detect Jetspeed schema version of source database.
 java.lang.String getName()
          Get migration name.
 JetspeedMigrationResult migrate(java.sql.Connection sourceConnection, int sourceVersion, java.sql.Connection targetConnection, JetspeedMigrationListener migrationListener)
          Migrate data from source to target database.
 

Field Detail

FETCH_SIZE

static final int FETCH_SIZE
See Also:
Constant Field Values

JETSPEED_SCHEMA_VERSION_UNKNOWN

static final int JETSPEED_SCHEMA_VERSION_UNKNOWN
See Also:
Constant Field Values

JETSPEED_SCHEMA_VERSION_2_1_3

static final int JETSPEED_SCHEMA_VERSION_2_1_3
See Also:
Constant Field Values

JETSPEED_SCHEMA_VERSION_2_1_4

static final int JETSPEED_SCHEMA_VERSION_2_1_4
See Also:
Constant Field Values

JETSPEED_SCHEMA_VERSION_2_2_0

static final int JETSPEED_SCHEMA_VERSION_2_2_0
See Also:
Constant Field Values

JETSPEED_SCHEMA_VERSION_2_2_1

static final int JETSPEED_SCHEMA_VERSION_2_2_1
See Also:
Constant Field Values

PORTLET_NAME_2_1_X_TO_2_2_X_MIGRATION_MAP

static final java.util.Map<java.lang.String,java.lang.String> PORTLET_NAME_2_1_X_TO_2_2_X_MIGRATION_MAP

LAYOUT_DECORATOR_2_1_X_TO_2_2_X_MIGRATION_MAP

static final java.util.Map<java.lang.String,java.lang.String> LAYOUT_DECORATOR_2_1_X_TO_2_2_X_MIGRATION_MAP

PORTLET_DECORATOR_2_1_X_TO_2_2_X_MIGRATION_MAP

static final java.util.Map<java.lang.String,java.lang.String> PORTLET_DECORATOR_2_1_X_TO_2_2_X_MIGRATION_MAP
Method Detail

getName

java.lang.String getName()
Get migration name.

Returns:
name

detectSourceVersion

int detectSourceVersion(java.sql.Connection sourceConnection,
                        int sourceVersion)
                        throws java.sql.SQLException
Detect Jetspeed schema version of source database.

Parameters:
sourceConnection - connection to source database
sourceVersion - detected minimal source schema version
Returns:
new version detected
Throws:
java.sql.SQLException - on SQL error or version incompatibility

migrate

JetspeedMigrationResult migrate(java.sql.Connection sourceConnection,
                                int sourceVersion,
                                java.sql.Connection targetConnection,
                                JetspeedMigrationListener migrationListener)
                                throws java.sql.SQLException
Migrate data from source to target database.

Parameters:
sourceConnection - connection to source database
sourceVersion - source version
targetConnection - connection to target database
migrationListener - migration listener
Returns:
migration result
Throws:
java.sql.SQLException - on SQL error or version incompatibility


Copyright © 1999-2011 The Apache Software Foundation. All Rights Reserved.