wt.load
Class LoadUser

java.lang.Object
  extended by wt.load.LoadUser

public class LoadUser
extends Object

Used to load users, groups, associate users to groups, domains, and access rules for test or demo data in Windchill. Methods in this class are defined for use by the load package inside of the map file (wt.home.loadFile.csvmapfile.txt). These methods were written to be called by the load package using introspection not by a user interface.

Supported API: true


Method Summary
static boolean createAccessRule(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Create an access control rule.
static WTGroup createAdminGroupAndUser(String adminUserName, String groupName, AdministrativeDomain sysdomain, String webUserName)
          Create Administrators group and administrator user.
static boolean createDomain(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Create an administrative domain.
static boolean createGroup(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Create a group object and persist it in the database.
static boolean createOrgAdmin(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Provides the same functionality as createUser, while additionally making the new user a member of the given organization.
static boolean createSiteAdmin(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Provides the same functionality as createUser, while additionally making the new user a site admin.
static boolean createUser(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Create a user object and persist it in the database.
static boolean createUserGroup(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Add a user to a group.
static void dirInit()
          Initialize LDAP directory service support.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createUser

public static boolean createUser(Hashtable nv,
                                 Hashtable cmd_line,
                                 Vector return_objects)
Create a user object and persist it in the database. To facilitate this functionality of adding users into non-default LDAP, we need to add an additional attribute element to the data file. This element will however be optional. The element tag is . In this element tag we will need to provide the service name for the non-default adapter (ex - com.ptc.ptcnet.abc03d.nonDefaultAdapter).

Parameters:
nv - Name/value pairs of meta data to set on the user.
cmd_line - command line argument that can be substituted into the load data.
return_objects - Object(s) created by this method used by wt.load.StandardLoadService for user feedback messages.

Supported API: true

createAdminGroupAndUser

public static WTGroup createAdminGroupAndUser(String adminUserName,
                                              String groupName,
                                              AdministrativeDomain sysdomain,
                                              String webUserName)
                                       throws WTException
Create Administrators group and administrator user.

Parameters:
userName - User Name
groupName - Group Name
sysdomain - System Domain
webUserName - Web User Name

Supported API: true
Throws:
WTException

createGroup

public static boolean createGroup(Hashtable nv,
                                  Hashtable cmd_line,
                                  Vector return_objects)
Create a group object and persist it in the database. To facilitate this functionality of adding groups into non-default LDAP, we need to add an additional attribute element to the data file. This element will however be optional. The element tag is . In this element tag we will need to provide the service name for the non-default adapter (ex - com.ptc.ptcnet.abc03d.nonDefaultAdapter).

Parameters:
nv - Name/value pairs of meta data to set on the group.
cmd_line - command line argument that can be substituted into the load data.
return_objects - Object(s) created by this method used by wt.load.StandardLoadService for user feedback messages.

Supported API: true

createUserGroup

public static boolean createUserGroup(Hashtable nv,
                                      Hashtable cmd_line,
                                      Vector return_objects)
Add a user to a group. To facilitate this functionality of adding users into a group existing in a non-default LDAP, we need to add an additional attribute element to the data file. This element will however be optional. The element tag is . In this element tag we will need to provide the service name for the non-default adapter (ex - com.ptc.ptcnet.abc03d.nonDefaultAdapter).

Parameters:
nv - Name/value pairs representing the user name and the group name.
cmd_line - command line argument that can be substituted into the load data.
return_objects - Object(s) created by this method used by wt.load.StandardLoadService for user feedback messages.

Supported API: true

createDomain

public static boolean createDomain(Hashtable nv,
                                   Hashtable cmd_line,
                                   Vector return_objects)
Create an administrative domain.

Parameters:
nv - Name/value pairs of meta data to set on the domain.
cmd_line - command line argument that can be substituted into the load data.
return_objects - Object(s) created by this method used by wt.load.StandardLoadService for user feedback messages.

Supported API: true

createAccessRule

public static boolean createAccessRule(Hashtable nv,
                                       Hashtable cmd_line,
                                       Vector return_objects)
Create an access control rule.

Parameters:
nv - Name/value pairs of meta data to set on the access control rule.
cmd_line - command line argument that can be substituted into the load data.
return_objects - Object(s) created by this method used by wt.load.StandardLoadService for user feedback messages.

Supported API: true

dirInit

public static void dirInit()
                    throws WTException
Initialize LDAP directory service support.

Supported API: true

Throws:
WTException

createOrgAdmin

public static boolean createOrgAdmin(Hashtable nv,
                                     Hashtable cmd_line,
                                     Vector return_objects)
Provides the same functionality as createUser, while additionally making the new user a member of the given organization.

Supported API: true

Parameters:
nv -
cmd_line -
return_objects -
Returns:
true if the load succeeds
Throws:
WTException - If no organization is specified

createSiteAdmin

public static boolean createSiteAdmin(Hashtable nv,
                                      Hashtable cmd_line,
                                      Vector return_objects)
Provides the same functionality as createUser, while additionally making the new user a site admin.

Supported API: true

Parameters:
nv -
cmd_line -
return_objects -
Returns:
true if the load succeeds
Throws:
WTException