wt.inf.container
Class LoadExchangeContainer

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

public class LoadExchangeContainer
extends Object
implements JavaMigrator

Creates the exchange container and assigns it to the special domains.


Field Summary
private static String CREATOR_RESOURCE
           
private  DirectiveServices ds
           
private  ObjectIdentifier exchangeOid
           
private static String RESOURCE
           
private  ObjectIdentifier rootDomainOid
           
private static String SESSION_ITERATION_DOMAIN_NAME
           
private  ObjectIdentifier systemDomainOid
           
 
Constructor Summary
LoadExchangeContainer()
           
 
Method Summary
private  ObjectIdentifier createCabinet(String name, String description, ObjectIdentifier domain_id, ObjectIdentifier container_id)
          Creates a cabinet with the given properties
private  ObjectIdentifier getCabinet(String name)
          Finds the oid of the cabinet with the given name
private  ObjectIdentifier getRootDomain()
          Finds the oid of the root domain
private  ObjectIdentifier getSpecialDomain(String name)
          Finds the oid of the given special domain
private  void migrateExchangeCabinets()
          Assigns all cabinets in the global system domain to the exchange container
private  void migrateExchangeContainer()
          Creates the exchange container
private  void migrateExchangeSubFolders()
          Assigns all subfolders of all cabinets in the exchange container to the exchange container.
private  void migrateSessionIterationDomain()
          Assigns the session iteration domain to the exchange container
 boolean runMigration(DirectiveServices directive_services)
          Implemented from JavaMigrator
private  void safeClose(ResultSet rs)
          If the Statement is not null, try to close it, catching and smothering any SQLException that results.
private  void safeClose(Statement stmt)
          If the Statement is not null, try to close it, catching and smothering any SQLException that results.
private  void setContainer(ObjectIdentifier contained_id, ObjectIdentifier container_id)
          Assigns the contained object with oid contained_id to container container_id
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE

CREATOR_RESOURCE

private static final String CREATOR_RESOURCE

SESSION_ITERATION_DOMAIN_NAME

private static final String SESSION_ITERATION_DOMAIN_NAME
See Also:
Constant Field Values

ds

private DirectiveServices ds

exchangeOid

private ObjectIdentifier exchangeOid

rootDomainOid

private ObjectIdentifier rootDomainOid

systemDomainOid

private ObjectIdentifier systemDomainOid
Constructor Detail

LoadExchangeContainer

public LoadExchangeContainer()
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:
WTException - If the system cabinet can't be found
Exception

migrateExchangeContainer

private void migrateExchangeContainer()
                               throws Exception
Creates the exchange container

Throws:
Exception

migrateExchangeCabinets

private void migrateExchangeCabinets()
                              throws Exception
Assigns all cabinets in the global system domain to the exchange container

Throws:
Exception

migrateExchangeSubFolders

private void migrateExchangeSubFolders()
                                throws Exception
Assigns all subfolders of all cabinets in the exchange container to the exchange container.

Throws:
Exception

migrateSessionIterationDomain

private void migrateSessionIterationDomain()
                                    throws Exception
Assigns the session iteration domain to the exchange container

Throws:
Exception

getRootDomain

private ObjectIdentifier getRootDomain()
                                throws Exception
Finds the oid of the root domain

Returns:
The ObjectIdentifier of the root domain
Throws:
WTException - If the root domain can't be found
Exception

getSpecialDomain

private ObjectIdentifier getSpecialDomain(String name)
                                   throws Exception
Finds the oid of the given special domain

Returns:
The ObjectIdentifier of the domain
Throws:
WTException - If the domain can't be found
Exception

setContainer

private void setContainer(ObjectIdentifier contained_id,
                          ObjectIdentifier container_id)
                   throws Exception
Assigns the contained object with oid contained_id to container container_id

Parameters:
contained_id - The oid of the contained object to assign to the container
container_id - The oid of the container to put the object in
Throws:
Exception

getCabinet

private ObjectIdentifier getCabinet(String name)
                             throws Exception
Finds the oid of the cabinet with the given name

Parameters:
name - The name of the cabinet to look for
Returns:
The ObjectIdentifier of the cabinet, or null if it couldn't be found.
Throws:
Exception

createCabinet

private ObjectIdentifier createCabinet(String name,
                                       String description,
                                       ObjectIdentifier domain_id,
                                       ObjectIdentifier container_id)
                                throws Exception
Creates a cabinet with the given properties

Parameters:
name - The name of the cabinet
description - The description of the cabinet
domain_id - The oid of the administrative domain for the cabinet
container_id - The oid of the container for the cabinet
Returns:
The oid of the new cabinet
Throws:
Exception

safeClose

private void safeClose(Statement stmt)
If the Statement is not null, try to close it, catching and smothering any SQLException that results.

Parameters:
stmt - The Statement to close

safeClose

private void safeClose(ResultSet rs)
If the Statement is not null, try to close it, catching and smothering any SQLException that results.

Parameters:
rs - The ResultSet to close