com.ptc.windchill.esi.migrate
Class LoadReleaseActivity

java.lang.Object
  extended bycom.ptc.windchill.esi.migrate.LoadReleaseActivity

public class LoadReleaseActivity
extends Object

Load Delegate that imports ESI Release Activity.


Constructor Summary
LoadReleaseActivity()
           
 
Method Summary
protected static ReleaseActivity createReleaseActivity(Hashtable nv, Hashtable cmd_line)
          Creates a ReleaseActivity object from the tokens parsed from the load file.
static boolean createReleaseActivity(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Creates a ReleaseActivity object from the tokens parsed from the load file.
protected static Persistable getObject(String clss, String number, String version, String iteration, String view)
          Retrieves the object identified by the supplied values.
protected static WTPart getPart(String number, String version, String iteration, String view)
          Retrieves the WTPart object identified by the supplied values.
private static String getValue(String name, Hashtable nv, Hashtable cmd_line, boolean required)
           
protected static void log(String msg)
          Logs the supplied message.
protected static void log(String msg, Exception e)
          Logs the supplied message and exception.
protected static ReleaseActivityAction parseAction(String s)
          Parses the supplied string into ReleaseActivityAction
protected static Date parseDate(String s, String format)
          Parses the supplied string into a Date using the supplied date format string.
protected static Date parsePublishDate(String s)
          Parses the supplied Publish Date string into a Date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadReleaseActivity

public LoadReleaseActivity()
Method Detail

createReleaseActivity

public static boolean createReleaseActivity(Hashtable nv,
                                            Hashtable cmd_line,
                                            Vector return_objects)
Creates a ReleaseActivity object from the tokens parsed from the load file.

Parameters:
nv - -Hashtable containing tokens parsed from the load file
cmd_line - - command line argument that can contain supplemental load data
return_objects - - Vector of the object(s) created by this method. Used by wt.load.StandardLoadService for accurate user feedback messages.
Returns:
true if successful; otherwise, false

createReleaseActivity

protected static ReleaseActivity createReleaseActivity(Hashtable nv,
                                                       Hashtable cmd_line)
                                                throws WTException
Creates a ReleaseActivity object from the tokens parsed from the load file.

Parameters:
nv - -Hashtable containing tokens parsed from the load file
cmd_line - - command line argument that can contain supplemental load data
Returns:
the newly created ReleaseActivity object
Throws:
WTException

getObject

protected static Persistable getObject(String clss,
                                       String number,
                                       String version,
                                       String iteration,
                                       String view)
                                throws WTException
Retrieves the object identified by the supplied values. Returns null if the object is not found.

Parameters:
clss - - the object class (i.e., publish class)
number - - the object number
version - - the object version
iteration - - the object iteration (may be null)
view - - the object view (may be null)
Returns:
the object
Throws:
WTException

getPart

protected static WTPart getPart(String number,
                                String version,
                                String iteration,
                                String view)
                         throws WTException
Retrieves the WTPart object identified by the supplied values. Returns null if the part is not found.

Parameters:
number - - the part number
version - - the part version
iteration - - the part iteration (may be null)
view - - the part view (may be null)
Returns:
the part
Throws:
WTException

parseAction

protected static ReleaseActivityAction parseAction(String s)
                                            throws WTException
Parses the supplied string into ReleaseActivityAction

Parameters:
s - - the action string to parse
Returns:
the parsed action
Throws:
WTException - - if the string is not a valid action

parsePublishDate

protected static Date parsePublishDate(String s)
                                throws WTException
Parses the supplied Publish Date string into a Date.

Parameters:
s - - the date string to parse
Returns:
the parsed date
Throws:
WTException - - if the string could not be parsed

parseDate

protected static Date parseDate(String s,
                                String format)
Parses the supplied string into a Date using the supplied date format string. Returns null if the string could not be parsed.

Parameters:
s - - the date string to parse
format - - the date format to use when parsing
Returns:
the parsed date

log

protected static void log(String msg)
Logs the supplied message.

Parameters:
msg - - the textual message

log

protected static void log(String msg,
                          Exception e)
Logs the supplied message and exception.

Parameters:
msg - - the textual message
e - - the exception that occurred

getValue

private static String getValue(String name,
                               Hashtable nv,
                               Hashtable cmd_line,
                               boolean required)
                        throws WTException
Throws:
WTException