Package com.ptc.wpcfg.load
Class LoadHelper
java.lang.Object
com.ptc.wpcfg.load.LoadHelper
- All Implemented Interfaces:
RemoteAccess
A utility for loading our objects into the database.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanbeginBulkVariantSpecifications(Hashtable nv, Hashtable cmd_line, Vector return_objects) Processes the "beginBulkVariantSpecifications" directive in the XML load file.static booleancreateGenericVariantLink(Hashtable nv, Hashtable cmd_line, Vector return_objects) Create these GenericVariantLinks.static booleancreateParamAttrDefnLink(Hashtable nv, Hashtable cmd_line, Vector return_objects) Create these ParameterAttributeDefnLinks.static booleancreateVariantSpec(Hashtable nv, Hashtable cmd_line, Vector return_objects) Processes the "csvVariantSpec" directive in the XML load file.static booleanendBulkVariantSpecifications(Hashtable nv, Hashtable cmd_line, Vector return_objects) This is the ending tag for loading variant specifications in bulk quantity.static voidsetDefaultDirectory(String defaultDirectory) Sets the default directory.static booleansetLogicBase(WTPart part, String path, Hashtable nv, Hashtable cmd_line) Sets the LogicBase on this part.
-
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 LoadServerHelpercmd_line- passed to LoadServerHelperreturn_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 LoadServerHelpercmd_line- passed to LoadServerHelperreturn_objects- ignored- Returns:
- true
-
createVariantSpec
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.LoadFromFileto 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 LoadServerHelpercmd_line- passed to LoadServerHelperreturn_objects- ignored- Returns:
- true if successful
-
setDefaultDirectory
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
Sets the LogicBase on this part.
Supported API: true
Extendable: false- Parameters:
part- the partpath- the directory with the LogicBase datanv- ignoredcmd_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 betweenbeginBulkVariantSpecificationsandendBulkVariantSpecifcationstag. Should be followed bycsvVariantSpecorcsvEndBulkVariantSpecificationtags. The tagcsvEndBulkVariantSpecificationshould be specified if the tagcsvBeginBulkVariantSpecificationis present.When using
wt.load.LoadFromFileto 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 thecsvVariantSpecorcsvBeginBulkVariantSpecificationtags.When using
LoadFromFileto load variant specification, use the following XML format:XML Format
<csvEndBulkVariantSpecification handler="com.ptc.wpcfg.load.LoadHelper.endBulkVariantSpecifications" >
Supported API: true
Extendable: false
-