Package wt.change2

Class LoadChangeDirective

java.lang.Object
wt.change2.LoadChangeDirective

public class LoadChangeDirective extends Object
Creates and persists changeDirective objects based on input from a comma seperated value (csv) file. Method names and parameters are defined in csvmapfile.txt. wt.load.StandardLoadService.load reads records from a .csv file and passes the fields in a hashtable to methods defined in this class.

The load methods use a wt.load.StandardLoadService cache to cache changeDirective objects to improve performance of creating the object and updating attrbiutes.

Supported API: true

Extendable: false

See Also:
  • StandardLoadService
  • LoadValue
  • Method Details

    • beginCreateWTChangeDirective

      public static boolean beginCreateWTChangeDirective(Hashtable<Object,Object> nameValuePairs, Hashtable<Object,Object> cmdLineArgs, Vector<Object> return_objects)
      Processes the "beginCreateWTChangeDirective" directive in the XML load file. Creates a change directive object, persists it in the database and caches it in the loader's memory.

      XML Format

      <csvBeginWTPart handler="wt.change2.LoadChangeDirective.beginCreateWTChangeDirective" >
        <chgDirectiveNumber> ChangeDirective Number </chgDirectiveNumber>
        <csvtypedef> type definition </csvtypedef>
        <csvdescription> Description </csvdescription>
        <csvneedDate> need Date </csvneedDate>
        <csvfolder> folder location </csvfolder>
        <csvlifecycle> lifecycle template to use </csvlifecycle>
        <csvteamTemplate> team template to use </csvteamTemplate>
        <csvlifecyclestate> lifecycle state </csvlifecyclestate>
      </csvBeginWTPart >
       
      <csvIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue" >
        ...
      </csvIBAValue >
       
      <csvIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue" >
        ...
      </csvIBAValue >
       
      <csvEndCreateWTChangeDirective handler="wt.change2.LoadChangeDirective.endCreateWTChangeDirective" >
        <modifyTimeStamp> modify timeStamp to be set </chgDirectiveNumber>
      </csvEndCreateWTChangeDirective >

      Tag Definitions

         
         
      change directive number The number(unique identifier) of the change directive. It is a required attribute.
         
      folder The full path to the folder in which the change directive needs to be created, i.e. /Default/ChangeFolder. This value is optional and will default to /Default. An error message that this is a required field may appear if left blank, but this message can be ignored.
         
      lifecycle The lifecycle that the change directive will be created under. This value is optional and defaults to Basic.
         
      team template The team template that t he change directive will be created under. This value is optional and defaults to no team template being associated with the change directive.We need to specify the lifecycle template(Advanced LC) to be used, to specify the team template. An example would be <System.Change Directive Team>
         
      lifecycle state The lifecycle state that the created change directive will be in. This value is optional and defaults to the initial state of the lifecycle that the change directive is created under. If we need to set the state, the Lifecycle template to be used should be specified.
         
      typedef This contains the identifier string of a com.ptc.core.meta.common.TypeIdentifier.

      i.e. com.mycompany.SoftChangeDirective

      This would create a soft typed change directive. This currently supports the following modeled types:

      • wt.change2.WTChangeDirective

      This currently does not handle custom modeled types. If there is a need for one of these, then a custom loader needs to be created.

      This value is optional and defaults to wt.change2.WTChangeDirective.

         
         
      creation time stamp The creation time stamp for the change directive. This tag is optional and defaults to the modification time stamp, if that value is set, or to the current system time if neither the creation nor modification time stamps are set.
         
      modification time stamp The modification time stamp for the change directive. This tag is optional and defaults to the creation time stamp, if that value is set, or to the current system time if neither the creation nor modification time stamps are set.
      created by user This tag allows a user other than the user loading the file to be the creator of this change directive. This value is optional and defaults to the user loading the file.



      Supported API: true

      Extendable: false

      Parameters:
      nameValueObjects - Name/Value pairs of change directive attributes.
      cmdLineArgs - 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 success
      false failure