Class ESIBOMSubordinateRenderer

java.lang.Object
com.ptc.windchill.esi.rnd.BasicESIRenderer
com.ptc.windchill.esi.bom.ESIBOMSubordinateRenderer
All Implemented Interfaces:
ESIRenderer
Direct Known Subclasses:
ESIBOMComponentRenderer, ESIReferenceDesignatorRenderer, ESISubstituteRenderer

public abstract class ESIBOMSubordinateRenderer extends BasicESIRenderer
Super class for component, substitute and reference designator renderers.

Supported API: true

Extendable: false
  • Method Details

    • getDeltaParts

      protected Collection<PartUsageInfo>[] getDeltaParts()
      Gets the value of the attribute: deltaParts; An array of PartUsageInfo object Collections. Each PartUsageInfo contains WTPartUsageLink, its WTPart(RoleB) object along with other information like substitutes, reference designators etc.

      Supported API: true
      Returns:
      Collection[]
    • getTargetAssociations

      protected Collection<ESITargetAssociation> getTargetAssociations()
      Gets the value of the attribute: targetAssociations; A collection of ESITargetAssociation objects.

      Supported API: true
      Returns:
      Collection of ESITargetAssociation objects.
    • isLineNumberEnabled

      protected static boolean isLineNumberEnabled()
      Gets the value of the attribute: lineNumberEnabled; Are line numbers to be included on the output?

      Supported API: true
      Returns:
      boolean
    • getPart

      protected WTPart getPart()
      Gets the value of the attribute: part; The part being rendered.

      Supported API: true
      Returns:
      WTPart
    • getRoot

      protected WTPart getRoot()
      Gets the value of the attribute: root; If the part being rendered is part of a tree of product structures, this attribute contains the top of the tree.

      Supported API: true
      Returns:
      WTPart
    • areLineNumbersEnforced

      protected boolean areLineNumbersEnforced()
      getter for enforceLineNumbers attribute.

      Supported API: true
      Returns:
      boolean
    • areComponentQuantitiesRequired

      protected boolean areComponentQuantitiesRequired()
      getter for requireComponentQuantities attribute.

      Supported API: true
      Returns:
      boolean
    • getRenderedParts

      public Collection<WTPart> getRenderedParts() throws WTException
      Returns a collection of WTPart objects which represent the parts used for rendering.

      Supported API: true
      Returns:
      Collection
      Throws:
      WTException
    • addRenderedPart

      public void addRenderedPart(PartUsageInfo pui)
      Obtain the part master object from the PartUsageInfo in the argument and add it to the partMasters collection.

      Supported API: true
      Parameters:
      pui - A PartUsageInfo object containing a WTPartMaster.
    • addRenderedParts

      public void addRenderedParts(WTPart pui)
      Obtain the part master object from the PartUsageInfo in the argument and add it to the partMasters collection.

      Supported API: true
      Parameters:
      pui - A PartUsageInfo object containing a WTPartMaster.
    • addRenderedPart

      public void addRenderedPart(WTPartMaster partMaster)
      Add the argument to the partMasters collection.

      Supported API: true
      Parameters:
      partMaster -
    • addRenderedPart

      public void addRenderedPart(WTPart part)
      Adds the input WTPart to renderedParts collection.

      Supported API: true
      Parameters:
      part -
    • setData

      public void setData(WTPart root, WTPart part, Map<WTPartUsageLink,WTPart>[] deltaParts, Collection<ESITargetAssociation> targetAssociations, boolean lineNumbers, ESIBOMRenderer callerObj) throws ESIRendererException
      Initializes the relevant concrete renderer instance (that invokes this method) appropriately.

      Supported API: true
      Parameters:
      root - WTPart instance that represents the top level assembly.
      part - WTPart instance that represents the assembly for which to process the components, substitutes or reference designators as appropriate.
      deltaParts - Array of elements, each of which is a collection of PartUsageInfo instances; each such instance represents either an added, deleted, changed or an unchanged component in the BOM being processed.
      targetAssociations - Collection of ESITargetAssociations for the BOM header for which to process components, substitutes or reference designators as appropriate.
      lineNumbers - Specifies whether or not line numbers associated with components are to be processed.
      callerObj - ESIBOMRenderer instance that was used for rendering the BOM whose components, substitutes or reference designators are being processed by this renderer.
      Throws:
      ESIRendererException
    • validate

      protected void validate() throws ESIRendererException
      Method validates the part object and related target associations. It throws an exception if they are not set properly.

      Supported API: true
      Specified by:
      validate in class BasicESIRenderer
      Throws:
      ESIRendererException
    • setData

      public void setData(WTPart root, WTPart part, Collection<PartUsageInfo>[] deltaParts, Collection<ESITargetAssociation> targetAssociations, boolean lineNumbers, ESIBOMRenderer callerObj) throws ESIRendererException
      Initializes the relevant concrete renderer instance (that invokes this method) appropriately. This is an overloaded version that takes in an ESIBOMRenderer instance besides other parameters.

      Supported API: true
      Parameters:
      root - WTPart instance that represents the top level assembly.
      part - WTPart instance that represents the assembly for which to process the components, substitutes or reference designators as appropriate.
      deltaParts - Array of elements, each of which is a collection of PartUsageInfo instances; each such instance represents either an added, deleted, changed or an unchanged component in the BOM being processed.
      targetAssociations - Collection of ESITargetAssociations for the BOM header for which to process components, substitutes or reference designators as appropriate.
      lineNumbers - Specifies whether or not line numbers associated with components are to be processed.
      callerObj - ESIBOMRenderer instance that was used for rendering the BOM whose components, substitutes or reference designators are being processed by this renderer.
      Throws:
      ESIRendererException
    • getRenderedParts

      public Collection<WTPart> getRenderedParts(String savedFilter) throws WTException
      Returns a collection of WTPart objects obtained by resolving the part masters in partMasters using the input saved filter.

      Supported API: true
      Parameters:
      savedFilter - String representation of the filter.It can be either of the form 'Default' or 'OR:wt.filter.NavigationCriteria:239228'.
      Returns:
      Collection Returns a collection of WTPart objects obtained by resolving the part masters in partMasters using the input saved filter.
      Throws:
      WTException
    • setData

      public void setData(WTPart root, WTPart part, Map<WTPartUsageLink,WTPart>[] deltaParts, Map<WTPartUsageLink,Set<WTPartUsageLink>> currToPrevUsageLinks, Collection<ESITargetAssociation> targetAssociations, boolean lineNumbers, Map<RawMaterialLink,WTPart>[] rawColArray) throws ESIRendererException
      Initializes the relevant concrete renderer instance (that invokes this method) appropriately.

      Supported API: true
      Parameters:
      root - WTPart instance that represents the top level assembly.
      part - WTPart instance that represents the assembly for which to process the components, substitutes or reference designators as appropriate.
      deltaParts - Array of Maps, each of which has part usage links as keys, and the corresponding roleB part iterations as values. The Maps at indices 0, 1, 2 and 3 hold the added, deleted, changed and unchanged part usage links respectively.
      currToPrevUsageLinks - A Map where each key is a part usage link that is currently being published, and the value is a Set of the corresponding previously published part usage links.
      targetAssociations - Collection of ESITargetAssociations for the BOM header for which to process components, substitutes or reference designators as appropriate.
      lineNumbers - Specifies whether or not line numbers associated with components are to be processed.
      rawColArray - Array of Maps, each of which has raw material links as keys, and the corresponding roleB part iterations as values. The Maps at indices 0, 1, 2 and 3 hold the added, deleted, changed and unchanged raw material links respectively.
      Throws:
      ESIRendererException
    • shouldConsolidateComponentQuantity

      public boolean shouldConsolidateComponentQuantity(WTPartUsageLink partUsageLink)
      Lets the caller know whether or not the attribute "quantity" on the input part usage link is to be consolidated.

      Supported API: true
      Parameters:
      partUsageLink - - Input part usage link.
      Returns:
      A true, if the attribute "quantity" is to be consolidated for the input part usage link; this occurs if either the lineNumber attribute of the input part usage link is not set, or the distribution target attribute "Publish Line Numbers..." is set to "No".
      A false, otherwise.