wt.inf.container
Class LoadContainer

java.lang.Object
  extended bywt.inf.container.LoadContainer

public class LoadContainer
extends Object

Provides utility methods for loading containers and container-related data.

Supported API: false

Extendable: false


Field Summary
private static String CLASSNAME
           
private static boolean DEBUG
           
private static DebugWriter LOG
           
private static String RESOURCE
           
static String SITE_ORG_DOMAIN
          The name of the site organization's internet domain, as configured during the installation process
private static String SITE_ORG_DOMAIN_PROPERTY
           
private static String SITE_ORG_FILE
           
static String SITE_ORG_NAME
          The name of the site organization, as configured during the installation process
private static String SITE_ORG_NAME_PROPERTY
           
private static String SITE_ORG_TEMPLATE
           
private static String SITE_ORG_TEMPLATE_PROPERTY
           
 
Constructor Summary
LoadContainer()
           
 
Method Summary
static boolean addCreator(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Make a user a creator for the given container type, within the current container.
static boolean addOrgAdministrator(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Make the given user an administrator of the current org container.
static boolean addSiteAdministrator(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Make the given user an administrator of the site container.
private static void assignOrgProperties(WTOrganization org, String conferencing_url, String internet_domain)
          Assigns the conferencing url and internet domain to the given organization, if they are valid.
static boolean createClassicContainer(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Loads the Windchill/PDM container.
static boolean createContainer(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Loads a WTContainer with the given properties.
static boolean createExchangeContainer(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Loads the exchange container.
static boolean createOrgContainer(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Loads an OrgContainer with the given properties.
static boolean createSiteOrgContainer(Hashtable nv, Hashtable cmd_line, Vector return_objects)
           
private static Method getFactoryMethod(Class container_class, Class[] argtypes)
          Get a factory method of the form newXXX from the given class
private static WTContainerRef getOrgRef(String org_name)
          Gets a reference to the org container with the given name.
private static WTUser getUser(String user_name_or_dn, Hashtable nv, Hashtable cmd_line)
          Get the user with the givne name or dn
private static WTContainer newInstance(Class container_class, String name, WTContainerRef parent)
          Create a new container with the given name and parent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SITE_ORG_NAME

public static final String SITE_ORG_NAME
The name of the site organization, as configured during the installation process


SITE_ORG_DOMAIN

public static final String SITE_ORG_DOMAIN
The name of the site organization's internet domain, as configured during the installation process


RESOURCE

private static final String RESOURCE

CLASSNAME

private static final String CLASSNAME

DEBUG

private static final boolean DEBUG

LOG

private static final DebugWriter LOG

SITE_ORG_FILE

private static final String SITE_ORG_FILE

SITE_ORG_TEMPLATE

private static final String SITE_ORG_TEMPLATE

SITE_ORG_NAME_PROPERTY

private static final String SITE_ORG_NAME_PROPERTY
See Also:
Constant Field Values

SITE_ORG_DOMAIN_PROPERTY

private static final String SITE_ORG_DOMAIN_PROPERTY
See Also:
Constant Field Values

SITE_ORG_TEMPLATE_PROPERTY

private static final String SITE_ORG_TEMPLATE_PROPERTY
See Also:
Constant Field Values
Constructor Detail

LoadContainer

public LoadContainer()
Method Detail

createExchangeContainer

public static boolean createExchangeContainer(Hashtable nv,
                                              Hashtable cmd_line,
                                              Vector return_objects)
Loads the exchange container. The exchange container is persisted by wt.admin.Install. This method completes the creation process by calling the exchange container's container creator delegate.

Note: This API is only intended to be called during the administrative load of the system.

Parameters:
nv - map of load parameters
cmd_line - Command line overrides
return_objects -
Returns:
true If the load succeeds

createClassicContainer

public static boolean createClassicContainer(Hashtable nv,
                                             Hashtable cmd_line,
                                             Vector return_objects)
Loads the Windchill/PDM container. In addition, if there is not already an OrgContainer for the "site" organization, then this container is created as well.

Note: This API is only intended to be called during the administrative load of a Windchill/PDM installation.

Parameters:
nv - map of load parameters
cmd_line - Command line overrides
return_objects -
Returns:
true If the load succeeds

createOrgContainer

public static boolean createOrgContainer(Hashtable nv,
                                         Hashtable cmd_line,
                                         Vector return_objects)
Loads an OrgContainer with the given properties. The format of the corresponding load line is:
 containerName~containerTemplateRef~businessNamespace~sharingEnabled~creator~owner~subscriber~conferencingURL~description~internetDomain
 

Parameters:
nv - map of load parameters
cmd_line - Command line overrides
return_objects -
Returns:
true If the load succeeds

createSiteOrgContainer

public static boolean createSiteOrgContainer(Hashtable nv,
                                             Hashtable cmd_line,
                                             Vector return_objects)

createContainer

public static boolean createContainer(Hashtable nv,
                                      Hashtable cmd_line,
                                      Vector return_objects)
Loads a WTContainer with the given properties. The format of the corresponding load line is:
 containerClass~containerName~parentContainerPath~containerTemplateRef~businessNamespace~sharingEnabled~creator~owner~subscriber~conferencingURL~description~organization~creatorSelector
 

Parameters:
nv - map of load parameters
cmd_line - Command line overrides
return_objects -
Returns:
true If the load succeeds

assignOrgProperties

private static void assignOrgProperties(WTOrganization org,
                                        String conferencing_url,
                                        String internet_domain)
                                 throws WTException
Assigns the conferencing url and internet domain to the given organization, if they are valid.

Parameters:
conferencing_url - The conferencing URL for the org
internet_domain - The internet domain for the org
Throws:
WTException

newInstance

private static WTContainer newInstance(Class container_class,
                                       String name,
                                       WTContainerRef parent)
                                throws WTException
Create a new container with the given name and parent. If the container class is the exchange container class, then check to see if the exchange container already exists.

Parameters:
container_class - The class for the new container
name - The name for the new container
parent - The reference to the parent of the new container
Returns:
The new container instance
Throws:
WTException

getFactoryMethod

private static Method getFactoryMethod(Class container_class,
                                       Class[] argtypes)
Get a factory method of the form newXXX from the given class

Parameters:
container_class - The class to get the factory method from
argtypes - The arguments for the factory method
Returns:
The factory method

getOrgRef

private static WTContainerRef getOrgRef(String org_name)
                                 throws WTException
Gets a reference to the org container with the given name.

Returns:
A reference to the org container, or null if it couldn't be found.
Throws:
WTException

addOrgAdministrator

public static boolean addOrgAdministrator(Hashtable nv,
                                          Hashtable cmd_line,
                                          Vector return_objects)
Make the given user an administrator of the current org container. The format of the load entry is as follows:
 userNameOrDN
 

Parameters:
nv - map of load parameters
cmd_line - Command line overrides
return_objects -
Returns:
true If the load succeeds

addSiteAdministrator

public static boolean addSiteAdministrator(Hashtable nv,
                                           Hashtable cmd_line,
                                           Vector return_objects)
Make the given user an administrator of the site container. The format of the load entry is as follows:
 userNameOrDN
 

Parameters:
nv - map of load parameters
cmd_line - Command line overrides
return_objects -
Returns:
true If the load succeeds

addCreator

public static boolean addCreator(Hashtable nv,
                                 Hashtable cmd_line,
                                 Vector return_objects)
Make a user a creator for the given container type, within the current container. The format of the load entry is as follows:
 userNameOrDN~containerClassName
 

Parameters:
nv - map of load parameters
cmd_line - Command line overrides
return_objects -
Returns:
true If the load succeeds

getUser

private static WTUser getUser(String user_name_or_dn,
                              Hashtable nv,
                              Hashtable cmd_line)
                       throws Exception
Get the user with the givne name or dn

Parameters:
user_name_or_dn - A user name or full DN if necessary
nv - map of load parameters
cmd_line - command line overrides
Returns:
The matching user
Throws:
WTException - If the user can't be found
Exception