You are viewing a plain text version of this content. The canonical link for it is here.
Posted to doxia-commits@maven.apache.org by lt...@apache.org on 2007/10/09 22:13:05 UTC
svn commit: r583285 - in
/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer:
./ itext/ pdf/ pdf/fo/ pdf/itext/
Author: ltheussl
Date: Tue Oct 9 13:13:04 2007
New Revision: 583285
URL: http://svn.apache.org/viewvc?rev=583285&view=rev
Log:
Rename DocRendererException to DocumentRendererException. Deprecate DocRenderer.
Added:
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRendererException.java
- copied, changed from r582977, maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocRendererException.java
Removed:
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocRendererException.java
Modified:
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/AbstractDocumentRenderer.java
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocRenderer.java
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRenderer.java
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/AbstractITextRender.java
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRenderer.java
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/DefaultRtfRenderer.java
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/PdfRenderer.java
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/fo/FoPdfRenderer.java
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/itext/ITextPdfRenderer.java
Modified: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/AbstractDocumentRenderer.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/AbstractDocumentRenderer.java?rev=583285&r1=583284&r2=583285&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/AbstractDocumentRenderer.java (original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/AbstractDocumentRenderer.java Tue Oct 9 13:13:04 2007
@@ -82,11 +82,11 @@
*
* @param documentModel the document model, containing all the metadata, etc.
*
- * @throws DocRendererException if any
+ * @throws DocumentRendererException if any
* @throws IOException if any
*/
public abstract void render( Map filesToProcess, File outputDirectory, DocumentModel documentModel )
- throws DocRendererException, IOException;
+ throws DocumentRendererException, IOException;
//--------------------------------------------
//
@@ -94,14 +94,14 @@
/** {@inheritDoc} */
public void render( Collection files, File outputDirectory, DocumentModel documentModel )
- throws DocRendererException, IOException
+ throws DocumentRendererException, IOException
{
render( getFilesToProcess( files ), outputDirectory, documentModel );
}
/** {@inheritDoc} */
public void render( File baseDirectory, File outputDirectory, DocumentModel documentModel )
- throws DocRendererException, IOException
+ throws DocumentRendererException, IOException
{
render( getFilesToProcess( baseDirectory ), outputDirectory, documentModel );
}
@@ -115,11 +115,11 @@
*
* @param outputDirectory the output directory where the document should be generated.
*
- * @throws DocRendererException if any
+ * @throws DocumentRendererException if any
* @throws IOException if any
*/
public void render( File baseDirectory, File outputDirectory )
- throws DocRendererException, IOException
+ throws DocumentRendererException, IOException
{
render( baseDirectory, outputDirectory, new DocumentModel() );
}
@@ -135,11 +135,11 @@
* @param documentDescriptor a file containing the document model.
* If this file does not exist or is null, some default settings will be used.
*
- * @throws DocRendererException if any
+ * @throws DocumentRendererException if any
* @throws IOException if any
*/
public void render( File baseDirectory, File outputDirectory, File documentDescriptor )
- throws DocRendererException, IOException
+ throws DocumentRendererException, IOException
{
if ( ( documentDescriptor == null ) || ( !documentDescriptor.exists() ) )
{
@@ -249,7 +249,7 @@
/** {@inheritDoc} */
public DocumentModel readDocumentModel( File documentDescriptor )
- throws DocRendererException, IOException
+ throws DocumentRendererException, IOException
{
DocumentModel documentModel;
@@ -259,7 +259,7 @@
}
catch ( XmlPullParserException e )
{
- throw new DocRendererException( "Error parsing document descriptor", e );
+ throw new DocumentRendererException( "Error parsing document descriptor", e );
}
return documentModel;
@@ -295,11 +295,11 @@
* @param fullDocPath absolute path to the source document.
* @param parserId determines the parser to use.
* @param sink the sink to receive the events.
- * @throws DocRendererException in case of a parsing error.
+ * @throws DocumentRendererException in case of a parsing error.
* @throws IOException if the source document cannot be opened.
*/
protected void parse( String fullDocPath, String parserId, Sink sink )
- throws DocRendererException, IOException
+ throws DocumentRendererException, IOException
{
try
{
@@ -309,12 +309,12 @@
}
catch ( ParserNotFoundException e )
{
- throw new DocRendererException( "No parser '" + parserId
+ throw new DocumentRendererException( "No parser '" + parserId
+ "' found for " + fullDocPath + ": " + e.getMessage() );
}
catch ( ParseException e )
{
- throw new DocRendererException( "Error parsing " + fullDocPath + ": " + e.getMessage(), e );
+ throw new DocumentRendererException( "Error parsing " + fullDocPath + ": " + e.getMessage(), e );
}
finally
{
Modified: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocRenderer.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocRenderer.java?rev=583285&r1=583284&r2=583285&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocRenderer.java (original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocRenderer.java Tue Oct 9 13:13:04 2007
@@ -27,6 +27,7 @@
*
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
* @version $Id$
+ * @deprecated Use {@link DocumentRenderer} instead.
*/
public interface DocRenderer
{
@@ -37,11 +38,11 @@
*
* @param siteDirectory the input directory contains files to be generated
* @param outputDirectory the output directory where files are generated
- * @throws DocRendererException if any
+ * @throws DocumentRendererException if any
* @throws IOException if any
*/
void render( File siteDirectory, File outputDirectory )
- throws DocRendererException, IOException;
+ throws DocumentRendererException, IOException;
/**
* Render a document depending a context and a document descriptor
@@ -49,11 +50,11 @@
* @param siteDirectory the input directory contains files to be generated
* @param outputDirectory the output directory where file are generated
* @param documentDescriptor the document descriptor
- * @throws DocRendererException if any
+ * @throws DocumentRendererException if any
* @throws IOException if any
*/
void render( File siteDirectory, File outputDirectory, File documentDescriptor )
- throws DocRendererException, IOException;
+ throws DocumentRendererException, IOException;
/**
* Get the output extension supported
Modified: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRenderer.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRenderer.java?rev=583285&r1=583284&r2=583285&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRenderer.java (original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRenderer.java Tue Oct 9 13:13:04 2007
@@ -49,11 +49,11 @@
* If the model contains a TOC, only the files found in this TOC are rendered,
* otherwise all files from the Collection of files will be processed.
*
- * @throws DocRendererException if any.
+ * @throws DocumentRendererException if any.
* @throws IOException if any.
*/
void render( Collection files, File outputDirectory, DocumentModel documentModel )
- throws DocRendererException, IOException;
+ throws DocumentRendererException, IOException;
/**
* Render a document from the files found in a source directory, depending on a rendering context.
@@ -67,11 +67,11 @@
* If the model contains a TOC, only the files found in this TOC are rendered,
* otherwise all files found under baseDirectory will be processed.
*
- * @throws DocRendererException if any
+ * @throws DocumentRendererException if any
* @throws IOException if any
*/
void render( File baseDirectory, File outputDirectory, DocumentModel documentModel )
- throws DocRendererException, IOException;
+ throws DocumentRendererException, IOException;
/**
* Read a document model from a file.
@@ -80,11 +80,11 @@
*
* @return the document model, containing all the metadata, etc.
*
- * @throws DocRendererException if any
+ * @throws DocumentRendererException if any
* @throws IOException if any
*/
DocumentModel readDocumentModel( File documentDescriptor )
- throws DocRendererException, IOException;
+ throws DocumentRendererException, IOException;
/**
* Get the output extension associated with this DocumentRenderer.
Copied: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRendererException.java (from r582977, maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocRendererException.java)
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRendererException.java?p2=maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRendererException.java&p1=maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocRendererException.java&r1=582977&r2=583285&rev=583285&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocRendererException.java (original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRendererException.java Tue Oct 9 13:13:04 2007
@@ -25,26 +25,26 @@
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
* @version $Id$
*/
-public class DocRendererException
+public class DocumentRendererException
extends Exception
{
/**
- * Default constructor
+ * Default constructor.
*
- * @param message
+ * @param message An error message.
*/
- public DocRendererException( String message )
+ public DocumentRendererException( String message )
{
super( message );
}
/**
- * Other constructor
+ * Other constructor.
*
- * @param message
- * @param t
+ * @param message An error message.
+ * @param t The cause.
*/
- public DocRendererException( String message, Throwable t )
+ public DocumentRendererException( String message, Throwable t )
{
super( message, t );
}
Modified: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/AbstractITextRender.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/AbstractITextRender.java?rev=583285&r1=583284&r2=583285&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/AbstractITextRender.java (original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/AbstractITextRender.java Tue Oct 9 13:13:04 2007
@@ -43,7 +43,7 @@
import org.apache.maven.doxia.Doxia;
import org.apache.maven.doxia.docrenderer.DocRenderer;
-import org.apache.maven.doxia.docrenderer.DocRendererException;
+import org.apache.maven.doxia.docrenderer.DocumentRendererException;
import org.apache.maven.doxia.docrenderer.document.DocumentModel;
import org.apache.maven.doxia.docrenderer.document.DocumentTOCItem;
import org.apache.maven.doxia.docrenderer.document.io.xpp3.DocumentXpp3Reader;
@@ -100,7 +100,7 @@
* @see org.apache.maven.doxia.docrenderer.DocRenderer#render(java.io.File, java.io.File)
*/
public void render( File siteDirectory, File outputDirectory )
- throws DocRendererException, IOException
+ throws DocumentRendererException, IOException
{
for ( Iterator i = siteModuleManager.getSiteModules().iterator(); i.hasNext(); )
{
@@ -142,7 +142,7 @@
* @see org.apache.maven.doxia.docrenderer.DocRenderer#render(java.io.File, java.io.File, java.io.File)
*/
public void render( File siteDirectory, File outputDirectory, File documentDescriptor )
- throws DocRendererException, IOException
+ throws DocumentRendererException, IOException
{
if ( ( documentDescriptor == null ) || ( !documentDescriptor.exists() ) )
{
@@ -158,11 +158,11 @@
}
catch ( XmlPullParserException e )
{
- throw new DocRendererException( "Error parsing document descriptor", e );
+ throw new DocumentRendererException( "Error parsing document descriptor", e );
}
catch ( IOException e )
{
- throw new DocRendererException( "Error reading document descriptor", e );
+ throw new DocumentRendererException( "Error reading document descriptor", e );
}
if ( documentModel.getOutputName() == null )
@@ -260,11 +260,11 @@
*
* @param iTextFile
* @param iTextOutput
- * @throws DocRendererException if any
+ * @throws DocumentRendererException if any
* @throws IOException if any
*/
public abstract void generateOutput( File iTextFile, File iTextOutput )
- throws DocRendererException, IOException;
+ throws DocumentRendererException, IOException;
/**
* Parse a sink
@@ -272,11 +272,11 @@
* @param fullPathDoc
* @param module
* @param outputITextFile
- * @throws DocRendererException
+ * @throws DocumentRendererException
* @throws IOException
*/
private void parse( String fullPathDoc, SiteModule module, File outputITextFile )
- throws DocRendererException, IOException
+ throws DocumentRendererException, IOException
{
ITextSink sink = new ITextSink( new FileWriter( outputITextFile ) );
@@ -289,7 +289,7 @@
}
catch ( ParserNotFoundException e )
{
- throw new DocRendererException( "Error getting a parser for " + fullPathDoc + ": " + e.getMessage() );
+ throw new DocumentRendererException( "Error getting a parser for " + fullPathDoc + ": " + e.getMessage() );
}
catch ( ParseException e )
{
@@ -308,11 +308,11 @@
*
* @param iTextFiles
* @return a document
- * @throws DocRendererException if any
+ * @throws DocumentRendererException if any
* @throws IOException if any
*/
private Document generateDocument( List iTextFiles )
- throws DocRendererException, IOException
+ throws DocumentRendererException, IOException
{
Document document;
try
@@ -321,7 +321,7 @@
}
catch ( ParserConfigurationException e )
{
- throw new DocRendererException( "Error building document :" + e.getMessage() );
+ throw new DocumentRendererException( "Error building document :" + e.getMessage() );
}
document.appendChild( document.createElement( ElementTags.ITEXT ) ); // Used only to set a root
@@ -336,11 +336,11 @@
}
catch ( SAXException e )
{
- throw new DocRendererException( "SAX Error : " + e.getMessage() );
+ throw new DocumentRendererException( "SAX Error : " + e.getMessage() );
}
catch ( ParserConfigurationException e )
{
- throw new DocRendererException( "Error parsing configuration : " + e.getMessage() );
+ throw new DocumentRendererException( "Error parsing configuration : " + e.getMessage() );
}
// Only one chapter per doc
@@ -351,7 +351,7 @@
}
catch ( DOMException e )
{
- throw new DocRendererException( "Error appending chapter for " + iTextFile + " : " + e.getMessage() );
+ throw new DocumentRendererException( "Error appending chapter for " + iTextFile + " : " + e.getMessage() );
}
}
@@ -362,10 +362,10 @@
* Init the transformer object
*
* @return an instanced transformer object
- * @throws DocRendererException if any
+ * @throws DocumentRendererException if any
*/
private Transformer initTransformer()
- throws DocRendererException
+ throws DocumentRendererException
{
try
{
@@ -382,12 +382,12 @@
}
catch ( TransformerConfigurationException e )
{
- throw new DocRendererException( "Error configuring Transformer for " + XSLT_RESOURCE + ": "
+ throw new DocumentRendererException( "Error configuring Transformer for " + XSLT_RESOURCE + ": "
+ e.getMessage() );
}
catch ( IllegalArgumentException e )
{
- throw new DocRendererException( "Error configuring Transformer for " + XSLT_RESOURCE + ": "
+ throw new DocumentRendererException( "Error configuring Transformer for " + XSLT_RESOURCE + ": "
+ e.getMessage() );
}
}
@@ -441,10 +441,10 @@
* @param documentModel
* @param document
* @param iTextFile
- * @throws DocRendererException
+ * @throws DocumentRendererException
*/
private void transform( DocumentModel documentModel, Document document, File iTextFile )
- throws DocRendererException
+ throws DocumentRendererException
{
Transformer transformer = initTransformer();
@@ -456,7 +456,7 @@
}
catch ( TransformerException e )
{
- throw new DocRendererException( "Error transformer Document from " + document + ": " + e.getMessage() );
+ throw new DocumentRendererException( "Error transformer Document from " + document + ": " + e.getMessage() );
}
}
}
Modified: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRenderer.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRenderer.java?rev=583285&r1=583284&r2=583285&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRenderer.java (original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/DefaultPdfRenderer.java Tue Oct 9 13:13:04 2007
@@ -24,7 +24,7 @@
import java.io.FileOutputStream;
import java.io.IOException;
-import org.apache.maven.doxia.docrenderer.DocRendererException;
+import org.apache.maven.doxia.docrenderer.DocumentRendererException;
import org.apache.maven.doxia.module.itext.ITextUtil;
/**
@@ -50,7 +50,7 @@
* @see org.apache.maven.doxia.docrenderer.itext.AbstractITextRender#generateOutput(java.io.File, java.io.File)
*/
public void generateOutput( File iTextFile, File iTextOutput )
- throws DocRendererException, IOException
+ throws DocumentRendererException, IOException
{
getLogger().debug( "Writing : " + iTextOutput );
try
@@ -59,7 +59,7 @@
}
catch ( RuntimeException e )
{
- throw new DocRendererException( "Error writing PDF from " + iTextOutput + ": " + e.getMessage() );
+ throw new DocumentRendererException( "Error writing PDF from " + iTextOutput + ": " + e.getMessage() );
}
}
}
Modified: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/DefaultRtfRenderer.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/DefaultRtfRenderer.java?rev=583285&r1=583284&r2=583285&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/DefaultRtfRenderer.java (original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/DefaultRtfRenderer.java Tue Oct 9 13:13:04 2007
@@ -24,7 +24,7 @@
import java.io.FileOutputStream;
import java.io.IOException;
-import org.apache.maven.doxia.docrenderer.DocRendererException;
+import org.apache.maven.doxia.docrenderer.DocumentRendererException;
import org.apache.maven.doxia.module.itext.ITextUtil;
/**
@@ -50,7 +50,7 @@
* @see org.apache.maven.doxia.docrenderer.itext.AbstractITextRender#generateOutput(java.io.File, java.io.File)
*/
public void generateOutput( File iTextFile, File iTextOutput )
- throws DocRendererException, IOException
+ throws DocumentRendererException, IOException
{
getLogger().debug( "Writing : " + iTextOutput );
try
@@ -59,7 +59,7 @@
}
catch ( RuntimeException e )
{
- throw new DocRendererException( "Error writing RTF from " + iTextOutput + ": " + e.getMessage() );
+ throw new DocumentRendererException( "Error writing RTF from " + iTextOutput + ": " + e.getMessage() );
}
}
}
Modified: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/PdfRenderer.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/PdfRenderer.java?rev=583285&r1=583284&r2=583285&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/PdfRenderer.java (original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/PdfRenderer.java Tue Oct 9 13:13:04 2007
@@ -22,7 +22,7 @@
import java.io.File;
import org.apache.maven.doxia.docrenderer.DocumentRenderer;
-import org.apache.maven.doxia.docrenderer.DocRendererException;
+import org.apache.maven.doxia.docrenderer.DocumentRendererException;
/**
* PDF renderer interface.
@@ -40,8 +40,8 @@
*
* @param inputFile eg a fo or an itext file.
* @param pdfFile the pdf file to generate.
- * @throws DocRendererException if any.
+ * @throws DocumentRendererException if any.
*/
void generatePdf( File inputFile, File pdfFile )
- throws DocRendererException;
+ throws DocumentRendererException;
}
Modified: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/fo/FoPdfRenderer.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/fo/FoPdfRenderer.java?rev=583285&r1=583284&r2=583285&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/fo/FoPdfRenderer.java (original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/fo/FoPdfRenderer.java Tue Oct 9 13:13:04 2007
@@ -28,7 +28,7 @@
import javax.xml.transform.TransformerException;
-import org.apache.maven.doxia.docrenderer.DocRendererException;
+import org.apache.maven.doxia.docrenderer.DocumentRendererException;
import org.apache.maven.doxia.docrenderer.document.DocumentModel;
import org.apache.maven.doxia.docrenderer.document.DocumentTOCItem;
import org.apache.maven.doxia.docrenderer.pdf.AbstractPdfRenderer;
@@ -52,11 +52,11 @@
*
* @param foFile the FO file.
* @param pdfFile the target PDF file.
- * @throws DocRendererException In case of a conversion problem.
+ * @throws DocumentRendererException In case of a conversion problem.
* @see org.apache.maven.doxia.module.fo.FoUtils#convertFO2PDF(File,File,String);
*/
public void generatePdf( File foFile, File pdfFile )
- throws DocRendererException
+ throws DocumentRendererException
{
getLogger().debug( "Generating: " + pdfFile );
@@ -66,14 +66,14 @@
}
catch ( TransformerException e )
{
- throw new DocRendererException( "Error creating PDF from " + foFile + ": " + e.getMessage() );
+ throw new DocumentRendererException( "Error creating PDF from " + foFile + ": " + e.getMessage() );
}
}
/** {@inheritDoc} */
public void render( Map files, File outputDirectory, DocumentModel model )
- throws DocRendererException, IOException
+ throws DocumentRendererException, IOException
{
String outputName = model.getOutputName();
Modified: maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/itext/ITextPdfRenderer.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/itext/ITextPdfRenderer.java?rev=583285&r1=583284&r2=583285&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/itext/ITextPdfRenderer.java (original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/itext/ITextPdfRenderer.java Tue Oct 9 13:13:04 2007
@@ -42,7 +42,7 @@
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
-import org.apache.maven.doxia.docrenderer.DocRendererException;
+import org.apache.maven.doxia.docrenderer.DocumentRendererException;
import org.apache.maven.doxia.docrenderer.document.DocumentModel;
import org.apache.maven.doxia.docrenderer.pdf.AbstractPdfRenderer;
import org.apache.maven.doxia.module.itext.ITextSink;
@@ -85,10 +85,10 @@
*
* @param iTextFile the iText file.
* @param pdfFile the target PDF file.
- * @throws DocRendererException In case of a conversion problem.
+ * @throws DocumentRendererException In case of a conversion problem.
*/
public void generatePdf( File iTextFile, File pdfFile )
- throws DocRendererException
+ throws DocumentRendererException
{
getLogger().debug( "Generating : " + pdfFile );
@@ -98,17 +98,17 @@
}
catch ( IOException e )
{
- throw new DocRendererException( "Cannot create PDF from " + iTextFile + ": " + e.getMessage(), e );
+ throw new DocumentRendererException( "Cannot create PDF from " + iTextFile + ": " + e.getMessage(), e );
}
catch ( RuntimeException e )
{
- throw new DocRendererException( "Error creating PDF from " + iTextFile + ": " + e.getMessage(), e );
+ throw new DocumentRendererException( "Error creating PDF from " + iTextFile + ": " + e.getMessage(), e );
}
}
/** {@inheritDoc} */
public void render( Map files, File outputDirectory, DocumentModel model )
- throws DocRendererException, IOException
+ throws DocumentRendererException, IOException
{
String outputName = model.getOutputName();
@@ -182,11 +182,11 @@
* @param fullDocPath absolute path to the source document.
* @param module the site module associated with the source document (determines the parser to use).
* @param iTextFile the resulting iText xml file.
- * @throws DocRendererException in case of a parsing problem.
+ * @throws DocumentRendererException in case of a parsing problem.
* @throws IOException if the source and/or target document cannot be opened.
*/
private void parse( String fullDocPath, SiteModule module, File iTextFile )
- throws DocRendererException, IOException
+ throws DocumentRendererException, IOException
{
ITextSink sink = new ITextSink( new FileWriter( iTextFile ) );
@@ -202,11 +202,11 @@
*
* @param iTextFiles list of iText xml files.
* @return Document.
- * @throws DocRendererException if any.
+ * @throws DocumentRendererException if any.
* @throws IOException if any.
*/
private Document generateDocument( List iTextFiles )
- throws DocRendererException, IOException
+ throws DocumentRendererException, IOException
{
Document document;
@@ -216,7 +216,7 @@
}
catch ( ParserConfigurationException e )
{
- throw new DocRendererException( "Error building document :" + e.getMessage() );
+ throw new DocumentRendererException( "Error building document :" + e.getMessage() );
}
document.appendChild( document.createElement( ElementTags.ITEXT ) ); // Used only to set a root
@@ -233,11 +233,11 @@
}
catch ( SAXException e )
{
- throw new DocRendererException( "SAX Error : " + e.getMessage() );
+ throw new DocumentRendererException( "SAX Error : " + e.getMessage() );
}
catch ( ParserConfigurationException e )
{
- throw new DocRendererException( "Error parsing configuration : " + e.getMessage() );
+ throw new DocumentRendererException( "Error parsing configuration : " + e.getMessage() );
}
// Only one chapter per doc
@@ -249,7 +249,7 @@
}
catch ( DOMException e )
{
- throw new DocRendererException( "Error appending chapter for " + iTextFile + " : " + e.getMessage() );
+ throw new DocumentRendererException( "Error appending chapter for " + iTextFile + " : " + e.getMessage() );
}
}
@@ -260,10 +260,10 @@
* Initialize the transformer object.
*
* @return an instance of a transformer object.
- * @throws DocRendererException if any.
+ * @throws DocumentRendererException if any.
*/
private Transformer initTransformer()
- throws DocRendererException
+ throws DocumentRendererException
{
try
{
@@ -284,12 +284,12 @@
}
catch ( TransformerConfigurationException e )
{
- throw new DocRendererException( "Error configuring Transformer for " + XSLT_RESOURCE + ": "
+ throw new DocumentRendererException( "Error configuring Transformer for " + XSLT_RESOURCE + ": "
+ e.getMessage() );
}
catch ( IllegalArgumentException e )
{
- throw new DocRendererException( "Error configuring Transformer for " + XSLT_RESOURCE + ": "
+ throw new DocumentRendererException( "Error configuring Transformer for " + XSLT_RESOURCE + ": "
+ e.getMessage() );
}
}
@@ -351,10 +351,10 @@
* @param documentModel the DocumentModel to take the parameters from.
* @param document the Document to transform.
* @param iTextFile the resulting iText xml file.
- * @throws DocRendererException in case of a transformation error.
+ * @throws DocumentRendererException in case of a transformation error.
*/
private void transform( DocumentModel documentModel, Document document, File iTextFile )
- throws DocRendererException
+ throws DocumentRendererException
{
Transformer transformer = initTransformer();
@@ -366,7 +366,7 @@
}
catch ( TransformerException e )
{
- throw new DocRendererException( "Error transforming Document " + document + ": " + e.getMessage() );
+ throw new DocumentRendererException( "Error transforming Document " + document + ": " + e.getMessage() );
}
}
}