com.ptc.windchill.upgrade.ius
Class UpdateRunnerReport

java.lang.Object
  extended bycom.ptc.windchill.upgrade.ius.UpdateRunnerReport
All Implemented Interfaces:
EventListener, UpdateRunnerListener

public class UpdateRunnerReport
extends Object
implements UpdateRunnerListener


Field Summary
static String ABORTED_OUTCOME_ATTRIBUTE_VALUE
           
static String ABORTED_OUTCOME_EXCEPTION_ELEMENT_NAME
           
static String CANCELED_OUTCOME_ATTRIBUTE_VALUE
           
static String COMPLETED_OUTCOME_ATTRIBUTE_VALUE
           
private  Document document_
           
static String END_TIMESTAMP_ATTRIBUTE_NAME
           
static String LOG_ELEMENT_NAME
           
static String LOG_EXCEPTION_ELEMENT_NAME
           
static String LOG_TIMESTAMP_ATTRIBUTE
           
private  Element loggingParent_
           
static String OUTCOME_ATTRIBUTE_NAME
           
static String PHASE_ATTRIBUTE_NAME
           
static String REPORT_ELEMENT_NAME
           
private  Element rootElement_
           
static String SOURCE_VERSION_ATTRIBUTE_NAME
           
static String START_TIMESTAMP_ATTRIBUTE_NAME
           
private  Date startTimestamp_
           
static String TARGET_VERSION_ATTRIBUTE_NAME
           
static String TIMESTAMP_FORMAT
           
static String TIMESTAMP_FORMAT_ATTRIBUTE_NAME
           
private  SimpleDateFormat timestampFormat_
           
static String UPDATE_COMPLETED_OUTCOME_ATTRIBUTE_VALUE
           
static String UPDATE_ELEMENT_NAME
           
static String UPDATE_FAILED_OUTCOME_ATTRIBUTE_VALUE
           
static String UPDATE_NA_OUTCOME_ATTRIBUTE_VALUE
           
static String UPDATE_NO_UUID_ATTRIBUTE_NAME
           
static String UPDATE_SKIPPED_ALREADY_RUN_OUTCOME_ATTRIBUTE_VALUE
           
static String UPDATE_SKIPPED_OUTCOME_ATTRIBUTE_VALUE
           
static String UPDATE_UUID_ATTRIBUTE_NAME
           
private  HashMap updateElementMap_
           
 
Constructor Summary
UpdateRunnerReport()
           
 
Method Summary
private  void addIncrementalUpdateDetails(UpgradeContext upgrade_context)
           
private  Element createExceptionElement(String element_name, Throwable throwable)
           
private  Document document()
           
private  void ensureElementFor(IncrementalUpdate update)
           
private  String formatTimestamp(Date timestamp)
           
private  Element getElementFor(IncrementalUpdate update)
           
 Date getStartTimestamp()
           
private  Element loggingParent()
           
 void logMessageIssued(UpdateRunnerLogEvent event)
           
private  void markRunnerEndTimeAndOutcome(String outcome_attribute_value)
           
private  Element rootElement()
           
 void runnerAborted(UpdateRunnerEvent event)
           
 void runnerCanceled(UpdateRunnerEvent event)
           
 void runnerCompleted(UpdateRunnerEvent event)
           
 void runnerStarted(UpdateRunnerEvent event)
           
private  HashMap updateElementMap()
           
 void updateProcessingExecuted(IncrementalUpdateProcessingEvent event)
          Required to have this method regardless if used or not because it implements UpdateRunnerListener
 void updateProcessingFailed(IncrementalUpdateProcessingEvent event)
           
 void updateProcessingSkippedPredecessorsNotRun(IncrementalUpdateProcessingEvent event)
           
 void updateProcessingStarted(IncrementalUpdateProcessingEvent event)
           
 void updateProcessingSucceeded(IncrementalUpdateProcessingEvent event)
           
 void writeTo(OutputStream output_stream)
           
 void writeTo(Writer writer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REPORT_ELEMENT_NAME

public static final String REPORT_ELEMENT_NAME
See Also:
Constant Field Values

PHASE_ATTRIBUTE_NAME

public static final String PHASE_ATTRIBUTE_NAME
See Also:
Constant Field Values

START_TIMESTAMP_ATTRIBUTE_NAME

public static final String START_TIMESTAMP_ATTRIBUTE_NAME
See Also:
Constant Field Values

END_TIMESTAMP_ATTRIBUTE_NAME

public static final String END_TIMESTAMP_ATTRIBUTE_NAME
See Also:
Constant Field Values

SOURCE_VERSION_ATTRIBUTE_NAME

public static final String SOURCE_VERSION_ATTRIBUTE_NAME
See Also:
Constant Field Values

TARGET_VERSION_ATTRIBUTE_NAME

public static final String TARGET_VERSION_ATTRIBUTE_NAME
See Also:
Constant Field Values

OUTCOME_ATTRIBUTE_NAME

public static final String OUTCOME_ATTRIBUTE_NAME
See Also:
Constant Field Values

ABORTED_OUTCOME_ATTRIBUTE_VALUE

public static final String ABORTED_OUTCOME_ATTRIBUTE_VALUE
See Also:
Constant Field Values

CANCELED_OUTCOME_ATTRIBUTE_VALUE

public static final String CANCELED_OUTCOME_ATTRIBUTE_VALUE
See Also:
Constant Field Values

COMPLETED_OUTCOME_ATTRIBUTE_VALUE

public static final String COMPLETED_OUTCOME_ATTRIBUTE_VALUE
See Also:
Constant Field Values

ABORTED_OUTCOME_EXCEPTION_ELEMENT_NAME

public static final String ABORTED_OUTCOME_EXCEPTION_ELEMENT_NAME
See Also:
Constant Field Values

UPDATE_ELEMENT_NAME

public static final String UPDATE_ELEMENT_NAME
See Also:
Constant Field Values

UPDATE_NO_UUID_ATTRIBUTE_NAME

public static final String UPDATE_NO_UUID_ATTRIBUTE_NAME
See Also:
Constant Field Values

UPDATE_UUID_ATTRIBUTE_NAME

public static final String UPDATE_UUID_ATTRIBUTE_NAME
See Also:
Constant Field Values

UPDATE_SKIPPED_ALREADY_RUN_OUTCOME_ATTRIBUTE_VALUE

public static final String UPDATE_SKIPPED_ALREADY_RUN_OUTCOME_ATTRIBUTE_VALUE
See Also:
Constant Field Values

UPDATE_NA_OUTCOME_ATTRIBUTE_VALUE

public static final String UPDATE_NA_OUTCOME_ATTRIBUTE_VALUE
See Also:
Constant Field Values

UPDATE_SKIPPED_OUTCOME_ATTRIBUTE_VALUE

public static final String UPDATE_SKIPPED_OUTCOME_ATTRIBUTE_VALUE
See Also:
Constant Field Values

UPDATE_COMPLETED_OUTCOME_ATTRIBUTE_VALUE

public static final String UPDATE_COMPLETED_OUTCOME_ATTRIBUTE_VALUE
See Also:
Constant Field Values

UPDATE_FAILED_OUTCOME_ATTRIBUTE_VALUE

public static final String UPDATE_FAILED_OUTCOME_ATTRIBUTE_VALUE
See Also:
Constant Field Values

LOG_ELEMENT_NAME

public static final String LOG_ELEMENT_NAME
See Also:
Constant Field Values

LOG_TIMESTAMP_ATTRIBUTE

public static final String LOG_TIMESTAMP_ATTRIBUTE
See Also:
Constant Field Values

LOG_EXCEPTION_ELEMENT_NAME

public static final String LOG_EXCEPTION_ELEMENT_NAME
See Also:
Constant Field Values

TIMESTAMP_FORMAT_ATTRIBUTE_NAME

public static final String TIMESTAMP_FORMAT_ATTRIBUTE_NAME
See Also:
Constant Field Values

TIMESTAMP_FORMAT

public static final String TIMESTAMP_FORMAT
See Also:
Constant Field Values

document_

private Document document_

rootElement_

private Element rootElement_

timestampFormat_

private SimpleDateFormat timestampFormat_

updateElementMap_

private HashMap updateElementMap_

startTimestamp_

private Date startTimestamp_

loggingParent_

private Element loggingParent_
Constructor Detail

UpdateRunnerReport

public UpdateRunnerReport()
                   throws UpdateStoreException
Method Detail

addIncrementalUpdateDetails

private void addIncrementalUpdateDetails(UpgradeContext upgrade_context)
                                  throws UpdateStoreException
Throws:
UpdateStoreException

writeTo

public void writeTo(OutputStream output_stream)
             throws IOException
Throws:
IOException

writeTo

public void writeTo(Writer writer)
             throws IOException
Throws:
IOException

logMessageIssued

public void logMessageIssued(UpdateRunnerLogEvent event)
Specified by:
logMessageIssued in interface UpdateRunnerListener

runnerStarted

public void runnerStarted(UpdateRunnerEvent event)
Specified by:
runnerStarted in interface UpdateRunnerListener

getStartTimestamp

public Date getStartTimestamp()

runnerAborted

public void runnerAborted(UpdateRunnerEvent event)
Specified by:
runnerAborted in interface UpdateRunnerListener

runnerCanceled

public void runnerCanceled(UpdateRunnerEvent event)
Specified by:
runnerCanceled in interface UpdateRunnerListener

runnerCompleted

public void runnerCompleted(UpdateRunnerEvent event)
Specified by:
runnerCompleted in interface UpdateRunnerListener

updateProcessingSkippedPredecessorsNotRun

public void updateProcessingSkippedPredecessorsNotRun(IncrementalUpdateProcessingEvent event)
Specified by:
updateProcessingSkippedPredecessorsNotRun in interface UpdateRunnerListener

updateProcessingStarted

public void updateProcessingStarted(IncrementalUpdateProcessingEvent event)
Specified by:
updateProcessingStarted in interface UpdateRunnerListener

updateProcessingExecuted

public void updateProcessingExecuted(IncrementalUpdateProcessingEvent event)
Required to have this method regardless if used or not because it implements UpdateRunnerListener

Specified by:
updateProcessingExecuted in interface UpdateRunnerListener
Parameters:
event - listens to the Incremental Update being executed

updateProcessingSucceeded

public void updateProcessingSucceeded(IncrementalUpdateProcessingEvent event)
Specified by:
updateProcessingSucceeded in interface UpdateRunnerListener

updateProcessingFailed

public void updateProcessingFailed(IncrementalUpdateProcessingEvent event)
Specified by:
updateProcessingFailed in interface UpdateRunnerListener

markRunnerEndTimeAndOutcome

private void markRunnerEndTimeAndOutcome(String outcome_attribute_value)

createExceptionElement

private Element createExceptionElement(String element_name,
                                       Throwable throwable)

formatTimestamp

private String formatTimestamp(Date timestamp)

getElementFor

private Element getElementFor(IncrementalUpdate update)

ensureElementFor

private void ensureElementFor(IncrementalUpdate update)

document

private final Document document()

rootElement

private final Element rootElement()

updateElementMap

private HashMap updateElementMap()

loggingParent

private Element loggingParent()