KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mountainminds > eclemma > core > ISessionExporter


1 /*******************************************************************************
2  * Copyright (c) 2006 Mountainminds GmbH & Co. KG
3  * This software is provided under the terms of the Eclipse Public License v1.0
4  * See http://www.eclipse.org/legal/epl-v10.html.
5  *
6  * $Id: ISessionExporter.java 62 2006-09-11 15:45:07Z mho $
7  ******************************************************************************/

8 package com.mountainminds.eclemma.core;
9
10 import java.util.Properties JavaDoc;
11
12 import org.eclipse.core.runtime.CoreException;
13 import org.eclipse.core.runtime.IProgressMonitor;
14
15 /**
16  * API for exporting sessions. This interface is not intended to be implemented
17  * by clients. Use {@link CoverageTools#getExporter(ICoverageSession)} to get an
18  * instance.
19  *
20  * @author Marc R. Hoffmann
21  * @version $Revision: 62 $
22  */

23 public interface ISessionExporter {
24
25   /** Constant for export as HTML files (value is 0). */
26   public static final int HTML_FORMAT = 0;
27
28   /** Constant for XML file export (value is 1). */
29   public static final int XML_FORMAT = 1;
30
31   /** Constant for plain text export (value is 2). */
32   public static final int TXT_FORMAT = 2;
33
34   /** Constant for EMMA session file export (value is 3). */
35   public static final int EMMA_FORMAT = 3;
36
37   /**
38    * Default file extensions for the different file formats. The array index
39    * corresponds to the format constant.
40    */

41   public static final String JavaDoc[] DEFAULT_EXTENSIONS = new String JavaDoc[] { "html", //$NON-NLS-1$
42
"xml", "txt", "es" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
43

44   /**
45    * Sets the export format.
46    *
47    * @param format
48    * export format constant
49    */

50   public void setFormat(int format);
51
52   /**
53    * Sets the export file name. Note that in case of HTML export this is only
54    * the main file, while more files are created as siblings.
55    *
56    * @param filename
57    * file name of export destination
58    */

59   public void setDestination(String JavaDoc filename);
60
61   /**
62    * Sets EMMA specific report options that overwrite the default setting.
63    *
64    * @param options
65    * EMMA specific report options
66    */

67   public void setReportOptions(Properties JavaDoc options);
68
69   /**
70    * A call to this method triggers the actual export process.
71    *
72    * @param monitor
73    * progress monitor
74    * @throws CoreException
75    * if something goes wrong during export
76    */

77   public void export(IProgressMonitor monitor) throws CoreException;
78
79 }
80
Popular Tags