Package wt.org

Class LoadPrincipal

java.lang.Object
wt.org.LoadPrincipal

public class LoadPrincipal extends Object
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
    • Method Details

      • createUser

        public static boolean createUser(Hashtable nv, Hashtable cmd_line, Vector<String> return_objects)
        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. testuser1 testuser1 testuser1. Last en_GB testuser1@email.com Test for loading of user's into the database org1 testuser1 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
      • createGroup

        public static boolean createGroup(Hashtable nv, Hashtable cmd_line, Vector<String> return_objects)
        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. grp1 Test Group1 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). 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 by wt.load.StandardLoadService for 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. orggroup1 testuser4 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) 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 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
      • createOrgAdmin

        public static boolean createOrgAdmin(Hashtable nv, Hashtable cmd_line, Vector<String> 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<String> 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
      • dirInit

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

        Supported API: true
        Throws:
        WTException