Interface VariantSpecLoaderService


@RemoteInterface public interface VariantSpecLoaderService
Service to handle the loading of VariantSpec objects via the load utility.

Supported API: true

Extendable: false
  • Method Details

    • loadVariantSpecs

      List<VariantSpecLoadOutputBean> loadVariantSpecs(List<VariantSpecLoadOutputBean> variantSpecBeans, Map<String,VariantSpec> existingVariantSpecs) 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 VariantSpecLoadOutputBean per variant spec to create. The following information should exist on the bean :

      1. variantSpecName : If creating a new variant spec, provide a name for it
      2. variantSpecNumber : If updating/reconfiguring an existing variant spec, do not provide a variantSpecName. Instead, provide the existing variant spec's number
      3. variantSpecPart : Provide a part that has an option set assigned to it
      4. 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.
      5. 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).
      6. 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:
      WTException
      Exception
      WTPropertyVetoException
    • loadVariantSpecs

      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 :

      1. variantSpecName : If creating a new variant spec, provide a name for it
      2. variantSpecNumber : If updating/reconfiguring an existing variant spec, do not provide a variantSpecName. Instead, provide the existing variant spec's number
      3. 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.
      4. 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.
      5. optionsMap : This is a map of selected choice name per option name.
      6. 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
      7. 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:
      WTException
      Exception
      WTPropertyVetoException
    • getWTPart

      WTPart getWTPart(String number, String revision, String iteration) throws WTException
      Returns the part with the given parameters. If no part with the given information is found, API returns null

      Supported API: true

      Parameters:
      number - : The part number. This is required. The API returns null if no number is specified
      revision - : The revision of the part. If not specified, the API defaults to the latest revision
      iteration - : The iteration of the part. If not specified, the API defaults to the latest iteration
      Returns:
      : A WTPart object if one is found. Else null
      Throws:
      WTException
    • getAssignedOptionSet

      OptionSet getAssignedOptionSet(WTPart part) throws WTException
      Returns the option set assigned to the given part. If none exists, API returns null

      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

      OptionSet getOptionSet(String name, WTContainerRef containerRef) throws WTException
      Returns the option set with the given parameters. Returns null if 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. null if none if found.
      Throws:
      WTException