Package wt.org
Class LoadPrincipal
java.lang.Object
wt.org.LoadPrincipal
Following are the use cases that this class currently performs
Creates a WTOrganization object in a Windchill repository. It does not create
organization container. So the organization objects created here will not be listed in Site|Organization
list.
Updates all the deleted users currently existing in the Windchill database and adds values for the five full name fields (prefix, first, middle, last, suffix).
Supported API: true This class could be invoked using the command WC_COMMAND> Windchill wt.load.LoadFromFile -d
Supported API: true This class could be invoked using the command WC_COMMAND> Windchill wt.load.LoadFromFile -d
-
Method Summary
Modifier and TypeMethodDescriptionstatic WTGroupcreateAdminGroupAndUser(String adminUserName, String groupName, AdministrativeDomain sysdomain, String webUserName) Create Administrators group and administrator user.static booleancreateGroup(Hashtable nv, Hashtable cmd_line, Vector<String> return_objects) Creates WTGroup object with properties listed in the data file in the specific format.static booleancreateOrgAdmin(Hashtable nv, Hashtable cmd_line, Vector<String> return_objects) Provides the same functionality ascreateUser, while additionally making the new user a member of the given organization.static booleancreateSiteAdmin(Hashtable nv, Hashtable cmd_line, Vector<String> return_objects) Provides the same functionality ascreateUser, while additionally making the new user a site admin.static booleancreateUser(Hashtable nv, Hashtable cmd_line, Vector<String> return_objects) Creates WTUser object with properties listed in the data file in the specific format.static booleancreateUserGroup(Hashtable nv, Hashtable cmd_line, Vector<String> return_objects) Adds a user to a group with properties listed in the data file in the specific format.static voiddirInit()Initialize LDAP directory service support.
-
Method Details
-
createUser
Creates WTUser object with properties listed in the data file in the specific format. Following is the format that needs to be specified in the input data file. 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 istestuser1 testuser1 testuser1. Last en_GB testuser1@email.com Test for loading of user's into the database org1 testuser1 . 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 bywt.load.StandardLoadServicefor user feedback messages.
Supported API: true
-
createGroup
Creates WTGroup object with properties listed in the data file in the specific format. Following is the format that needs to be specified in the input data file. 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 isgrp1 Test Group1 . In this element tag we will need to provide the service name for the non-default adapter (ex - com.ptc.ptcnet.abc03d.nonDefaultAdapter). If csvDirectoryService parameter is provided by the loader , then we need to check the value of the 2 flags of this adapter and decide whether we should allow the group to be created. ReadOnly and DoesNotContainGroup parameters value of directory service is considered which deciding group should be allowed or not. - 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 bywt.load.StandardLoadServicefor user feedback messages.
Supported API: true
-
createUserGroup
public static boolean createUserGroup(Hashtable nv, Hashtable cmd_line, Vector<String> return_objects) Adds a user to a group with properties listed in the data file in the specific format. Following is the format that needs to be specified in the input data file. 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 isorggroup1 testuser4 . In this element tag we will need to provide the service name for the non-default adapter (ex - com.ptc.ptcnet.abc03d.nonDefaultAdapter) where the group exists. - 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 bywt.load.StandardLoadServicefor 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 NamegroupName- Group Namesysdomain- System DomainwebUserName- Web User Name
Supported API: true- Throws:
WTException
-
createOrgAdmin
public static boolean createOrgAdmin(Hashtable nv, Hashtable cmd_line, Vector<String> return_objects) Provides the same functionality ascreateUser, while additionally making the new user a member of the given organization.
Supported API: true- Parameters:
nv-cmd_line-return_objects-- Returns:
trueif the load succeeds- Throws:
WTException- If no organization is specified
-
createSiteAdmin
public static boolean createSiteAdmin(Hashtable nv, Hashtable cmd_line, Vector<String> return_objects) Provides the same functionality ascreateUser, while additionally making the new user a site admin.
Supported API: true- Parameters:
nv-cmd_line-return_objects-- Returns:
trueif the load succeeds- Throws:
WTException
-
dirInit
Initialize LDAP directory service support.
Supported API: true- Throws:
WTException
-