Interface VariantSpecLoaderService
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptiongetAssignedOptionSet(WTPart part) Returns the option set assigned to the given part.getOptionSet(String name, WTContainerRef containerRef) Returns the option set with the given parameters.Returns the part with the given parameters.loadVariantSpecs(List<VariantLoadNavCriteriaBean> navCriteriaBeans, List<VariantLoadPartConfigSpecBean> partconfigSpecBeans, List<VariantLoadATORuleConfigSpecBean> atoConfigSpecBeans) Create new variant specification or update existing ones using the input on the beans.loadVariantSpecs(List<VariantSpecLoadOutputBean> variantSpecBeans, Map<String, VariantSpec> existingVariantSpecs) Create new variant specification or update existing ones using the input on the beans.
-
Method Details
-
loadVariantSpecs
List<VariantSpecLoadOutputBean> loadVariantSpecs(List<VariantSpecLoadOutputBean> variantSpecBeans, Map<String, VariantSpec> existingVariantSpecs) throws WTException, WTPropertyVetoException, ExceptionCreate new variant specification or update existing ones using the input on the beans. The output is a collection of beans with information on objects created/update per row. Errors encountered while processing each row are logged on the bean itself. Objects for a given row are not persisted if an error occurs.Please follow the guidelines provided in the "Loading Variant Specifications Using an API" section in the Windchill Help Center
Provide one VariantSpecLoadOutputBean per variant spec to create. The following information should exist on the bean :
- variantSpecName : If creating a new variant spec, provide a name for it
- variantSpecNumber : If updating/reconfiguring an existing variant spec, do not provide a variantSpecName. Instead, provide the existing variant spec's number
- variantSpecPart : Provide a part that has an option set assigned to it
- optionSet : If you provide a part like above, supply its assigned option set. If creating a variant spec based only on an option set and not on a part, provide a valid option set here and leave the part above empty.
- navigationCriteria : This is where the bulk of the information is. Either create a navigation criteria object programmatically or use an exisitng one. Set it up with the right part and ato rule configuration specifications. Also provide it with a navigation filter. Note that the ato configuration specifications need to also be set on the navigation filter object (see documentation).
- userSelectedOptionChoiceOidMap : This is a map of selected choices per option. The keystring on the map is the object identifier string of the option. The values on the map are lists of object identifier string of the choices selected.
Supported API: true
Extendable: false- Parameters:
existingVariantSpecs-- Returns:
- A list of variant spec output beans. Every bean sent in when calling the api is also sent out. Status of the processing of the bean can be found by calling the loadStatus api on the bean.
- Throws:
WTExceptionExceptionWTPropertyVetoException
-
loadVariantSpecs
List<VariantSpecLoadOutputBean> loadVariantSpecs(List<VariantLoadNavCriteriaBean> navCriteriaBeans, List<VariantLoadPartConfigSpecBean> partconfigSpecBeans, List<VariantLoadATORuleConfigSpecBean> atoConfigSpecBeans) throws WTException, WTPropertyVetoException, Exception Create new variant specification or update existing ones using the input on the beans. The output is a collection of beans with information on objects created/update per row. Errors encountered while processing each row are logged on the bean itself. Objects for a given row are not persisted if an error occurs.Please follow the guidelines provided in the "Loading Variant Specifications Using an API" section in the Windchill Help Center
Provide one VariantLoadNavCriteriaBean per variant spec to create. The following information should exist on the bean :
- variantSpecName : If creating a new variant spec, provide a name for it
- variantSpecNumber : If updating/reconfiguring an existing variant spec, do not provide a variantSpecName. Instead, provide the existing variant spec's number
- partNumber : Provide a part number for which a Variant needs to be created. NOTE: that has an option set assigned to it. If only partNumber is specified, then the latest version will be used.
- optionSetNumber : If you provide a part like above, then this is not required. If creating a variant spec based only on an option set and not on a part, provide a valid option set NAME here and leave the part number above empty. Latest version will be used if only optionNumber is specified.
- optionsMap : This is a map of selected choice name per option name.
- partConfigSpecs - java.util.List. Only required if you want to use a specific Part config Spec. If you specify this, then a corresponding entry for this name should be in method argument partconfigSpecBeans
- atoRuleConfigSpecs - java.util.List. Only required if you want to use a specific ATO rule config Spec. If you specify this, then a corresponding entry for this name should be in method argument atoConfigSpecBeans
Provide list of VariantLoadPartConfigSpecBean for the Part Config specs that you want to create. See constructor on VariantLoadPartConfigSpecBean for more details.
Provide list of VariantLoadATORuleConfigSpecBean for the ATO rule Config specs that you want to create. See constructor on VariantLoadATORuleConfigSpecBean for more details.
Supported API: true
Extendable: false- Parameters:
navCriteriaBeans- - java.util.List. Required. Data to be loaded.partconfigSpecBeans- - java.util.List. Only required if you need to use a specific Part Config spec. If null, then Latest Config spec will be used.atoConfigSpecBeans- - java.util.List. Only required if you need to use a specific ATO Rule Config spec. If null, then Latest Config spec will be used.- Returns:
- A list of variant spec output beans. Every bean sent in when calling the api is also sent out. Status of the processing of the bean can be found by calling the loadStatus api on the bean.
- Throws:
WTExceptionExceptionWTPropertyVetoException
-
getWTPart
Returns the part with the given parameters. If no part with the given information is found, API returnsnull
Supported API: true- Parameters:
number- : The part number. This is required. The API returnsnullif no number is specifiedrevision- : The revision of the part. If not specified, the API defaults to the latest revisioniteration- : The iteration of the part. If not specified, the API defaults to the latest iteration- Returns:
- : A
WTPartobject if one is found. Elsenull - Throws:
WTException
-
getAssignedOptionSet
Returns the option set assigned to the given part. If none exists, API returnsnull
Supported API: true- Parameters:
part- : the part whose assigned option set is being searched for- Returns:
- optionSet : the option set that is assigned to the part
- Throws:
WTException
-
getOptionSet
Returns the option set with the given parameters. Returnsnullif a match isnt found.
Supported API: true- Parameters:
name- : Name of the option set. This is required. The API will fail if this is not set.containerRef- : The reference to the container in which the option set is to be searched for. This is required. The API will fail if this is not set.- Returns:
- optionSet : The option set matching the given criteria.
nullif none if found. - Throws:
WTException
-