|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.upgrade.tool.ReportStyler
Nested Class Summary | |
static class |
ReportStyler.IndexEntry
Inner public class IndexEntry is passed to ReportIndex for determining the tag for the index.xml file. |
Field Summary | |
private UpgradeContext |
context_
|
private String |
CSR_REPORT_TAG
|
private String |
CSR_XSL
|
private String |
INDEX_XSL
|
private String |
reportName_
|
private String |
SQL_REPORT_TAG
|
private String |
TXT_REPORT_TAG
|
private String |
UPDATE_XSL
|
private UpdateRunnerReport |
updateReport_
|
private File |
updateReportHtmlFile_
|
private File |
upgradeArchiveJarFile_
|
private File |
upgradeDirectory_
|
private File |
upgradePhaseReportDirectory_
|
private File |
upgradeReportDirectory_
|
private String |
XML_REPORT_TAG
|
Constructor Summary | |
ReportStyler()
Used to copy general files to an archive jar file, but the jar copy's name has a standard format. |
|
ReportStyler(UpdateRunnerReport report_object)
Create an Update XML and HTML, then add them to a directory and to a jar file. |
Method Summary | |
(package private) void |
addCompareSchemaReportToJar(File report_xml_file)
|
private void |
addFilesToJar(File[] files)
Use File objects representing existing files to add to the archive jar file. |
void |
addFileToJar(File file_with_dot_extension)
Add an existing file to an archive jar file. |
private void |
bufferInputStreamToOutputStream(InputStream input_stream,
OutputStream output_stream)
Use input and output streams to over-write files with new data. |
private void |
copyJarFile(File temp_jar)
Copy the entries from the jar file into a temporary one. |
private File |
getIndexHtmlFile()
The HTML description of the contents of the jar file. |
private File |
getIndexXmlFile()
The XML description of the contents of the jar file. |
private String |
getPackageAsPath()
Supports getStyleSheetInputStream by turning this class's package into a path that is terminated with a forward slash. |
String |
getReportName()
The file name includes the phase that was just executed, along with host_port_sid and the simple date and time stamp. |
private InputStream |
getStyleSheetInputStream(String xsl_file)
Supports xslTransform by loading the stylesheet from the directory that this class is in. |
File |
getTransformedUpdateReport()
Supports PhaseCompleted. |
private UpgradeContext |
getUpgradeContext()
The Upgrade Context holds general information |
private void |
setTransformedUpdateReport(File update_report_html_file)
Supports PhaseCompleted. |
private void |
setUpgradeContext()
Retrieves an instance of UpgradeContext to be used in this class. |
private void |
updateIndexWith(File index_xml_file,
String new_file_to_index,
String report_type)
Creates an index_entry and calls the method that will actually update the index.xml file. |
private void |
updateIndexWithMoreThanOneLink(File index_xml_file,
ReportStyler.IndexEntry[] links_to_index)
File names that were generated from files are added to the index.xml file that will be generated into links. |
File |
upgradePhaseReportDirectory()
Access the Upgrade Phase's Report Directory. |
private boolean |
writeUpdateReport(File xml_file)
Write the UpdateReport to the specified File. |
private boolean |
xslTransform(File xml_file,
String xsl_name,
File html_file)
Obtain a HTML File from a XML File using a XSL file |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final String INDEX_XSL
private final String CSR_XSL
private final String UPDATE_XSL
private final String CSR_REPORT_TAG
private final String SQL_REPORT_TAG
private final String TXT_REPORT_TAG
private final String XML_REPORT_TAG
private String reportName_
private UpdateRunnerReport updateReport_
private File upgradeDirectory_
private File upgradeReportDirectory_
private File upgradePhaseReportDirectory_
private File upgradeArchiveJarFile_
private File updateReportHtmlFile_
private UpgradeContext context_
Constructor Detail |
public ReportStyler()
public ReportStyler(UpdateRunnerReport report_object) throws Throwable
report_object
- An object that holds an equivalent of XML information for a report.Method Detail |
void addCompareSchemaReportToJar(File report_xml_file) throws Throwable
Throwable
public void addFileToJar(File file_with_dot_extension) throws Throwable
Throwable
private boolean writeUpdateReport(File xml_file)
private void updateIndexWith(File index_xml_file, String new_file_to_index, String report_type) throws Throwable
index_xml_file
- The file to be updated with a new file name.new_file_to_index
- Add a link for this new file to a copy of the jar's index.xml file.report_type
- Type of report it is, MigrationXMLReport, TXTFile, or SQLFile
Throwable
private void updateIndexWithMoreThanOneLink(File index_xml_file, ReportStyler.IndexEntry[] links_to_index) throws Throwable
links_to_index
- An array of IndexEntry that is to update the index_xml_file
Throwable
private void addFilesToJar(File[] files)
files
- An Array of File objects.private boolean xslTransform(File xml_file, String xsl_name, File html_file)
xml_file
- This file exists and contains the XML.xsl_name
- This file exists and contains the XSL.html_file
- This file does not exist but is created and populated with HTML contents.
private InputStream getStyleSheetInputStream(String xsl_file) throws IOException
xsl_file
- The XSL stylesheet that must be in this class's directory.
IOException
private String getPackageAsPath()
public String getReportName()
public File upgradePhaseReportDirectory()
private void copyJarFile(File temp_jar) throws IOException
temp_jar
- A temporary copy of the archive jar.
IOException
private void bufferInputStreamToOutputStream(InputStream input_stream, OutputStream output_stream) throws IOException
input_stream
- Holds the new data.output_stream
- To a file that is being over-written.
IOException
private void setTransformedUpdateReport(File update_report_html_file)
public File getTransformedUpdateReport()
private void setUpgradeContext()
private UpgradeContext getUpgradeContext()
private File getIndexXmlFile()
private File getIndexHtmlFile()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |