com.ptc.windchill.esi.bom
Class BOMComponentRendererImpl

java.lang.Object
  extended bycom.ptc.windchill.esi.rnd.ResponseRendererImpl
      extended bycom.ptc.windchill.esi.bom.ESIWTPartRenderer
          extended bycom.ptc.windchill.esi.bom.BOMComponentRendererImpl
All Implemented Interfaces:
BOMComponentRenderer, BOMPartRenderer, ResponseRenderer, Serializable

public class BOMComponentRendererImpl
extends ESIWTPartRenderer
implements BOMComponentRenderer, Serializable

Default implementation of BOMComponentRender.

Supported API: true

Extendable: true

See Also:
Serialized Form

Field Summary
static String ADDED_BOM_COMPONENTS
           
private  AlternateItemGroupMgr aigMgr
           
static String CHANGED_BOM_COMPONENTS
           
private static String CLASSNAME
           
static String DELETED_BOM_COMPONENTS
           
private static String ESIRESOURCE
           
private  TaskHelper helper
           
private static boolean isAlternateItemGroupActive
           
private  ESIMap map
           
protected static ESIPropertyRequest MAP_FILE_REQUEST
           
private  ESIMapper mapper
           
protected static String NULL_STRING
           
private static String RESOURCE
           
static String UNCHANGED_BOM_COMPONENTS
           
 
Fields inherited from class com.ptc.windchill.esi.bom.ESIWTPartRenderer
 
Fields inherited from class com.ptc.windchill.esi.rnd.ResponseRendererImpl
XML_META_NAME
 
Constructor Summary
BOMComponentRendererImpl()
           
 
Method Summary
protected  Element adjustElement(Element elem, String group, PartUsageInfo pui, Collection targets)
          Allow subclasses to fix the contents of an element before it's added to the output group(s).
private  void buildAGroup(String name, Collection usageInfoColl)
           
protected  void buildGroups()
          Builds the renderer output.
protected  AlternateItemGroupMgr getAigManager()
           
private  Element mapPartUsageInfo(String groupName, PartUsageInfo pui, Collection targets)
           
protected  void validate()
          Insure that the object is ready to process.
 
Methods inherited from class com.ptc.windchill.esi.bom.ESIWTPartRenderer
addRenderedPart, addRenderedPart, areComponentQuantitiesRequired, areLineNumbersEnforced, getDeltaParts, getPart, getRenderedParts, getRoot, getTargets, isLineNumberEnabled, setData
 
Methods inherited from class com.ptc.windchill.esi.rnd.ResponseRendererImpl
adjustEffectivities, adjustObjectID, adjustTargets, 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.bom.BOMPartRenderer
getRenderedParts, setData
 
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

NULL_STRING

protected static final String NULL_STRING
See Also:
Constant Field Values

MAP_FILE_REQUEST

protected static final ESIPropertyRequest MAP_FILE_REQUEST

map

private ESIMap map

mapper

private ESIMapper mapper

helper

private TaskHelper helper

aigMgr

private AlternateItemGroupMgr aigMgr

ADDED_BOM_COMPONENTS

public static final String ADDED_BOM_COMPONENTS
See Also:
Constant Field Values

DELETED_BOM_COMPONENTS

public static final String DELETED_BOM_COMPONENTS
See Also:
Constant Field Values

CHANGED_BOM_COMPONENTS

public static final String CHANGED_BOM_COMPONENTS
See Also:
Constant Field Values

UNCHANGED_BOM_COMPONENTS

public static final String UNCHANGED_BOM_COMPONENTS
See Also:
Constant Field Values

isAlternateItemGroupActive

private static boolean isAlternateItemGroupActive

ESIRESOURCE

private static final String ESIRESOURCE
See Also:
Constant Field Values
Constructor Detail

BOMComponentRendererImpl

public BOMComponentRendererImpl()
Method Detail

validate

protected void validate()
                 throws ESIRendererException
Insure that the object is ready to process. Throws an exception if:

Supported API: true

Overrides:
validate in class ESIWTPartRenderer
Throws:
ESIRendererException

buildGroups

protected void buildGroups()
                    throws ESIRendererException
Builds the renderer output. For each Collection element in the deltaParts array, iterates the Collection and:
  1. Obtains the list of ESITargets associated
  2. If alternate item groups are required, obtains the appropriate alternate item group from the alternate item group manager.
  3. Maps the PartUsageInfo object that is contained in the Collection.
  4. Calls adjustObjectID().
  5. Calls adjustTargets().
  6. Calls adjustElement().
  7. Adds the part master to the partMasters collection by calling addRenderedPart().


Supported API: true

Specified by:
buildGroups in class ResponseRendererImpl
Throws:
ESIRendererException

adjustElement

protected Element adjustElement(Element elem,
                                String group,
                                PartUsageInfo pui,
                                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 -
targets - Collection of ESITarget objects.
Returns:
Element
Throws:
ESIRendererException

buildAGroup

private void buildAGroup(String name,
                         Collection usageInfoColl)
                  throws ESIRendererException
Throws:
ESIRendererException

mapPartUsageInfo

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

getAigManager

protected AlternateItemGroupMgr getAigManager()