com.ptc.windchill.esi.esipart
Class ESIPartRenderer

java.lang.Object
  extended by com.ptc.windchill.esi.rnd.ResponseRendererImpl
      extended by com.ptc.windchill.esi.esipart.ESIPartRenderer
All Implemented Interfaces:
PartRenderer, ResponseRenderer

public class ESIPartRenderer
extends ResponseRendererImpl
implements PartRenderer

Default implementation of PartRenderer.

Supported API: true

Extendable: true


Field Summary
 
Fields inherited from interface com.ptc.windchill.esi.esipart.PartRenderer
UTILITY
 
Method Summary
protected  com.infoengine.object.factory.Element adjustAlternateElement(com.infoengine.object.factory.Element element, String group, WTPart part, Collection targets)
          Allow subclasses to fix the contents of an element.
protected  com.infoengine.object.factory.Element adjustPartElement(com.infoengine.object.factory.Element element, String group, WTPart part, Eff eff, Collection targets)
          Allow subclasses to fix the contents of an element.
protected  void buildGroups()
          Output generator for the class.
protected  String getAuth()
          Gets the value of the attribute: auth; Authentication information to pass to Windchill Adapter when executing query webjects.
protected  Collection getParts()
          Gets the value of the attribute: parts; The list of parts that are to be rendered.
protected  WTPart getRoot()
          Gets the value of the attribute: root; The base part of a tree of product structures.
protected  String getTransactionID()
          Gets the value of the attribute: transactionID; The idNumber attribute value of an ESITransaction that is to be associated with this renderer.
 ESIPartUtility getUtility()
          Gets the object for the association that plays role: utility.
protected  String getWcAdapter()
          Gets the value of the attribute: wcAdapter; The name of the Windchill Adapter where query object webjects are to execute.
 void initialize()
          Perform any required initialization processing.
protected  boolean isAlternatesRequired()
          Gets the value of the attribute: alternatesRequired; Should the renderer obtain the alternates to the parts that are to be rendered?

Supported API: true
protected  boolean isDocumentsRequired()
          Gets the value of the attribute: documentsRequired; Should the renderer call the document renderer?

Supported API: true
 void setUtility(ESIPartUtility a_Utility)
          Sets the object for the association that plays role: utility.
protected  void validate()
          Make sure the object is ready to process.
 
Methods inherited from class com.ptc.windchill.esi.rnd.ResponseRendererImpl
adjustEffectivities, adjustObjectID, adjustTargets, buildUfidString, getBuilder, invokeQueryTask, mapElement, mapObject, render, setBuilder
 
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
 

Method Detail

getParts

protected Collection getParts()
Gets the value of the attribute: parts; The list of parts that are to be rendered.

Supported API: true

Returns:
Collection

getRoot

protected WTPart getRoot()
Gets the value of the attribute: root; The base part of a tree of product structures.

Supported API: true

Returns:
WTPart

isAlternatesRequired

protected boolean isAlternatesRequired()
Gets the value of the attribute: alternatesRequired; Should the renderer obtain the alternates to the parts that are to be rendered?

Supported API: true

Returns:
boolean

isDocumentsRequired

protected boolean isDocumentsRequired()
Gets the value of the attribute: documentsRequired; Should the renderer call the document renderer?

Supported API: true

Returns:
boolean

getAuth

protected String getAuth()
Gets the value of the attribute: auth; Authentication information to pass to Windchill Adapter when executing query webjects.

Supported API: true

Returns:
String

getWcAdapter

protected String getWcAdapter()
Gets the value of the attribute: wcAdapter; The name of the Windchill Adapter where query object webjects are to execute.

Supported API: true

Returns:
String

getTransactionID

protected String getTransactionID()
Gets the value of the attribute: transactionID; The idNumber attribute value of an ESITransaction that is to be associated with this renderer.

Supported API: true

Returns:
String

validate

protected void validate()
                 throws com.ptc.windchill.esi.rnd.ESIRendererException
Make sure the object is ready to process. If root, auth, or wcAdapter are null, throws an exception.

Supported API: true

Throws:
com.ptc.windchill.esi.rnd.ESIRendererException

buildGroups

protected void buildGroups()
                    throws com.ptc.windchill.esi.rnd.ESIRendererException
Output generator for the class. Does the following:
  1. Obtains the contents of the parts collection.
  2. Finds the ESI targets associated with the parts.
  3. Finds the most current released version of the part for each target.
  4. Compares the current version to the most current version. If they are the same and the effectivity has not changed, the part is ignored.
  5. If the part is not ignored, calls the Windchill Adapter to obtain all the attributes of the part.
  6. Maps the result of the Windchill Adapter call.
  7. Calls adjustPartElement()
  8. If documents are required, calls the document renderer.


Supported API: true

Specified by:
buildGroups in class ResponseRendererImpl
Throws:
com.ptc.windchill.esi.rnd.ESIRendererException

adjustPartElement

protected com.infoengine.object.factory.Element adjustPartElement(com.infoengine.object.factory.Element element,
                                                                  String group,
                                                                  WTPart part,
                                                                  Eff eff,
                                                                  Collection targets)
                                                           throws com.ptc.windchill.esi.rnd.ESIRendererException
Allow subclasses to fix the contents of an element.

Supported API: true

Parameters:
element -
group -
part -
eff - May be null.
targets - Collection of ESITarget objects.
Returns:
Element
Throws:
com.ptc.windchill.esi.rnd.ESIRendererException

adjustAlternateElement

protected com.infoengine.object.factory.Element adjustAlternateElement(com.infoengine.object.factory.Element element,
                                                                       String group,
                                                                       WTPart part,
                                                                       Collection targets)
                                                                throws com.ptc.windchill.esi.rnd.ESIRendererException
Allow subclasses to fix the contents of an element.

Supported API: true

Parameters:
element -
group -
part -
targets - Collection of ESITarget objects.
Returns:
Element
Throws:
com.ptc.windchill.esi.rnd.ESIRendererException

initialize

public void initialize()
Perform any required initialization processing.

Supported API: true

Specified by:
initialize in interface PartRenderer

getUtility

public ESIPartUtility getUtility()
Gets the object for the association that plays role: utility.

Supported API: true

Specified by:
getUtility in interface PartRenderer
Returns:
ESIPartUtility

setUtility

public void setUtility(ESIPartUtility a_Utility)
                throws WTPropertyVetoException
Sets the object for the association that plays role: utility.

Supported API: true

Specified by:
setUtility in interface PartRenderer
Parameters:
a_Utility -
Throws:
WTPropertyVetoException