KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > maven > reporting > sink > SinkFactory


1 package org.apache.maven.reporting.sink;
2
3 /*
4  * Copyright 2001-2005 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 import org.apache.maven.doxia.sink.Sink;
20 import org.apache.maven.doxia.siterenderer.Renderer;
21 import org.apache.maven.doxia.siterenderer.RendererException;
22
23 import java.io.File JavaDoc;
24 import java.io.IOException JavaDoc;
25
26 /**
27  * @author <a HREF="evenisse@apache.org">Emmanuel Venisse</a>
28  * @version $Id: MavenReport.java 163376 2005-02-23 00:06:06Z brett $
29  */

30 public class SinkFactory
31 {
32     private String JavaDoc siteDirectory;
33
34     private Renderer siteRenderer;
35
36     public void setSiteRenderer( Renderer siteRenderer )
37     {
38         this.siteRenderer = siteRenderer;
39     }
40
41     public void setSiteDirectory( String JavaDoc siteDirectory )
42     {
43         this.siteDirectory = siteDirectory;
44     }
45
46     public Sink getSink( String JavaDoc outputFileName )
47         throws RendererException, IOException JavaDoc
48     {
49         return siteRenderer.createSink( new File JavaDoc( siteDirectory ), outputFileName );
50     }
51 }
52
Popular Tags