com.ptc.windchill.esi.bom
Class ESISubstituteRenderer

java.lang.Object
  extended bycom.ptc.windchill.esi.rnd.BasicESIRenderer
      extended bycom.ptc.windchill.esi.bom.ESIBOMSubordinateRenderer
          extended bycom.ptc.windchill.esi.bom.ESISubstituteRenderer
All Implemented Interfaces:
ESIRenderer, Serializable

public class ESISubstituteRenderer
extends ESIBOMSubordinateRenderer
implements Serializable

This class renders the output of substitute (ie. ) in ESI DataResponse.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
protected static String ADDED_SUBSTITUTES
           
private  AlternateItemGroupMgr aigManager
           
private static String CLASSNAME
           
protected static String DELETED_SUBSTITUTES
           
protected static String ESIRESOURCE
           
protected static boolean isAlternateItemGroupActive
           
protected static String NULL_STRING
           
private static String RESOURCE
           
private  TaskHelper taskHelper
           
 
Fields inherited from class com.ptc.windchill.esi.bom.ESIBOMSubordinateRenderer
 
Fields inherited from class com.ptc.windchill.esi.rnd.BasicESIRenderer
adapterName, PART_CLASS_NAME, TASK_URI, XML_META_NAME
 
Constructor Summary
ESISubstituteRenderer()
           
 
Method Summary
private  void addElements(String grpName, PartUsageInfo pui, Enumeration subs)
           
protected  Element adjustElement(Element elem, String group, PartUsageInfo pui, WTPartMaster sub, Collection targets)
          Allow subclasses to fix the contents of an element before it's added to the output group(s).
protected  void buildGroups()
          Produces the renderer's output.
protected static Vector convertEnumToVector(Enumeration enum)
           
protected  AlternateItemGroupMgr getAigMgr()
           
protected  TaskHelper getTaskHelper()
           
private  Element mapPartUsageInfo(String groupName, PartUsageInfo pui, WTPartMaster sub, Collection targets)
           
 
Methods inherited from class com.ptc.windchill.esi.bom.ESIBOMSubordinateRenderer
addRenderedPart, addRenderedPart, areComponentQuantitiesRequired, areLineNumbersEnforced, getDeltaParts, getPart, getRenderedParts, getRoot, getTargets, isLineNumberEnabled, setData, validate
 
Methods inherited from class com.ptc.windchill.esi.rnd.BasicESIRenderer
adjustEffectivities, adjustObjectID, adjustTargets, buildUfidString, getAdapterName, getAttsFromMapFile, getBuilder, getEffectivityHandler, getGroupInfo, getMap, getMapInfo, getTargetsFromAssns, getWCAttributeList, invokeQueryTask, invokeQueryTask, invokeQueryTask, mapElement, mapObject, render, setBuilder, setEffectivityHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

NULL_STRING

protected static final String NULL_STRING
See Also:
Constant Field Values

ADDED_SUBSTITUTES

protected static final String ADDED_SUBSTITUTES
See Also:
Constant Field Values

DELETED_SUBSTITUTES

protected static final String DELETED_SUBSTITUTES
See Also:
Constant Field Values

isAlternateItemGroupActive

protected static final boolean isAlternateItemGroupActive

ESIRESOURCE

protected static final String ESIRESOURCE
See Also:
Constant Field Values

taskHelper

private TaskHelper taskHelper

aigManager

private AlternateItemGroupMgr aigManager
Constructor Detail

ESISubstituteRenderer

public ESISubstituteRenderer()
Method Detail

buildGroups

protected void buildGroups()
                    throws ESIRendererException
Produces the renderer's output. Obtains the deltaParts array of Collections from the base class. Iterates each Collection in turn. For each entry in the iterations:
  1. Obtains the substitute additions and substitute deletions.
  2. Maps the output.
  3. If alternate item groups are required, obtains the appropriate alternate item group from the alternate item group manager.
  4. Calls adjustObjectID().
  5. Calls adjustTargets()
  6. Calls adjustElement()
  7. Calls addRenderedPart()


Supported API: true

Specified by:
buildGroups in class BasicESIRenderer
Throws:
ESIRendererException

adjustElement

protected Element adjustElement(Element elem,
                                String group,
                                PartUsageInfo pui,
                                WTPartMaster sub,
                                Collection targets)
                         throws ESIRendererException
Allow subclasses to fix the contents of an element before it's added to the output group(s). Default behavior is to return the argument.

Supported API: true

Parameters:
elem -
group -
pui -
sub -
targets - Collection of ESITarget objects.
Returns:
Element
Throws:
ESIRendererException

addElements

private void addElements(String grpName,
                         PartUsageInfo pui,
                         Enumeration subs)
                  throws ESIRendererException
Throws:
ESIRendererException

mapPartUsageInfo

private Element mapPartUsageInfo(String groupName,
                                 PartUsageInfo pui,
                                 WTPartMaster sub,
                                 Collection targets)
                          throws ESIRendererException
Throws:
ESIRendererException

getAigMgr

protected AlternateItemGroupMgr getAigMgr()

getTaskHelper

protected TaskHelper getTaskHelper()

convertEnumToVector

protected static Vector convertEnumToVector(Enumeration enum)