org.apache.maven.doxia.book
Class DefaultBookDoxia

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.apache.maven.doxia.book.DefaultBookDoxia
All Implemented Interfaces:
BookDoxia, org.codehaus.plexus.logging.LogEnabled

public class DefaultBookDoxia
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements BookDoxia

Default implementation of BookDoxia.

Version:
$Id: DefaultBookDoxia.java 1090706 2011-04-09 23:15:28Z hboutemy $
Author:
Trygve Laugstøl
Plexus component

Field Summary
 
Fields inherited from interface org.apache.maven.doxia.book.BookDoxia
ROLE
 
Constructor Summary
DefaultBookDoxia()
           
 
Method Summary
 Set<String> getAvailableBookRenderers()
          Returns a Set of ids of the BookRenderers that are available in this BookDoxia.
 BookModel loadBook(File bookDescriptor)
          Load a BookModel from a descriptor file.
 void renderBook(BookModel book, String bookRendererId, List<File> files, File outputDirectory)
          Creates a book from a BookModel using the Locale.getDefault() and UTF-8 as default encoding.
 void renderBook(BookModel book, String bookRendererId, List<File> files, File outputDirectory, Locale locale, String inputEncoding, String outputEncoding)
          Creates a book from a BookModel.
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBookDoxia

public DefaultBookDoxia()
Method Detail

loadBook

public BookModel loadBook(File bookDescriptor)
                   throws BookDoxiaException
Load a BookModel from a descriptor file.

Specified by:
loadBook in interface BookDoxia
Parameters:
bookDescriptor - the book descriptor file.
Returns:
BookModel
Throws:
BookDoxiaException - if the model cannot be loaded.

renderBook

public void renderBook(BookModel book,
                       String bookRendererId,
                       List<File> files,
                       File outputDirectory)
                throws BookDoxiaException
Creates a book from a BookModel using the Locale.getDefault() and UTF-8 as default encoding.

Specified by:
renderBook in interface BookDoxia
Parameters:
book - the BookModel.
bookRendererId - the id of the output format.
files - a list of source files.
outputDirectory - the output directory.
Throws:
BookDoxiaException - if the model cannot be loaded.
See Also:
BookDoxia.renderBook(BookModel, String, List, File, Locale, String, String), Locale.getDefault()

renderBook

public void renderBook(BookModel book,
                       String bookRendererId,
                       List<File> files,
                       File outputDirectory,
                       Locale locale,
                       String inputEncoding,
                       String outputEncoding)
                throws BookDoxiaException
Creates a book from a BookModel.

Specified by:
renderBook in interface BookDoxia
Parameters:
book - the BookModel.
bookRendererId - the id of the output format.
files - a list of source files.
outputDirectory - the output directory.
locale - the wanted locale.
inputEncoding - the input encoding when processing files.
outputEncoding - the output encoding when writing files in ouputDirectory.
Throws:
BookDoxiaException - if the model cannot be loaded.

getAvailableBookRenderers

public Set<String> getAvailableBookRenderers()
Returns a Set of ids of the BookRenderers that are available in this BookDoxia.

Returns:
Set


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.