mirror of https://github.com/apache/maven.git
PR: MNG-2410
Desc: Add support for multi-page reports using multiple sinks. * Removed unused MultiPageSink and SinkFactory, and the AbstractMavenMultiPageReport (could not find any class extending that one, even in Mojo; Also, it doesn't work so It's safe to delete). * Updated deps on doxia-sink-api to 1.0-alpha-9-SNAPSHOT which has the SinkFactory interface. * Updated dep on doxia-site-renderer to 1.0-alpha-9-SNAPSHOT since that uses the sink-api. * For backwards compatibility I added an MavenMultiPageReport interface. Normal reporting plugins can implement that, and the site plugin detects this interface and calls the new generate api method with the SinkFactory parameter. In the future, the MavenMultiPageReport should be merged with the MavenReport interface, and the original generate method should be removed. This is the only way to alter the API without breaking existing plugins. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@430440 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bcdabaeb7c
commit
97fd4a9ae1
|
@ -41,7 +41,7 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.maven.doxia</groupId>
|
||||
<artifactId>doxia-sink-api</artifactId>
|
||||
<version>1.0-alpha-7</version>
|
||||
<version>1.0-alpha-9-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
package org.apache.maven.reporting;
|
||||
|
||||
/*
|
||||
* Copyright 2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
import org.apache.maven.doxia.sink.Sink;
|
||||
import org.apache.maven.doxia.sink.SinkFactory;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Temporary class for backwards compatibility. This method
|
||||
* should be moved to the MavenReport class, and the other 'generate'
|
||||
* method should be dropped. But that will render all reporting mojo's
|
||||
* uncompilable.
|
||||
*
|
||||
* @author <a href="mailto:kenney@apache.org">Kenney Westerhof</a>
|
||||
*/
|
||||
public interface MavenMultiPageReport
|
||||
extends MavenReport
|
||||
{
|
||||
void generate( Sink sink, SinkFactory sinkFactory, Locale locale )
|
||||
throws MavenReportException;
|
||||
}
|
|
@ -48,6 +48,11 @@
|
|||
<artifactId>commons-validator</artifactId>
|
||||
<version>1.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.doxia</groupId>
|
||||
<artifactId>doxia-sink-api</artifactId>
|
||||
<version>1.0-alpha-9-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.doxia</groupId>
|
||||
<artifactId>doxia-core</artifactId>
|
||||
|
@ -56,7 +61,7 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.maven.doxia</groupId>
|
||||
<artifactId>doxia-site-renderer</artifactId>
|
||||
<version>1.0-alpha-7</version>
|
||||
<version>1.0-alpha-9-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
|
|
|
@ -1,109 +0,0 @@
|
|||
package org.apache.maven.reporting;
|
||||
|
||||
/*
|
||||
* Copyright 2001-2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
import org.apache.maven.doxia.sink.Sink;
|
||||
import org.apache.maven.doxia.siterenderer.RendererException;
|
||||
import org.apache.maven.reporting.sink.MultiPageSink;
|
||||
import org.apache.maven.reporting.sink.SinkFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author <a href="evenisse@apache.org">Emmanuel Venisse</a>
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class AbstractMavenMultiPageReport
|
||||
extends AbstractMavenReport
|
||||
{
|
||||
private SinkFactory factory;
|
||||
|
||||
private List sinks = new ArrayList();
|
||||
|
||||
public void setSinkFactory( SinkFactory factory )
|
||||
{
|
||||
this.factory = factory;
|
||||
}
|
||||
|
||||
public SinkFactory getSinkFactory()
|
||||
{
|
||||
return factory;
|
||||
}
|
||||
|
||||
public boolean useDefaultSiteDescriptor()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public abstract boolean usePageLinkBar();
|
||||
|
||||
private Sink getSink( String outputName )
|
||||
throws RendererException, IOException
|
||||
{
|
||||
return factory.getSink( outputName );
|
||||
}
|
||||
|
||||
public MultiPageSink startPage( String outputName )
|
||||
throws RendererException, IOException
|
||||
{
|
||||
return new MultiPageSink( outputName, getSink( outputName ) );
|
||||
}
|
||||
|
||||
public void endPage( MultiPageSink sink )
|
||||
{
|
||||
if ( usePageLinkBar() )
|
||||
{
|
||||
sinks.add( sink );
|
||||
}
|
||||
else
|
||||
{
|
||||
sink.closeSink();
|
||||
}
|
||||
}
|
||||
|
||||
protected void closeReport()
|
||||
{
|
||||
if ( !sinks.isEmpty() )
|
||||
{
|
||||
for ( Iterator i = sinks.iterator(); i.hasNext(); )
|
||||
{
|
||||
MultiPageSink currentSink = (MultiPageSink) i.next();
|
||||
|
||||
currentSink.paragraph();
|
||||
|
||||
for ( int counter = 1; counter <= sinks.size(); counter++ )
|
||||
{
|
||||
if ( counter > 1 )
|
||||
{
|
||||
currentSink.text( " " );
|
||||
}
|
||||
MultiPageSink sink = (MultiPageSink) sinks.get( counter - 1 );
|
||||
sink.link( sink.getOutputName() + ".html" );
|
||||
sink.text( String.valueOf( counter ) );
|
||||
sink.link_();
|
||||
}
|
||||
currentSink.paragraph_();
|
||||
currentSink.closeSink();
|
||||
}
|
||||
}
|
||||
|
||||
super.closeReport();
|
||||
}
|
||||
}
|
|
@ -17,6 +17,7 @@ package org.apache.maven.reporting;
|
|||
*/
|
||||
|
||||
import org.apache.maven.doxia.sink.Sink;
|
||||
import org.apache.maven.doxia.sink.SinkFactory;
|
||||
import org.apache.maven.doxia.siterenderer.Renderer;
|
||||
import org.apache.maven.doxia.siterenderer.RendererException;
|
||||
import org.apache.maven.doxia.siterenderer.sink.SiteRendererSink;
|
||||
|
@ -40,6 +41,8 @@ public abstract class AbstractMavenReport
|
|||
{
|
||||
private Sink sink;
|
||||
|
||||
private SinkFactory sinkFactory;
|
||||
|
||||
private Locale locale = Locale.ENGLISH;
|
||||
|
||||
protected abstract Renderer getSiteRenderer();
|
||||
|
@ -51,45 +54,44 @@ public abstract class AbstractMavenReport
|
|||
private File reportOutputDirectory;
|
||||
|
||||
/**
|
||||
* TODO: This method is never called - all reports are rendered by maven-site-plugin's
|
||||
* ReportDocumentRender.
|
||||
*
|
||||
* @see org.apache.maven.plugin.Mojo#execute()
|
||||
*/
|
||||
public void execute()
|
||||
throws MojoExecutionException
|
||||
{
|
||||
try
|
||||
{
|
||||
String outputDirectory = getOutputDirectory();
|
||||
|
||||
SiteRendererSink sink =
|
||||
getSiteRenderer().createSink( new File( outputDirectory ), getOutputName() + ".html" );
|
||||
|
||||
generate( sink, Locale.getDefault() );
|
||||
|
||||
// TODO: add back when skinning support is in the site renderer
|
||||
// getSiteRenderer().copyResources( outputDirectory, "maven" );
|
||||
}
|
||||
catch ( RendererException e )
|
||||
{
|
||||
throw new MojoExecutionException( "An error has occurred in " + getName( locale ) + " report generation.",
|
||||
e );
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
throw new MojoExecutionException( "An error has occurred in " + getName( locale ) + " report generation.",
|
||||
e );
|
||||
}
|
||||
catch ( MavenReportException e )
|
||||
{
|
||||
throw new MojoExecutionException( "An error has occurred in " + getName( locale ) + " report generation.",
|
||||
e );
|
||||
}
|
||||
throw new MojoExecutionException( "Reporting mojo's can only be called from ReportDocumentRender" );
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.apache.maven.reporting.MavenReport#generate(org.codehaus.doxia.sink.Sink, java.util.Locale)
|
||||
* @see org.apache.maven.reporting.MavenReport#generate(org.apache.maven.doxia.sink.Sink, org.apache.maven.reporting.SinkFactory, java.util.Locale)
|
||||
* @deprecated
|
||||
*/
|
||||
public void generate( org.codehaus.doxia.sink.Sink sink, Locale locale )
|
||||
throws MavenReportException
|
||||
{
|
||||
getLog().warn( "Deprecated API called - no SinkFactory available. Please update this plugin." );
|
||||
generate( sink, null, locale );
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.apache.maven.reporting.MavenReport#generate(org.apache.maven.doxia.sink.Sink, org.apache.maven.reporting.SinkFactory, java.util.Locale)
|
||||
* @deprecated
|
||||
*/
|
||||
public void generate( Sink sink, Locale locale )
|
||||
throws MavenReportException
|
||||
{
|
||||
getLog().warn( "Deprecated API called - no SinkFactory available. Please update this plugin." );
|
||||
generate( sink, null, locale );
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.apache.maven.reporting.MavenReport#generate(org.apache.maven.doxia.sink.Sink, org.apache.maven.reporting.SinkFactory, java.util.Locale)
|
||||
*/
|
||||
public void generate( Sink sink, SinkFactory sinkFactory, Locale locale )
|
||||
throws MavenReportException
|
||||
{
|
||||
if ( sink == null )
|
||||
{
|
||||
|
@ -98,6 +100,8 @@ public abstract class AbstractMavenReport
|
|||
|
||||
this.sink = sink;
|
||||
|
||||
this.sinkFactory = sinkFactory;
|
||||
|
||||
executeReport( locale );
|
||||
|
||||
closeReport();
|
||||
|
@ -134,6 +138,11 @@ public abstract class AbstractMavenReport
|
|||
return sink;
|
||||
}
|
||||
|
||||
public SinkFactory getSinkFactory()
|
||||
{
|
||||
return sinkFactory;
|
||||
}
|
||||
|
||||
public boolean isExternalReport()
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -1,749 +0,0 @@
|
|||
package org.apache.maven.reporting.sink;
|
||||
|
||||
/*
|
||||
* Copyright 2001-2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
import org.apache.maven.doxia.sink.SinkAdapter;
|
||||
import org.apache.maven.doxia.sink.Sink;
|
||||
|
||||
/**
|
||||
* @author Emmanuel Venisse
|
||||
*
|
||||
*/
|
||||
public class MultiPageSink
|
||||
extends SinkAdapter
|
||||
{
|
||||
private String outputName;
|
||||
|
||||
private Sink sink;
|
||||
|
||||
public MultiPageSink( String outputName, Sink sink )
|
||||
{
|
||||
this.outputName = outputName;
|
||||
this.sink = sink;
|
||||
}
|
||||
|
||||
public String getOutputName()
|
||||
{
|
||||
return outputName;
|
||||
}
|
||||
|
||||
public Sink getEmbeddedSink()
|
||||
{
|
||||
return sink;
|
||||
}
|
||||
|
||||
public void closeSink()
|
||||
{
|
||||
sink.body_();
|
||||
sink.flush();
|
||||
sink.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#anchor_()
|
||||
*/
|
||||
public void anchor_()
|
||||
{
|
||||
sink.anchor_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#anchor(java.lang.String)
|
||||
*/
|
||||
public void anchor( String arg0 )
|
||||
{
|
||||
sink.anchor( arg0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#author_()
|
||||
*/
|
||||
public void author_()
|
||||
{
|
||||
sink.author_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#author()
|
||||
*/
|
||||
public void author()
|
||||
{
|
||||
sink.author();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#body()
|
||||
*/
|
||||
public void body()
|
||||
{
|
||||
sink.body();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#body_()
|
||||
*/
|
||||
public void body_()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#bold_()
|
||||
*/
|
||||
public void bold_()
|
||||
{
|
||||
sink.bold_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#bold()
|
||||
*/
|
||||
public void bold()
|
||||
{
|
||||
sink.bold();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#close()
|
||||
*/
|
||||
public void close()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#date_()
|
||||
*/
|
||||
public void date_()
|
||||
{
|
||||
sink.date_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#date()
|
||||
*/
|
||||
public void date()
|
||||
{
|
||||
sink.date();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#definedTerm_()
|
||||
*/
|
||||
public void definedTerm_()
|
||||
{
|
||||
sink.definedTerm_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#definedTerm()
|
||||
*/
|
||||
public void definedTerm()
|
||||
{
|
||||
sink.definedTerm();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#definition_()
|
||||
*/
|
||||
public void definition_()
|
||||
{
|
||||
sink.definition_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#definition()
|
||||
*/
|
||||
public void definition()
|
||||
{
|
||||
sink.definition();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#definitionList_()
|
||||
*/
|
||||
public void definitionList_()
|
||||
{
|
||||
sink.definitionList_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#definitionList()
|
||||
*/
|
||||
public void definitionList()
|
||||
{
|
||||
sink.definitionList();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#definitionListItem_()
|
||||
*/
|
||||
public void definitionListItem_()
|
||||
{
|
||||
sink.definitionListItem_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#definitionListItem()
|
||||
*/
|
||||
public void definitionListItem()
|
||||
{
|
||||
sink.definitionListItem();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#figure_()
|
||||
*/
|
||||
public void figure_()
|
||||
{
|
||||
sink.figure_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#figure()
|
||||
*/
|
||||
public void figure()
|
||||
{
|
||||
sink.figure();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#figureCaption_()
|
||||
*/
|
||||
public void figureCaption_()
|
||||
{
|
||||
sink.figureCaption_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#figureCaption()
|
||||
*/
|
||||
public void figureCaption()
|
||||
{
|
||||
sink.figureCaption();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#figureGraphics(java.lang.String)
|
||||
*/
|
||||
public void figureGraphics( String arg0 )
|
||||
{
|
||||
sink.figureGraphics( arg0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#flush()
|
||||
*/
|
||||
public void flush()
|
||||
{
|
||||
sink.flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#head_()
|
||||
*/
|
||||
public void head_()
|
||||
{
|
||||
sink.head_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#head()
|
||||
*/
|
||||
public void head()
|
||||
{
|
||||
sink.head();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#horizontalRule()
|
||||
*/
|
||||
public void horizontalRule()
|
||||
{
|
||||
sink.horizontalRule();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#italic_()
|
||||
*/
|
||||
public void italic_()
|
||||
{
|
||||
sink.italic_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#italic()
|
||||
*/
|
||||
public void italic()
|
||||
{
|
||||
sink.italic();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#lineBreak()
|
||||
*/
|
||||
public void lineBreak()
|
||||
{
|
||||
sink.lineBreak();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#link_()
|
||||
*/
|
||||
public void link_()
|
||||
{
|
||||
sink.link_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#link(java.lang.String)
|
||||
*/
|
||||
public void link( String arg0 )
|
||||
{
|
||||
sink.link( arg0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#list_()
|
||||
*/
|
||||
public void list_()
|
||||
{
|
||||
sink.list_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#list()
|
||||
*/
|
||||
public void list()
|
||||
{
|
||||
sink.list();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#listItem_()
|
||||
*/
|
||||
public void listItem_()
|
||||
{
|
||||
sink.listItem_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#listItem()
|
||||
*/
|
||||
public void listItem()
|
||||
{
|
||||
sink.listItem();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#monospaced_()
|
||||
*/
|
||||
public void monospaced_()
|
||||
{
|
||||
sink.monospaced_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#monospaced()
|
||||
*/
|
||||
public void monospaced()
|
||||
{
|
||||
sink.monospaced();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#nonBreakingSpace()
|
||||
*/
|
||||
public void nonBreakingSpace()
|
||||
{
|
||||
sink.nonBreakingSpace();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#numberedList_()
|
||||
*/
|
||||
public void numberedList_()
|
||||
{
|
||||
sink.numberedList_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#numberedList(int)
|
||||
*/
|
||||
public void numberedList( int arg0 )
|
||||
{
|
||||
sink.numberedList( arg0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#numberedListItem_()
|
||||
*/
|
||||
public void numberedListItem_()
|
||||
{
|
||||
sink.numberedListItem_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#numberedListItem()
|
||||
*/
|
||||
public void numberedListItem()
|
||||
{
|
||||
sink.numberedListItem();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#pageBreak()
|
||||
*/
|
||||
public void pageBreak()
|
||||
{
|
||||
sink.pageBreak();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#paragraph_()
|
||||
*/
|
||||
public void paragraph_()
|
||||
{
|
||||
sink.paragraph_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#paragraph()
|
||||
*/
|
||||
public void paragraph()
|
||||
{
|
||||
sink.paragraph();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#rawText(java.lang.String)
|
||||
*/
|
||||
public void rawText( String arg0 )
|
||||
{
|
||||
sink.rawText( arg0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#section1_()
|
||||
*/
|
||||
public void section1_()
|
||||
{
|
||||
sink.section1_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#section1()
|
||||
*/
|
||||
public void section1()
|
||||
{
|
||||
sink.section1();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#section2_()
|
||||
*/
|
||||
public void section2_()
|
||||
{
|
||||
sink.section2_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#section2()
|
||||
*/
|
||||
public void section2()
|
||||
{
|
||||
sink.section2();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#section3_()
|
||||
*/
|
||||
public void section3_()
|
||||
{
|
||||
sink.section3_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#section3()
|
||||
*/
|
||||
public void section3()
|
||||
{
|
||||
sink.section3();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#section4_()
|
||||
*/
|
||||
public void section4_()
|
||||
{
|
||||
sink.section4_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#section4()
|
||||
*/
|
||||
public void section4()
|
||||
{
|
||||
sink.section4();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#section5_()
|
||||
*/
|
||||
public void section5_()
|
||||
{
|
||||
sink.section5_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#section5()
|
||||
*/
|
||||
public void section5()
|
||||
{
|
||||
sink.section5();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#sectionTitle_()
|
||||
*/
|
||||
public void sectionTitle_()
|
||||
{
|
||||
sink.sectionTitle_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#sectionTitle()
|
||||
*/
|
||||
public void sectionTitle()
|
||||
{
|
||||
sink.sectionTitle();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#sectionTitle1_()
|
||||
*/
|
||||
public void sectionTitle1_()
|
||||
{
|
||||
sink.sectionTitle1_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#sectionTitle1()
|
||||
*/
|
||||
public void sectionTitle1()
|
||||
{
|
||||
sink.sectionTitle1();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#sectionTitle2_()
|
||||
*/
|
||||
public void sectionTitle2_()
|
||||
{
|
||||
sink.sectionTitle2_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#sectionTitle2()
|
||||
*/
|
||||
public void sectionTitle2()
|
||||
{
|
||||
sink.sectionTitle2();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#sectionTitle3_()
|
||||
*/
|
||||
public void sectionTitle3_()
|
||||
{
|
||||
sink.sectionTitle3_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#sectionTitle3()
|
||||
*/
|
||||
public void sectionTitle3()
|
||||
{
|
||||
sink.sectionTitle3();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#sectionTitle4_()
|
||||
*/
|
||||
public void sectionTitle4_()
|
||||
{
|
||||
sink.sectionTitle4_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#sectionTitle4()
|
||||
*/
|
||||
public void sectionTitle4()
|
||||
{
|
||||
sink.sectionTitle4();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#sectionTitle5_()
|
||||
*/
|
||||
public void sectionTitle5_()
|
||||
{
|
||||
sink.sectionTitle5_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#sectionTitle5()
|
||||
*/
|
||||
public void sectionTitle5()
|
||||
{
|
||||
sink.sectionTitle5();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#table_()
|
||||
*/
|
||||
public void table_()
|
||||
{
|
||||
sink.table_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#table()
|
||||
*/
|
||||
public void table()
|
||||
{
|
||||
sink.table();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#tableCaption_()
|
||||
*/
|
||||
public void tableCaption_()
|
||||
{
|
||||
sink.tableCaption_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#tableCaption()
|
||||
*/
|
||||
public void tableCaption()
|
||||
{
|
||||
sink.tableCaption();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#tableCell_()
|
||||
*/
|
||||
public void tableCell_()
|
||||
{
|
||||
sink.tableCell_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#tableCell()
|
||||
*/
|
||||
public void tableCell()
|
||||
{
|
||||
sink.tableCell();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#tableHeaderCell_()
|
||||
*/
|
||||
public void tableHeaderCell_()
|
||||
{
|
||||
sink.tableHeaderCell_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#tableHeaderCell()
|
||||
*/
|
||||
public void tableHeaderCell()
|
||||
{
|
||||
sink.tableHeaderCell();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#tableRow_()
|
||||
*/
|
||||
public void tableRow_()
|
||||
{
|
||||
sink.tableRow_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#tableRow()
|
||||
*/
|
||||
public void tableRow()
|
||||
{
|
||||
sink.tableRow();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#tableRows_()
|
||||
*/
|
||||
public void tableRows_()
|
||||
{
|
||||
sink.tableRows_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#tableRows(int[], boolean)
|
||||
*/
|
||||
public void tableRows( int[] arg0, boolean arg1 )
|
||||
{
|
||||
sink.tableRows( arg0, arg1 );
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#text(java.lang.String)
|
||||
*/
|
||||
public void text( String arg0 )
|
||||
{
|
||||
sink.text( arg0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#title_()
|
||||
*/
|
||||
public void title_()
|
||||
{
|
||||
sink.title_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#title()
|
||||
*/
|
||||
public void title()
|
||||
{
|
||||
sink.title();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#verbatim_()
|
||||
*/
|
||||
public void verbatim_()
|
||||
{
|
||||
sink.verbatim_();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.codehaus.doxia.module.xhtml.SinkAdapter#verbatim(boolean)
|
||||
*/
|
||||
public void verbatim( boolean arg0 )
|
||||
{
|
||||
sink.verbatim( arg0 );
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
package org.apache.maven.reporting.sink;
|
||||
|
||||
/*
|
||||
* Copyright 2001-2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
import org.apache.maven.doxia.sink.Sink;
|
||||
import org.apache.maven.doxia.siterenderer.Renderer;
|
||||
import org.apache.maven.doxia.siterenderer.RendererException;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @author <a href="evenisse@apache.org">Emmanuel Venisse</a>
|
||||
* @version $Id$
|
||||
*/
|
||||
public class SinkFactory
|
||||
{
|
||||
private String siteDirectory;
|
||||
|
||||
private Renderer siteRenderer;
|
||||
|
||||
public void setSiteRenderer( Renderer siteRenderer )
|
||||
{
|
||||
this.siteRenderer = siteRenderer;
|
||||
}
|
||||
|
||||
public void setSiteDirectory( String siteDirectory )
|
||||
{
|
||||
this.siteDirectory = siteDirectory;
|
||||
}
|
||||
|
||||
public Sink getSink( String outputFileName )
|
||||
throws RendererException, IOException
|
||||
{
|
||||
return siteRenderer.createSink( new File( siteDirectory ), outputFileName );
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue