com.ptc.windchill.upgrade.tool
Class ReportIndex

java.lang.Object
  extended bycom.ptc.windchill.upgrade.tool.ReportIndex

public class ReportIndex
extends Object


Field Summary
private  Document document_
           
private static String ENTRY_TIMESTAMP
           
static String INDEX_ELEMENT_NAME
           
 Element reportElement_
           
private  Element reportTS_
           
private  Element rootElement_
           
 
Constructor Summary
ReportIndex()
          Creates a new ReportIndex object.
ReportIndex(InputStream index_file)
          Updates an existing index.xml file which is retrieved from the jar file.
 
Method Summary
 void addLink(String generated_output_file_name, String report_object)
          Adding the link of an output file to the UpgradeManagerOutputIndex.
 void addLinks(ReportStyler.IndexEntry[] generated_output_files_tags)
          Retrieving the values of the file name to be added and the tag to be added
private  Document document()
          document_ is created at the time index.xml is created or read
private  Element rootElement()
          Checks if rootElement is null or not.
 void writeTo(OutputStream output_stream)
          Create an instance to write the document to the specified stream in UTF-8 encoding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INDEX_ELEMENT_NAME

public static final String INDEX_ELEMENT_NAME
See Also:
Constant Field Values

ENTRY_TIMESTAMP

private static String ENTRY_TIMESTAMP

reportElement_

public Element reportElement_

document_

private Document document_

rootElement_

private Element rootElement_

reportTS_

private Element reportTS_
Constructor Detail

ReportIndex

public ReportIndex()
Creates a new ReportIndex object.


ReportIndex

public ReportIndex(InputStream index_file)
Updates an existing index.xml file which is retrieved from the jar file.

Parameters:
index_file - The index_file retrieved from the UpgradeManagerOutputs.jar
Method Detail

addLink

public void addLink(String generated_output_file_name,
                    String report_object)
Adding the link of an output file to the UpgradeManagerOutputIndex.


addLinks

public void addLinks(ReportStyler.IndexEntry[] generated_output_files_tags)
Retrieving the values of the file name to be added and the tag to be added

Parameters:
generated_output_files_tags - ReportStyler.IndexEntry IndexEntry is an inner class of ReportStyler

writeTo

public void writeTo(OutputStream output_stream)
             throws IOException
Create an instance to write the document to the specified stream in UTF-8 encoding

Parameters:
output_stream - Passed from ReportStyler
Throws:
IOException - Thrown by ddw.write(document());

document

private final Document document()
document_ is created at the time index.xml is created or read

Returns:
document_ An instance of org.w3c.dom.Document.

rootElement

private final Element rootElement()
Checks if rootElement is null or not.

Returns:
rootElement_ Element
Throws:
IllegalStateException - Thrown if the rootElement_ is null