wt.org.electronicIdentity.tools
Class LoadWTUserElectronicIdentification

java.lang.Object
  extended bywt.org.electronicIdentity.tools.LoadWTUserElectronicIdentification

public class LoadWTUserElectronicIdentification
extends Object

This class is to be used in the bulk loading of electronic identification objects for Windchill users. The class will create a FormatContentHolder of type ApplicationData with the primary content the electronic identification object specified in the path. This class is merly a helper, it is intended that this class be used in some kind of loop that repeadly calls it with a new user and electronic identification object.


Constructor Summary
LoadWTUserElectronicIdentification()
           
 
Method Summary
private static WTUser getWTUser(String userName)
          Finds the WTUser given that users Web Server ID.
static void main(String[] args)
           
static void setUserElectronicIdentification(String userName, String fileName, String pathWithFileName)
          Finds the WTUser associated with the user name.
static void setUserElectronicIdentification(WTUser user, String fileName, String pathWithFileName)
          Creates the UserElectronicIDLink between WTUser and their ElectronicSignature, then associates the ElectronicSignature with a FormatContentHolder which is then associated with ApplicationData.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadWTUserElectronicIdentification

public LoadWTUserElectronicIdentification()
Method Detail

main

public static void main(String[] args)

setUserElectronicIdentification

public static void setUserElectronicIdentification(String userName,
                                                   String fileName,
                                                   String pathWithFileName)
                                            throws WTPropertyVetoException,
                                                   WTException
Finds the WTUser associated with the user name. Calls setUserElectronicIdentification with a WTUser.

Parameters:
fileName - The display name to be given to the electronic identity, usually the filename.
pathWithFileName - The complete path to the file, with the file name.
Throws:
WTPropertyVetoException
WTException

setUserElectronicIdentification

public static void setUserElectronicIdentification(WTUser user,
                                                   String fileName,
                                                   String pathWithFileName)
                                            throws WTPropertyVetoException,
                                                   WTException
Creates the UserElectronicIDLink between WTUser and their ElectronicSignature, then associates the ElectronicSignature with a FormatContentHolder which is then associated with ApplicationData. The method then calls the ContentServerHelper, passing the complete path to the file containing the electronic id. Please make sure the file path is complete and includes the file name. Also make sure the Method Server has access to file location.

Parameters:
user - The WTUser
fileName - The display name to be given to the electronic identity, usually the filename.
pathWithFileName - The complete path to the file, with the file name.
Throws:
WTPropertyVetoException
WTException

getWTUser

private static WTUser getWTUser(String userName)
Finds the WTUser given that users Web Server ID.

Parameters:
userName - The Authenticated(WTUser) user name.
Returns:
The WTUser or null.
Throws:
None