org.apache.maven.doxia.util
Class ConverterUtil

java.lang.Object
  extended by org.apache.maven.doxia.util.ConverterUtil

public class ConverterUtil
extends Object

Utility class to play with Doxia objects.

Version:
$Id$
Author:
Vincent Siveton

Constructor Summary
ConverterUtil()
           
 
Method Summary
static org.apache.maven.doxia.parser.Parser getParser(org.codehaus.plexus.PlexusContainer plexus, String format, String[] supportedFormats)
           
static org.apache.maven.doxia.sink.SinkFactory getSinkFactory(org.codehaus.plexus.PlexusContainer plexus, String format, String[] supportedFormats)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConverterUtil

public ConverterUtil()
Method Detail

getParser

public static org.apache.maven.doxia.parser.Parser getParser(org.codehaus.plexus.PlexusContainer plexus,
                                                             String format,
                                                             String[] supportedFormats)
                                                      throws org.codehaus.plexus.component.repository.exception.ComponentLookupException,
                                                             UnsupportedFormatException
Parameters:
plexus - not null
format - not null
supportedFormats - not null
Returns:
an instance of Parser depending on the format.
Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException - if could not find the Parser for the given format.
UnsupportedFormatException - if the found parser is not instantiated.
IllegalArgumentException - if any parameter is null

getSinkFactory

public static org.apache.maven.doxia.sink.SinkFactory getSinkFactory(org.codehaus.plexus.PlexusContainer plexus,
                                                                     String format,
                                                                     String[] supportedFormats)
                                                              throws org.codehaus.plexus.component.repository.exception.ComponentLookupException,
                                                                     UnsupportedFormatException
Parameters:
plexus - not null
format - not null
supportedFormats - not null
Returns:
an instance of SinkFactory depending on the given format.
Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException - if could not find the SinkFactory for the given format.
UnsupportedFormatException - if the found sink is not instantiated.
IOException - if any.
IllegalArgumentException - if any parameter is null


Copyright © 2005-2010 FuseSource. All Rights Reserved.