com.ptc.windchill.esi.bom
Class ESIWTPartRenderer

java.lang.Object
  extended bycom.ptc.windchill.esi.rnd.ResponseRendererImpl
      extended bycom.ptc.windchill.esi.bom.ESIWTPartRenderer
All Implemented Interfaces:
BOMPartRenderer, ResponseRenderer, Serializable
Direct Known Subclasses:
BOMComponentRendererImpl, ReferenceDesignatorRendererImpl, SubstituteRendererImpl

public abstract class ESIWTPartRenderer
extends ResponseRendererImpl
implements BOMPartRenderer, Serializable

Abstract class to provide services to receive, and access common data elements

Supported API: true

Extendable: true

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private  Collection[] deltaParts
           
private static boolean enforceLineNumbers
           
private  boolean lineNumberEnabled
           
private  WTPart part
           
private  HashSet partMasters
           
private static boolean requireComponentQuantity
           
private static String RESOURCE
           
private  WTPart root
           
private  Collection targets
           
 
Fields inherited from class com.ptc.windchill.esi.rnd.ResponseRendererImpl
XML_META_NAME
 
Constructor Summary
ESIWTPartRenderer()
           
 
Method Summary
 void addRenderedPart(PartUsageInfo pui)
          Obtain the part master object from the PartUsageInfo in the argument and add it to the partMasters collection.
 void addRenderedPart(WTPartMaster partMaster)
          Add the argument to the partMasters collection.
protected  boolean areComponentQuantitiesRequired()
          getter for requireComponentQuantities attribute.
protected  boolean areLineNumbersEnforced()
          getter for enforceLineNumbers attribute.
protected  Collection[] getDeltaParts()
          Gets the value of the attribute: deltaParts; An array of Collections containing WTPart objects.
protected  WTPart getPart()
          Gets the value of the attribute: part; The part being rendered.
 Collection getRenderedParts()
          Returns a collection of WTPart objects which represent the parts used for rendering.
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.
protected  Collection getTargets()
          Gets the value of the attribute: targets; A collection of ESITarget objects.
protected  boolean isLineNumberEnabled()
          Gets the value of the attribute: lineNumberEnabled; Are line numbers to be included on the output?

Supported API: true
 void setData(WTPart root, WTPart part, Collection[] deltaParts, Collection orgs, boolean lineNumbers)
          Set the renderer's state so that it is ready to process.
protected  void validate()
          Force all subclasses to implement the method.
 
Methods inherited from class com.ptc.windchill.esi.rnd.ResponseRendererImpl
adjustEffectivities, adjustObjectID, adjustTargets, buildGroups, buildUfidString, getAttsFromMapFile, getBuilder, getEffectivityHandler, getGroupInfo, getMap, getMapInfo, getTargetsFromAssns, invokeQueryTask, logException, mapElement, mapObject, render, setBuilder, setEffectivityHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ptc.windchill.esi.rnd.ResponseRenderer
render
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

enforceLineNumbers

private static boolean enforceLineNumbers

requireComponentQuantity

private static boolean requireComponentQuantity

deltaParts

private Collection[] deltaParts

targets

private Collection targets

lineNumberEnabled

private boolean lineNumberEnabled

part

private WTPart part

root

private WTPart root

partMasters

private HashSet partMasters
Constructor Detail

ESIWTPartRenderer

public ESIWTPartRenderer()
Method Detail

getDeltaParts

protected Collection[] getDeltaParts()
Gets the value of the attribute: deltaParts; An array of Collections containing WTPart objects.

Supported API: true

Returns:
Collection[]

getTargets

protected Collection getTargets()
Gets the value of the attribute: targets; A collection of ESITarget objects.

Supported API: true

Returns:
Collection

isLineNumberEnabled

protected 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 getRenderedParts()
                            throws WTException
Returns a collection of WTPart objects which represent the parts used for rendering.

Supported API: true

Specified by:
getRenderedParts in interface BOMPartRenderer
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.

addRenderedPart

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

Supported API: true

Parameters:
partMaster -

validate

protected void validate()
                 throws ESIRendererException
Description copied from class: ResponseRendererImpl
Force all subclasses to implement the method. The concrete method is expected to examine the attributes of the object and throw an exception if they are not set properly.

Supported API: false

Specified by:
validate in class ResponseRendererImpl
Throws:
ESIRendererException

setData

public void setData(WTPart root,
                    WTPart part,
                    Collection[] deltaParts,
                    Collection orgs,
                    boolean lineNumbers)
Description copied from interface: BOMPartRenderer
Set the renderer's state so that it is ready to process.

Supported API: true

Specified by:
setData in interface BOMPartRenderer
Parameters:
root - The root part for which the BOM is being rendered.
part - Presumed to be the assembly part for BOMs.
deltaParts - an array of enumerations
orgs - A collection of ESI targets
lineNumbers - Are line numbers to be included in the output?