com.ptc.windchill.esi.bom
Class BOMUtility

java.lang.Object
  extended by com.ptc.windchill.esi.bom.BOMUtility
All Implemented Interfaces:
Externalizable, Serializable

public final class BOMUtility
extends Object
implements Externalizable

A convenient class to set or retrieve BOM info from Windchill back end for ESI's need.

Supported API: true

Extendable: false

See Also:
Serialized Form

Method Summary
 com.infoengine.object.IeCollection getBOM(String objectID, boolean delta, boolean bomPart, boolean componentParts, boolean alternates, boolean substitutes, boolean referenceDesignators, boolean lineNumbers, String mulitLevel, boolean documents, String configSpec, String auth, String wcAdapter, String transactionID)
          getBOM RPC processor.
 void getBOM(WTPart part, boolean delta, boolean bomPart, boolean componentParts, boolean alternates, boolean substitutes, boolean referenceDesignators, boolean lineNumbers, String mulitLevel, boolean documents, String configSpec, String auth, String wcAdapter, VdbBuilder builder)
          RPC processor when called from getECN RPC.
 Collection getBOMUfids(String baseUFID, int depth)
          Returns a list of multilevel BOM UFIDs.
 boolean isBom(WTPart part)
          Returns true if the given part has any children (connected to a WTPartMaster via a WTPartUsageLink) or was ever released by ESI to any target as a BOM.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBOMUfids

public Collection getBOMUfids(String baseUFID,
                              int depth)
                       throws com.ptc.windchill.esi.utl.ESIException
Returns a list of multilevel BOM UFIDs. If depth is 1, returns the root part UFID.

Supported API: true

Parameters:
baseUFID - The UFID of root object.
depth - the level of BOM , default is 1 ( i.e. returns root bom itself ).
Returns:
Collection
Throws:
com.ptc.windchill.esi.utl.ESIException

getBOM

public final com.infoengine.object.IeCollection getBOM(String objectID,
                                                       boolean delta,
                                                       boolean bomPart,
                                                       boolean componentParts,
                                                       boolean alternates,
                                                       boolean substitutes,
                                                       boolean referenceDesignators,
                                                       boolean lineNumbers,
                                                       String mulitLevel,
                                                       boolean documents,
                                                       String configSpec,
                                                       String auth,
                                                       String wcAdapter,
                                                       String transactionID)
                                                throws WTException
getBOM RPC processor. Validates arguments, creates a VDBBuilder and then renders the BOM.

Supported API: true

Parameters:
objectID - UFID for a WTPart.
delta - If "true", returns only the changes since the last successful export. Default is "true".
bomPart - Should a part be created for the BOM?
componentParts - Should parts be created for the BOM's components?
alternates - If "true", returns alternate part info, default is "false". Only operative if "Parts" = "true".
substitutes - If "true", returns substitute data
referenceDesignators - If "true", returns Reference Designator data.
lineNumbers - If "true", returns line numbers info, no line numbers info otherwise.
mulitLevel - The number of levels of BOM, default is 1.
documents - If "true", returns associated documents info, default is "false".Only operative if "Parts" = "true".
configSpec - The Config Spec. value to use when navigating the BOM. See the Query-Tree Webject documentation for acceptable and default values.
auth - This parameter contains authentication information from I*E.
wcAdapter - This parameter contains the name of the Windchill adapter.
transactionID - The TransactionID of the ESITransaction that is related to this RPC request.
Returns:
IeCollection
Throws:
WTException

getBOM

public final void getBOM(WTPart part,
                         boolean delta,
                         boolean bomPart,
                         boolean componentParts,
                         boolean alternates,
                         boolean substitutes,
                         boolean referenceDesignators,
                         boolean lineNumbers,
                         String mulitLevel,
                         boolean documents,
                         String configSpec,
                         String auth,
                         String wcAdapter,
                         VdbBuilder builder)
                  throws WTException
RPC processor when called from getECN RPC. Validates arguments then creates a VDBBuilder if one hasn't already been provided. Creates a BOM Renderer. Passes control to the renderer. Does not call asVDB() on the renderer because the caller of this method is responsible to do that.

Supported API: true

Parameters:
part - The assembly part for the top-level BOM.
delta - If "true", returns only the changes since the last successful export. Default is "true".
bomPart - Should a part be created for the BOM?
componentParts - Should parts be created for the BOM's components?
alternates - If "true", returns alternate part info, default is "false". Only operative if "Parts" = "true".
substitutes - If "true", returns substitute data
referenceDesignators - If "true", returns Reference Designator data.
lineNumbers - If "true", returns line numbers info, no line numbers info otherwise.
mulitLevel - The number of levels of BOM, default is 1.
documents - If "true", returns associated documents info, default is "false".Only operative if "Parts" = "true".
configSpec - The Config Spec. value to use when navigating the BOM. See the Query-Tree Webject documentation for acceptable and default values.
auth - This parameter contains authentication information from I*E.
wcAdapter - This parameter contains the name of the Windchill adapter.
builder - The VdbBuilder to use when creating output.
Throws:
WTException

isBom

public final boolean isBom(WTPart part)
                    throws WTException
Returns true if the given part has any children (connected to a WTPartMaster via a WTPartUsageLink) or was ever released by ESI to any target as a BOM. Otherwise returns false

Supported API: true

Parameters:
part - The WTPart to be evaluated.
Returns:
boolean
Throws:
WTException