com.ptc.windchill.esi.rnd
Class ESIObjectHistoryRendererImpl

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

public class ESIObjectHistoryRendererImpl
extends Object
implements ESIObjectHistoryRenderer, Externalizable

The default implementation of the ESIObjectHistoryRenderer interface.

Supported API: true

Extendable: true

See Also:
Serialized Form

Field Summary
private  ESIObjectHistoryBuilder builder
           
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
(package private)  TaskHelper taskHelper
           
(package private)  ESITransactionUtility txnUtility
           
private  String ufid
           
 
Constructor Summary
ESIObjectHistoryRendererImpl()
           
 
Method Summary
private  void builderValidate(ESIObjectHistoryBuilder a_Builder)
           
protected  void buildGroups()
          Processes the release activities associated with the object that is identified by the ufid attribute.
protected  ESIObjectHistoryBuilder getBuilder()
          Gets the object for the association that plays role: builder.
 String getUfid()
          Gets the value of the attribute: ufid.
private  boolean isGreater(ReleaseActivity ra, ReleaseActivity oldRa)
           
private  Collection purgeDups(Collection c)
           
 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(ESIObjectHistoryRendererImpl thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void render(ESIObjectHistoryBuilder builder)
          This is a template method for object history renderers.
protected  void setBuilder(ESIObjectHistoryBuilder a_Builder)
          Sets the object for the association that plays role: builder.
 void setData(String ufid)
          Saves the argument in the ufid attribute.
 void setUfid(String a_Ufid)
          Sets the value of the attribute: ufid.
private  void ufidValidate(String a_Ufid)
           
protected  void validate()
          Insure that the object is ready to process.
 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

ufid

private String ufid

builder

private ESIObjectHistoryBuilder builder

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

taskHelper

TaskHelper taskHelper

txnUtility

ESITransactionUtility txnUtility
Constructor Detail

ESIObjectHistoryRendererImpl

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

getUfid

public String getUfid()
Gets the value of the attribute: ufid.

Supported API: false

Returns:
String

setUfid

public void setUfid(String a_Ufid)
             throws WTPropertyVetoException
Sets the value of the attribute: ufid.

Supported API: false

Parameters:
a_Ufid -
Throws:
WTPropertyVetoException

ufidValidate

private void ufidValidate(String a_Ufid)
                   throws WTPropertyVetoException
Parameters:
a_Ufid -
Throws:
WTPropertyVetoException

getBuilder

protected ESIObjectHistoryBuilder getBuilder()
Gets the object for the association that plays role: builder.

Supported API: true

Returns:
ESIObjectHistoryBuilder

setBuilder

protected void setBuilder(ESIObjectHistoryBuilder a_Builder)
                   throws WTPropertyVetoException
Sets the object for the association that plays role: builder.

Supported API: true

Parameters:
a_Builder -
Throws:
WTPropertyVetoException

builderValidate

private void builderValidate(ESIObjectHistoryBuilder a_Builder)
                      throws WTPropertyVetoException
Parameters:
a_Builder -
Throws:
WTPropertyVetoException

setData

public void setData(String ufid)
             throws WTException
Saves the argument in the ufid attribute.

Supported API: false

Specified by:
setData in interface ESIObjectHistoryRenderer
Parameters:
ufid -
Throws:
WTException

render

public void render(ESIObjectHistoryBuilder builder)
            throws WTException
This is a template method for object history renderers. It saves the argument and then calls validate() and buildGroups().

Supported API: true

Specified by:
render in interface ESIObjectHistoryRenderer
Parameters:
builder -
Throws:
WTException

validate

protected void validate()
                 throws ESIRendererException
Insure that the object is ready to process. If attributes, builder and ufid, are null, throws an exception.

Supported API: true

Throws:
ESIRendererException

buildGroups

protected void buildGroups()
                    throws WTException
Processes the release activities associated with the object that is identified by the ufid attribute. Obtains a collection of ReleaseActivity objects from an ESITransactionUtility object. Passes the ReleaseActivity objects to the builder's addElement.

Supported API: false

Throws:
WTException

purgeDups

private Collection purgeDups(Collection c)

isGreater

private boolean isGreater(ReleaseActivity ra,
                          ReleaseActivity oldRa)