Skip to content

Commit

Permalink
[DOXIASITETOOLS-236] Deprecate Doxia Sitetools Doc Renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-o committed Nov 28, 2021
1 parent eccba71 commit cabe7d3
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 6 deletions.
Expand Up @@ -69,6 +69,7 @@
* @author ltheussl
* @since 1.1
*/
@Deprecated
public abstract class AbstractDocumentRenderer
extends AbstractLogEnabled
implements DocumentRenderer
Expand Down
Expand Up @@ -28,6 +28,7 @@
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
* @deprecated Since 1.1, use {@link DocumentRenderer} instead.
*/
@Deprecated
public interface DocRenderer
{
/** Plexus lookup. */
Expand Down
Expand Up @@ -32,6 +32,7 @@
* @author ltheussl
* @since 1.1
*/
@Deprecated
public interface DocumentRenderer
{
/** Plexus lookup role. */
Expand Down
Expand Up @@ -30,6 +30,7 @@
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
* @since 1.1.2
*/
@Deprecated
public class DocumentRendererContext
{
private String inputEncoding = ReaderFactory.UTF_8;
Expand Down
Expand Up @@ -25,6 +25,7 @@
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
* @since 1.1
*/
@Deprecated
public class DocumentRendererException
extends Exception
{
Expand Down
Expand Up @@ -34,6 +34,7 @@
* @author ltheussl
* @since 1.1
*/
@Deprecated
public abstract class AbstractPdfRenderer
extends AbstractDocumentRenderer
implements PdfRenderer
Expand Down
Expand Up @@ -30,6 +30,7 @@
* @author ltheussl
* @since 1.1
*/
@Deprecated
public interface PdfRenderer
extends DocumentRenderer
{
Expand Down
Expand Up @@ -55,6 +55,7 @@
* @author ltheussl
* @since 1.1
*/
@Deprecated
@Component( role = PdfRenderer.class, hint = "fo" )
public class FoPdfRenderer
extends AbstractPdfRenderer
Expand Down Expand Up @@ -300,7 +301,7 @@ private void renderModules( String href, FoAggregateSink sink, DocumentTOCItem t
{
String doc = href + "." + extension;
File source = new File( moduleBasedir, doc );

// Velocity file?
if ( !source.exists() )
{
Expand All @@ -314,12 +315,12 @@ private void renderModules( String href, FoAggregateSink sink, DocumentTOCItem t
}
source = new File( moduleBasedir, doc );
}

if ( source.exists() )
{
sink.setDocumentName( doc );
sink.setDocumentTitle( tocItem.getName() );

parse( source.getPath(), module.getParserId(), sink, context );
}
}
Expand Down
Expand Up @@ -79,6 +79,7 @@
* @author ltheussl
* @since 1.1
*/
@Deprecated
@Component( role = PdfRenderer.class, hint = "itext" )
public class ITextPdfRenderer
extends AbstractPdfRenderer
Expand Down Expand Up @@ -611,7 +612,7 @@ private List<File> parseTOCFiles( File outputDirectory, DocumentModel documentMo
{
String doc = href + "." + extension;
File source = new File( moduleBasedir, doc );

// Velocity file?
if ( !source.exists() )
{
Expand All @@ -625,7 +626,7 @@ private List<File> parseTOCFiles( File outputDirectory, DocumentModel documentMo
}
source = new File( moduleBasedir, doc );
}

if ( source.exists() )
{
String outputITextName = doc.substring( 0, doc.lastIndexOf( '.' ) + 1 ) + "xml";
Expand All @@ -635,7 +636,7 @@ private List<File> parseTOCFiles( File outputDirectory, DocumentModel documentMo
{
outputITextFileTmp.getParentFile().mkdirs();
}

iTextFiles.add( outputITextFileTmp );
parse( source, module, outputITextFileTmp, context );
}
Expand Down
27 changes: 27 additions & 0 deletions doxia-doc-renderer/src/site/apt/index.apt
@@ -0,0 +1,27 @@
--------------
Maven Doxia Sitetools Doc Renderer
--------------

~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements. See the NOTICE file
~~ distributed with this work for additional information
~~ regarding copyright ownership. The ASF licenses this file
~~ to you under the Apache License, Version 2.0 (the
~~ "License"); you may not use this file except in compliance
~~ with the License. You may obtain a copy of the License at
~~
~~ http://www.apache.org/licenses/LICENSE-2.0
~~
~~ Unless required by applicable law or agreed to in writing,
~~ software distributed under the License is distributed on an
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~~ KIND, either express or implied. See the License for the
~~ specific language governing permissions and limitations
~~ under the License.

~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/doxia/references/apt-format.html

Deprecation Notice

This Doxia Sitetools module is deprecated and will be removed in version 2.0.0.

0 comments on commit cabe7d3

Please sign in to comment.