wt.inf.container
Class WTContainedMigrator

java.lang.Object
  extended bywt.inf.container.WTContainedMigrator
All Implemented Interfaces:
JavaMigrator

public class WTContainedMigrator
extends Object
implements JavaMigrator

Assigns WTContained objects with null container references to either the exchange or classic container. The following object types are assigned to the exchange container:

All other object types are assigned to the classic container.


Field Summary
private  Map blockObjectsClassicMap
           
private  Map childrenObjectsClassicMap
           
private  Map childrenObjectsExchangeMap
           
private  List classicInfos
           
private  ObjectIdentifier classicOid
           
private  DirectiveServices ds
           
private static Class[] EXCHANGE_TYPES
           
private  List exchangeInfos
           
private  ObjectIdentifier exchangeOid
           
private  Map mixedContainerMap
           
private static Object[][] OBJECT_NAMES
          This array is used to build sql statements for classes where a subset of the object instances need to be migrated to a different container than the default.
 
Constructor Summary
WTContainedMigrator()
           
 
Method Summary
private  void initBlockMaps()
           
private  void initChildrenMaps()
           
private  void initInfos()
          Initializes the list of classinfos for objects that need to be migrated to the exchange container and to the classic container.
private  void initMixedContainerMap()
           
private  void initOids()
          Get the oids of the exchange and classic container
private  void migrate(List infos, ObjectIdentifier oid, String container_name)
          Assign objects with null container refs in the given tables to the given container.
private  void migrate(Map map, String container_name)
           
 boolean runMigration(DirectiveServices directive_services)
          Implemented from JavaMigrator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXCHANGE_TYPES

private static final Class[] EXCHANGE_TYPES

OBJECT_NAMES

private static final Object[][] OBJECT_NAMES
This array is used to build sql statements for classes where a subset of the object instances need to be migrated to a different container than the default. To add another class, add another array as follows: {, , , ... }
  • wt.lifecycle.LifeCycleTemplateMaster
  • wt.team.TeamTemplate
  • wt.workflow.definer.WfProcessTemplate
  • wt.workflow.definer.WfProcessTemplateMaster


  • ds

    private DirectiveServices ds

    exchangeOid

    private ObjectIdentifier exchangeOid

    classicOid

    private ObjectIdentifier classicOid

    exchangeInfos

    private List exchangeInfos

    classicInfos

    private List classicInfos

    mixedContainerMap

    private Map mixedContainerMap

    blockObjectsClassicMap

    private Map blockObjectsClassicMap

    childrenObjectsClassicMap

    private Map childrenObjectsClassicMap

    childrenObjectsExchangeMap

    private Map childrenObjectsExchangeMap
    Constructor Detail

    WTContainedMigrator

    public WTContainedMigrator()
    Method Detail

    runMigration

    public boolean runMigration(DirectiveServices directive_services)
                         throws Exception
    Implemented from JavaMigrator

    Specified by:
    runMigration in interface JavaMigrator
    Parameters:
    directive_services - Contains migration resources
    Returns:
    true
    Throws:
    Exception

    migrate

    private void migrate(List infos,
                         ObjectIdentifier oid,
                         String container_name)
                  throws Exception
    Assign objects with null container refs in the given tables to the given container.

    Parameters:
    infos - The tables to look in
    oid - The oid of the container to assign
    container_name - The display name of the container
    Throws:
    Exception

    migrate

    private void migrate(Map map,
                         String container_name)
                  throws Exception
    Throws:
    Exception

    initOids

    private void initOids()
                   throws Exception
    Get the oids of the exchange and classic container

    Throws:
    WTException - If the exchange container can't be found, if there is more than one row in the exchange container, or if the exchange container doesn't have a classic reference set
    Exception

    initInfos

    private void initInfos()
                    throws Exception
    Initializes the list of classinfos for objects that need to be migrated to the exchange container and to the classic container.

    Throws:
    Exception

    initMixedContainerMap

    private void initMixedContainerMap()
                                throws Exception
    Throws:
    Exception

    initBlockMaps

    private void initBlockMaps()
                        throws Exception
    Throws:
    Exception

    initChildrenMaps

    private void initChildrenMaps()
                           throws Exception
    Throws:
    Exception