Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.ide.migration
Class MigrationInfo

java.lang.Object
  extended by oracle.ide.migration.MigrationInfo

public abstract class MigrationInfo
extends java.lang.Object

Version of information about a node requiring migration. Information contained includes the node itself, the current and actual document versions, and the vesion and migration status.


Nested Class Summary
static class MigrationInfo.ErrorInformation
           
static class MigrationInfo.MigrationStatus
          Status class used to define the outer class migration status enums.
static class MigrationInfo.Status
          Base status class.
static class MigrationInfo.VersionStatus
          Status class used to define the outer class version status enums.
 
Field Summary
static java.lang.String EARLIEST_VERSION
          Version number that predates all migrators, indicating that all migrators must run.
static MigrationInfo.MigrationStatus MIGRATION_CANCELED
          Migration status indicating the migration of the node was canceled by the user.
static MigrationInfo.MigrationStatus MIGRATION_DONE
          Migration status indicating the node associated with this migration information was carried out successfully.
static MigrationInfo.MigrationStatus MIGRATION_DONE_BUT_NOT_SAVED
          Migration status indicating the node was migrated successfully but the migration changes were not saved.
static MigrationInfo.MigrationStatus MIGRATION_ERROR
          Migration status indicating the migration of the node was not carried out properly.
static MigrationInfo.MigrationStatus MIGRATION_IO_ERROR
          Migration status indicating that the node associated with this migration information could not be written to.
static MigrationInfo.MigrationStatus MIGRATION_NOT_NEEDED
          Migration status indicating the migration of the node was not needed.
static MigrationInfo.MigrationStatus MIGRATION_NOT_POSSIBLE
          Migration status indicating the migration of the node was not carried out.
static MigrationInfo.MigrationStatus MIGRATION_PENDING
          Migration status indicating the node is ready for migration.
static java.lang.String POST_1013
          Catch-all version number for all post 10.1.3 versions.
static MigrationInfo.VersionStatus VERSION_CURRENT
          Vesion status indicating the node version is the same as the current node version.
static MigrationInfo.VersionStatus VERSION_NEWER
          Vesion status indicating the node version is newer that the current node version.
static MigrationInfo.VersionStatus VERSION_OLDER
          Vesion status indicating the node version is older that the current node version.
static MigrationInfo.VersionStatus VERSION_UNKNOWN
          Vesion status indicating the node version could not be determined.
 
Constructor Summary
protected MigrationInfo(Node node)
          Constructor.
 
Method Summary
 void addError(MigrationInfo.ErrorInformation errorInfo)
           
protected abstract  void ensureVersionInfo()
          Figure out the version information.
 java.util.Iterator<MigrationInfo.ErrorInformation> getErrors()
           
 NodeMigratorHelperReference[] getHelperReferences()
          Returns references to relevant NodeMigratorHelpers.
 NodeMigratorHelper[] getHelpers()
          Deprecated. use #getHelperReferences()
 MigrationInfo.MigrationStatus getMigrationStatus()
          Get the migration status.
 MigrationInfo.MigrationStatus getMigrationStatusDirectly()
           
 Node getNode()
          Get the Node being migrated.
 java.lang.String getVersion()
          Get the node's file format version stored in the document pointed to by the node's url.
 java.lang.String getVersionDirectly()
           
protected static java.lang.String getVersionFromNamespaceURI(java.lang.String namespaceURI)
           
 MigrationInfo.Status getVersionStatus()
          Get the version status.
 MigrationInfo.Status getVersionStatusDirectly()
           
 boolean hasErrors()
           
 java.lang.Boolean isVersionPost1013()
           
 void setMigrationStatus(MigrationInfo.MigrationStatus status)
          Set the migration status.
protected  void setVersionDirectly(java.lang.String version)
           
protected  void setVersionStatusDirectly(MigrationInfo.VersionStatus versionStatus)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EARLIEST_VERSION

public static final java.lang.String EARLIEST_VERSION
Version number that predates all migrators, indicating that all migrators must run.

See Also:
Constant Field Values

POST_1013

public static final java.lang.String POST_1013
Catch-all version number for all post 10.1.3 versions. 10.1.3 and up do not have these global version numbers recorded in XML namespace.

See Also:
Constant Field Values

MIGRATION_IO_ERROR

public static final MigrationInfo.MigrationStatus MIGRATION_IO_ERROR
Migration status indicating that the node associated with this migration information could not be written to.


MIGRATION_DONE

public static final MigrationInfo.MigrationStatus MIGRATION_DONE
Migration status indicating the node associated with this migration information was carried out successfully.


MIGRATION_DONE_BUT_NOT_SAVED

public static final MigrationInfo.MigrationStatus MIGRATION_DONE_BUT_NOT_SAVED
Migration status indicating the node was migrated successfully but the migration changes were not saved. This is usually due to the file on disk being read-only.


MIGRATION_ERROR

public static final MigrationInfo.MigrationStatus MIGRATION_ERROR
Migration status indicating the migration of the node was not carried out properly. An undermined error was encountered.


MIGRATION_PENDING

public static final MigrationInfo.MigrationStatus MIGRATION_PENDING
Migration status indicating the node is ready for migration.


MIGRATION_CANCELED

public static final MigrationInfo.MigrationStatus MIGRATION_CANCELED
Migration status indicating the migration of the node was canceled by the user.


MIGRATION_NOT_NEEDED

public static final MigrationInfo.MigrationStatus MIGRATION_NOT_NEEDED
Migration status indicating the migration of the node was not needed. This generally implies that the node version is current.


MIGRATION_NOT_POSSIBLE

public static final MigrationInfo.MigrationStatus MIGRATION_NOT_POSSIBLE
Migration status indicating the migration of the node was not carried out. A typical reason why a node cannot be migrated can be that the version of the node is newer than the current version. When this is the case, the version status is VERSION_NEWER.


VERSION_UNKNOWN

public static final MigrationInfo.VersionStatus VERSION_UNKNOWN
Vesion status indicating the node version could not be determined.


VERSION_OLDER

public static final MigrationInfo.VersionStatus VERSION_OLDER
Vesion status indicating the node version is older that the current node version.


VERSION_NEWER

public static final MigrationInfo.VersionStatus VERSION_NEWER
Vesion status indicating the node version is newer that the current node version.


VERSION_CURRENT

public static final MigrationInfo.VersionStatus VERSION_CURRENT
Vesion status indicating the node version is the same as the current node version.

Constructor Detail

MigrationInfo

protected MigrationInfo(Node node)
Constructor.

Parameters:
node - the node whose version information is being specified.
Method Detail

getNode

public final Node getNode()
Get the Node being migrated. Migration helpers should apply their changes to this Node.

Returns:
the Node being migrated.

getVersionStatus

public MigrationInfo.Status getVersionStatus()
Get the version status. Can be one of the following values: VERSION_OLDER, VERSION_NEWER, VERSION_CURRENT, or VERSION_UNKNOWN.

Returns:
the version status.

getVersionStatusDirectly

public MigrationInfo.Status getVersionStatusDirectly()
                                              throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

setVersionStatusDirectly

protected final void setVersionStatusDirectly(MigrationInfo.VersionStatus versionStatus)

getMigrationStatus

public MigrationInfo.MigrationStatus getMigrationStatus()
Get the migration status. Can be one of the MigrationInfo.MigrationStatus declared by this class.

Returns:
the migration status of the node.

getMigrationStatusDirectly

public MigrationInfo.MigrationStatus getMigrationStatusDirectly()
                                                         throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

setMigrationStatus

public void setMigrationStatus(MigrationInfo.MigrationStatus status)
Set the migration status. Can be one of the MigrationInfo.MigrationStatus declared by this class.

Parameters:
status - the migration status of the node.

getVersion

public java.lang.String getVersion()
Get the node's file format version stored in the document pointed to by the node's url.

Returns:
the node's file format version.

getVersionDirectly

public final java.lang.String getVersionDirectly()

isVersionPost1013

public final java.lang.Boolean isVersionPost1013()

hasErrors

public final boolean hasErrors()

getErrors

public final java.util.Iterator<MigrationInfo.ErrorInformation> getErrors()

addError

public final void addError(MigrationInfo.ErrorInformation errorInfo)

setVersionDirectly

protected final void setVersionDirectly(java.lang.String version)

ensureVersionInfo

protected abstract void ensureVersionInfo()
Figure out the version information. This includes the file format version of the document pointed to by the specified url.

Parameters:
url - the target node for which version information is being requested.

getHelpers

@Deprecated
public NodeMigratorHelper[] getHelpers()
Deprecated. use #getHelperReferences()

Carry the relevant NodeMigratorHelpers.

Returns:
the set of relevant Node Migrator Helpers.

getHelperReferences

public NodeMigratorHelperReference[] getHelperReferences()
Returns references to relevant NodeMigratorHelpers. These references point to actual NodeMigrationHelpers or NodeMigrationHelpers registered declaratively through the node-migrator hook.

Returns:
an empty array (default implementation.)

getVersionFromNamespaceURI

protected static java.lang.String getVersionFromNamespaceURI(java.lang.String namespaceURI)

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

Copyright © 1997, 2011, Oracle. All rights reserved.