com.ptc.windchill.esi.rnd
Class VdbBuilderImpl

java.lang.Object
  extended bycom.ptc.windchill.esi.rnd.VdbBuilderImpl
All Implemented Interfaces:
Externalizable, Serializable, VdbBuilder

public class VdbBuilderImpl
extends Object
implements VdbBuilder, Externalizable

The default ESI VdbBuilder implementation.

Supported API: true

Extendable: true

See Also:
Serialized Form

Nested Class Summary
static class VdbBuilderImpl.ElementKey
           
 
Field Summary
private static String CLASSNAME
           
private  ESIEffectivityHandler effectivityHandler
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private  String transactionNumber
           
private  VdbContainer vdbContainer
           
private static String XML_META_NAME
           
 
Constructor Summary
VdbBuilderImpl()
           
 
Method Summary
 void addElement(String groupName, Element element, Persistable persistable, Collection targets)
          Creates a VdbElement containing an I*E Element and a Persistable.
 void addElement(String groupName, Element element, Persistable persistable, Persistable[] dependents, Collection targets)
          Creates a VdbElement containing an I*E Element and a Persistable.
protected static void addTargetAssns(Collection targetAssns, Persistable persistable, Collection targets, String action, String releaseClass)
           
 IeCollection asVDB()
          Create the VDB from the contents of the VdbGroups that were built.
protected static ESITargetAssociation createTargetAssn(Persistable persistable, ESITarget target, String action, String releaseClass)
           
private  String getAction(ESIGroupInfo groupInfo)
           
private  String getAttValue(String name, VdbElement vdbElement)
           
protected  VdbGroup getGroup(String groupName)
          Returns the VdbGroup identified by the groupName attribute.
protected static ESIGroupInfo getGroupInfo(String groupName)
           
protected static ESIMapInfo getMapInfo(String groupName)
           
protected  Collection getTargetAssnsForElements()
           
 String getTransactionNumber()
          Gets the value of the attribute: transactionNumber; The number of an ESI transaction.
protected  VdbContainer getVdbContainer()
          Gets the object for the association that plays role: vdbContainer.
 void initialize(String transactionNumber)
          Make sure the object is ready for requests.
 boolean isEmpty()
          Returns a boolean response based on if groups are empty in the IeCollection.
 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(VdbBuilderImpl thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 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

transactionNumber

private String transactionNumber

vdbContainer

private VdbContainer vdbContainer

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

effectivityHandler

private ESIEffectivityHandler effectivityHandler

XML_META_NAME

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

VdbBuilderImpl

public VdbBuilderImpl()
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(VdbBuilderImpl 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

getTransactionNumber

public String getTransactionNumber()
Gets the value of the attribute: transactionNumber; The number of an ESI transaction.

Supported API: true

Specified by:
getTransactionNumber in interface VdbBuilder
Returns:
String

getVdbContainer

protected VdbContainer getVdbContainer()
Gets the object for the association that plays role: vdbContainer.

Supported API: false

Returns:
VdbContainer

initialize

public void initialize(String transactionNumber)
Make sure the object is ready for requests. Stores the argument in the transactionNumber attribute.

Supported API: true

Specified by:
initialize in interface VdbBuilder
Parameters:
transactionNumber -

getGroup

protected VdbGroup getGroup(String groupName)
Returns the VdbGroup identified by the groupName attribute. Obtains the result from the associated VdbContainer.

Supported API: true

Parameters:
groupName -
Returns:
VdbGroup

addElement

public void addElement(String groupName,
                       Element element,
                       Persistable persistable,
                       Collection targets)
                throws ESIRendererException
Creates a VdbElement containing an I*E Element and a Persistable. Adds the VdbElement to a VdbGroup. The VdbGroup is logically identified by the groupName argument.

Supported API: false

Specified by:
addElement in interface VdbBuilder
Parameters:
groupName - The logical group to which the element argument is to be added.
element - The I*E element that is to be added to the group.
persistable - The persistable, of which the element is a representation. May be null.
targets - Collection of ESITarget objects.
Throws:
ESIRendererException

addElement

public void addElement(String groupName,
                       Element element,
                       Persistable persistable,
                       Persistable[] dependents,
                       Collection targets)
                throws ESIRendererException
Creates a VdbElement containing an I*E Element and a Persistable. Adds the VdbElement to a VdbGroup. The VdbGroup is logically identified by the groupName argument.

Supported API: true

Specified by:
addElement in interface VdbBuilder
Parameters:
groupName - The logical group to which the element argument is to be added.
element - The I*E element that is to be added to the group.
persistable - The persistable, of which the element is a representation. May be null.
dependents - Dependent persistables, also of which the element is a representation. May be null.
targets - Collection of ESITarget objects.
Throws:
ESIRendererException

asVDB

public IeCollection asVDB()
                   throws ESIRendererException
Create the VDB from the contents of the VdbGroups that were built. If transactionID is not null, identify the objects to be marked as pending and ask the transaction utility to mark them. Return the result of VdbContain.asVDB().

Supported API: true

Specified by:
asVDB in interface VdbBuilder
Returns:
IeCollection
Throws:
ESIRendererException

isEmpty

public boolean isEmpty()
                throws ESIRendererException
Returns a boolean response based on if groups are empty in the IeCollection.

Supported API: true

Specified by:
isEmpty in interface VdbBuilder
Returns:
boolean
Throws:
ESIRendererException

getTargetAssnsForElements

protected Collection getTargetAssnsForElements()
                                        throws ESIRendererException
Throws:
ESIRendererException

addTargetAssns

protected static void addTargetAssns(Collection targetAssns,
                                     Persistable persistable,
                                     Collection targets,
                                     String action,
                                     String releaseClass)
                              throws ESIRendererException
Throws:
ESIRendererException

createTargetAssn

protected static ESITargetAssociation createTargetAssn(Persistable persistable,
                                                       ESITarget target,
                                                       String action,
                                                       String releaseClass)
                                                throws ESIRendererException
Throws:
ESIRendererException

getMapInfo

protected static ESIMapInfo getMapInfo(String groupName)

getGroupInfo

protected static ESIGroupInfo getGroupInfo(String groupName)

getAttValue

private String getAttValue(String name,
                           VdbElement vdbElement)

getAction

private String getAction(ESIGroupInfo groupInfo)