com.ptc.windchill.esi.bom
Class BOMTreeNavigatorImpl

java.lang.Object
  extended bycom.ptc.windchill.esi.bom.BOMTreeNavigatorImpl
All Implemented Interfaces:
BOMTreeNavigator, Externalizable, Serializable

public class BOMTreeNavigatorImpl
extends Object
implements BOMTreeNavigator, Externalizable

Default ESI implementation of the BOMTreeNavigator.

Supported API: true

Extendable: true

See Also:
Serialized Form

Field Summary
private  String adapter
           
private  String auth
           
private  Collection bomLeafUfids
           
private  Collection bomNodeUfids
           
private static String CLASSNAME
           
private  String configspec
           
private  int depth
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
protected static String QUERY_TREE_TASK
           
protected static String QUERY_TREE_VIEW_PARAM
           
private static String RESOURCE
           
private  WTPart root
           
(package private) static long serialVersionUID
           
protected static String STANDARD_CONFIGSPEC_PARAMETER
           
protected  TaskHelper taskHelper
           
 
Constructor Summary
BOMTreeNavigatorImpl()
           
 
Method Summary
protected  String getAdapter()
          Gets the value of the attribute: adapter; The name of the Windchill adapter to pass to the Query-Tree webject.
protected  String getAuth()
          Gets the value of the attribute: auth; The authentication information to pass to the Query-Tree webject.
 Collection getBomLeafUfids()
          Gets the value of the attribute: bomLeafUfids; A collection WTPart UFIDs that point to component parts.
 Collection getBomNodeUfids()
          Gets the value of the attribute: bomNodeUfids; A collection WTPart UFIDs that point to assembly parts.
protected  String getConfigspec()
          Gets the value of the attribute: configspec; The Config Spec.
protected  int getDepth()
          Gets the value of the attribute: depth; the number of levels to navigate.
 Collection getLeafNodeUfids()
          Returns a collection part UFIDs for all of the nodes in the tree that are not BOMs.
protected  IeCollection getPartsTree()
           
protected  WTPart getRoot()
          Gets the value of the attribute: root; The top-level assembly part.
private  String getViewUfid()
           
protected  void processTree()
          If the bomNodeUfids attribute is null:
calls validate() to insure that the attibute state contains all required information call the Windchill Adapter Query-Tree webject Parse the webject result and obtain all parts that have a child.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(BOMTreeNavigatorImpl thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
protected  void setBomLeafUfids(Collection a_BomLeafUfids)
          Sets the value of the attribute: bomLeafUfids; A collection WTPart UFIDs that point to component parts.
protected  void setBomNodeUfids(Collection a_BomNodeUfids)
          Sets the value of the attribute: bomNodeUfids; A collection WTPart UFIDs that point to assembly parts.
 void setData(WTPart root, int depth, String configSpec, String auth, String adapter)
          Sets the attributes on the object.
protected  void validate()
          Makes sure all attributes are in the correct state.Throws a WTException if:
the root attribute is nullthe depth attribute is < 1the auth attribute is null or blank or spacesthe adapter attribute is null or blank or spaces

Supported API: true
protected  void walkElement(Element element)
           
protected  void walkGroup(Group group)
           
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
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

bomNodeUfids

private Collection bomNodeUfids

bomLeafUfids

private Collection bomLeafUfids

root

private WTPart root

configspec

private String configspec

depth

private int depth

adapter

private String adapter

auth

private String auth

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

QUERY_TREE_VIEW_PARAM

protected static final String QUERY_TREE_VIEW_PARAM
See Also:
Constant Field Values

QUERY_TREE_TASK

protected static final String QUERY_TREE_TASK

STANDARD_CONFIGSPEC_PARAMETER

protected static final String STANDARD_CONFIGSPEC_PARAMETER
See Also:
Constant Field Values

taskHelper

protected TaskHelper taskHelper
Constructor Detail

BOMTreeNavigatorImpl

public BOMTreeNavigatorImpl()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(BOMTreeNavigatorImpl thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getBomNodeUfids

public Collection getBomNodeUfids()
Gets the value of the attribute: bomNodeUfids; A collection WTPart UFIDs that point to assembly parts. Initialized to null. Set by processTree().

Supported API: true

Specified by:
getBomNodeUfids in interface BOMTreeNavigator
Returns:
Collection

setBomNodeUfids

protected void setBomNodeUfids(Collection a_BomNodeUfids)
Sets the value of the attribute: bomNodeUfids; A collection WTPart UFIDs that point to assembly parts. Initialized to null. Set by processTree().

Supported API: true

Parameters:
a_BomNodeUfids -

getBomLeafUfids

public Collection getBomLeafUfids()
Gets the value of the attribute: bomLeafUfids; A collection WTPart UFIDs that point to component parts. Initialized to null. Set by processTree().

Supported API: true

Returns:
Collection

setBomLeafUfids

protected void setBomLeafUfids(Collection a_BomLeafUfids)
Sets the value of the attribute: bomLeafUfids; A collection WTPart UFIDs that point to component parts. Initialized to null. Set by processTree().

Supported API: true

Parameters:
a_BomLeafUfids -

getRoot

protected WTPart getRoot()
Gets the value of the attribute: root; The top-level assembly part.

Supported API: true

Returns:
WTPart

getConfigspec

protected String getConfigspec()
Gets the value of the attribute: configspec; The Config Spec. value to use when navigating the BOM. See the Query-Tree Webject documentation for acceptable and default values.

Supported API: true

Returns:
String

getDepth

protected int getDepth()
Gets the value of the attribute: depth; the number of levels to navigate.

Supported API: true

Returns:
int

getAdapter

protected String getAdapter()
Gets the value of the attribute: adapter; The name of the Windchill adapter to pass to the Query-Tree webject.

Supported API: true

Returns:
String

getAuth

protected String getAuth()
Gets the value of the attribute: auth; The authentication information to pass to the Query-Tree webject.

Supported API: true

Returns:
String

processTree

protected void processTree()
                    throws WTException
If the bomNodeUfids attribute is null:


Supported API: true

Throws:
WTException

setData

public void setData(WTPart root,
                    int depth,
                    String configSpec,
                    String auth,
                    String adapter)
             throws WTException
Sets the attributes on the object. Throws a WTException if:


Supported API: true

Specified by:
setData in interface BOMTreeNavigator
Parameters:
root - The assembly part for the top-level BOM.
depth - The number of levels of BOM.
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.
adapter - This parameter contains the name of the Windchill adapter.
Throws:
WTException

validate

protected void validate()
                 throws WTException
Makes sure all attributes are in the correct state.Throws a WTException if:


Supported API: true

Throws:
WTException

getLeafNodeUfids

public Collection getLeafNodeUfids()
                            throws WTException
Returns a collection part UFIDs for all of the nodes in the tree that are not BOMs.

Supported API: true

Specified by:
getLeafNodeUfids in interface BOMTreeNavigator
Returns:
Collection
Throws:
WTException

walkElement

protected void walkElement(Element element)

walkGroup

protected void walkGroup(Group group)

getPartsTree

protected IeCollection getPartsTree()
                             throws WTException
Throws:
WTException

getViewUfid

private String getViewUfid()
                    throws WTException
Throws:
WTException