Class LoadHelper

java.lang.Object
com.ptc.wpcfg.load.LoadHelper
All Implemented Interfaces:
RemoteAccess

public class LoadHelper extends Object implements RemoteAccess
A utility for loading our objects into the database.

Supported API: true

Extendable: false
See Also:
  • Method Details

    • createGenericVariantLink

      public static boolean createGenericVariantLink(Hashtable nv, Hashtable cmd_line, Vector return_objects)
      Create these GenericVariantLinks.

      Supported API: true

      Extendable: false
      Parameters:
      nv - passed to LoadServerHelper
      cmd_line - passed to LoadServerHelper
      return_objects - ignored
      Returns:
      true
    • createParamAttrDefnLink

      public static boolean createParamAttrDefnLink(Hashtable nv, Hashtable cmd_line, Vector return_objects)
      Create these ParameterAttributeDefnLinks.

      Supported API: true

      Extendable: false
      Parameters:
      nv - passed to LoadServerHelper
      cmd_line - passed to LoadServerHelper
      return_objects - ignored
      Returns:
      true
    • createVariantSpec

      public static boolean createVariantSpec(Hashtable nv, Hashtable cmd_line, Vector return_objects)
      Processes the "csvVariantSpec" directive in the XML load file. Creates a variant specifications associated with configurable module, persists it in the database, checks it out, applies the default attribute values associated with the specified type definition, persists the part, checks it back in, and caches it in the loader's memory.

      This format cannot add Soft Attributes(IBA).

      When using wt.load.LoadFromFile to load variant specification associated with configurable module, use the following XML format:

      XML Format

      <csvVariantSpec handler="wt." >
        <csvbatchInputFilePath> batch file input path </csvbatchInputFilePath>
        <csvdescription> variant specification description </csvdescription>
        <csvfolder> description </csvfolder>
        <csvbaselinenumber> baseline number </csvbaselinenumber>
        <csvnavcriteria> navigation criteria </csvnavcriteria>
        <csvcreatevariants> create variants </csvcreatevariants>
      </csvVariantSpec>

      Tag Definitions

      csvbatchInputFilePath This tag is mandatory,which specifies path of batch input file, which contains basic details of variant specification like name,number, configurable part information etc.
         
      The description of the variant specification. This value is optional.
         
      csvfolder The folder location of the variant specification. This tag is optional.
         
      csvbaselinenumber The managed baseline for the variant specification. This tag is optional.
      csvnavcriteria the navigation criteria name. This tag is must. This name should be csvname of csvBeginNavCriteria tag. All the information related to naviation criteria like part configuration specifications, option filter configuration specifications, options & choices will be referred from csvBeginNavCriteria tag matching with this name.
         
      csvcreatevariants The flag to indicate whether variants to be created along with variant specification or not. This tag is optional with default value as false.
         
      typedef This contains the internal name of soft type created through Type & Attribute Manager This would create a soft typed part. This currently supports the following modeled types:

      • com.ptc.wpcfg.doc.VariantSpec

      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 com.ptc.wpcfg.doc.VariantSpec



      Supported API: true

      Extendable: false
      Parameters:
      nv - passed to LoadServerHelper
      cmd_line - passed to LoadServerHelper
      return_objects - ignored
      Returns:
      true if successful
    • setDefaultDirectory

      public static void setDefaultDirectory(String defaultDirectory) throws Exception
      Sets the default directory.

      Supported API: true

      Extendable: false
      Parameters:
      defaultDirectory - the default directory
      Throws:
      Exception - if there is a problem calling the server
    • setLogicBase

      public static boolean setLogicBase(WTPart part, String path, Hashtable nv, Hashtable cmd_line)
      Sets the LogicBase on this part.

      Supported API: true

      Extendable: false
      Parameters:
      part - the part
      path - the directory with the LogicBase data
      nv - ignored
      cmd_line - ignored
      Returns:
      true if successful
    • beginBulkVariantSpecifications

      public static boolean beginBulkVariantSpecifications(Hashtable nv, Hashtable cmd_line, Vector return_objects)
      Processes the "beginBulkVariantSpecifications" directive in the XML load file. This is beginning tag for a loading variant specifications in bulk quantity. If there are bulk quantity of variant specifications to be loaded, those should be enclosed between beginBulkVariantSpecifications and endBulkVariantSpecifcations tag. Should be followed by csvVariantSpec or csvEndBulkVariantSpecification tags. The tag csvEndBulkVariantSpecification should be specified if the tag csvBeginBulkVariantSpecification is present.

      When using wt.load.LoadFromFile to load variant specification, use the following XML format:

      XML Format

      <csvBeginBulkVariantSpecification handler="com.ptc.wpcfg.load.LoadHelper.beginBulkVariantSpecifications" >


      Supported API: true

      Extendable: false
    • endBulkVariantSpecifications

      public static boolean endBulkVariantSpecifications(Hashtable nv, Hashtable cmd_line, Vector return_objects)
      This is the ending tag for loading variant specifications in bulk quantity. Should be preceded by the csvVariantSpec or csvBeginBulkVariantSpecification tags.

      When using LoadFromFile to load variant specification, use the following XML format:

      XML Format

      <csvEndBulkVariantSpecification handler="com.ptc.wpcfg.load.LoadHelper.endBulkVariantSpecifications" >


      Supported API: true

      Extendable: false