View Javadoc

1   /*
2    * Copyright 2007-2013 smartics, Kronseder & Reiner GmbH
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package de.smartics.exceptions.report.data;
17  
18  import java.io.File;
19  import java.util.Collection;
20  import java.util.List;
21  import java.util.ResourceBundle;
22  
23  import de.smartics.exceptions.report.generator.ReportGenerator;
24  import de.smartics.messages.core.BundleMapper;
25  
26  /**
27   * Implementations of this class provide information about what parts of the
28   * project should be covered with the report. This class provides means to
29   * include and exclude packages and classes.
30   *
31   * @param <O> the type of the output writer.
32   */
33  public interface ProjectConfiguration<O>
34  {
35    // ********************************* Fields *********************************
36  
37    // --- constants ------------------------------------------------------------
38  
39    // ****************************** Initializer *******************************
40  
41    // ****************************** Inner Classes *****************************
42  
43    // ********************************* Methods ********************************
44  
45    // --- get&set --------------------------------------------------------------
46  
47    /**
48     * Returns the name of the project being processed.
49     *
50     * @return the name of the project being processed.
51     */
52    String getProjectName();
53  
54    /**
55     * Returns the list of class path root elements of this project.
56     *
57     * @return the list of class path root elements of this project.
58     */
59    Collection<String> getClassRootDirectoryNames();
60  
61    /**
62     * Returns the list of source path root elements of this project.
63     *
64     * @return the list of source path root elements of this project.
65     */
66    Collection<String> getSourceRootDirectoryNames();
67  
68    /**
69     * Returns the includes for the scanner.
70     *
71     * @return the includes for the scanner.
72     */
73    List<String> getIncludes();
74  
75    /**
76     * Returns the excludes for the scanner.
77     *
78     * @return the excludes for the scanner.
79     */
80    List<String> getExcludes();
81  
82    /**
83     * Returns the encoding specified for the sources in the project.
84     *
85     * @return the encoding specified for the sources in the project.
86     */
87    String getSourceEncoding();
88  
89    /**
90     * Returns the encoding for the generated report.
91     *
92     * @return the encoding for the generated report.
93     */
94    String getReportEncoding();
95  
96    /**
97     * Returns the reporter implementation to use to generate the code report.
98     *
99     * @return the reporter implementation to use to generate the code report.
100    *         This is the name of the class of the reporter implementation.
101    */
102   String getReporter();
103 
104   /**
105    * Returns the report generator instance set by {@link #setReporter(String)}.
106    *
107    * @return the report generator instance.
108    */
109   ReportGenerator<O> getReporterInstance();
110 
111   /**
112    * Returns the name of the file the report will be written to.
113    *
114    * @return the name of the file the report will be written to.
115    */
116   String getReport();
117 
118   /**
119    * Returns the bundle set for this report execution.
120    *
121    * @return the bundle set for this report execution.
122    */
123   ResourceBundle getBundle();
124 
125   /**
126    * Returns the absolute directory path where the Javadoc pages are found. This
127    * information is used to make relative links from the exceptions report to
128    * the Javadocs.
129    * <p>
130    * This value is optional and may be <code>null</code>.
131    * </p>
132    *
133    * @return the directory where the Javadoc pages are found.
134    */
135   File getJavadocDir();
136 
137   /**
138    * Returns the relative directory path where the Javadoc pages are found. This
139    * information is used to make relative links from the exceptions report to
140    * the Javadocs.
141    * <p>
142    * This value is optional and may be <code>null</code>.
143    * </p>
144    *
145    * @return the directory where the Javadoc pages are found.
146    */
147   String getJavadocRelativeDir();
148 
149   /**
150    * The reference to the style sheet to add as link element to the head of the
151    * XHTML document.
152    * <p>
153    * This value is optional and may be <code>null</code>.
154    * </p>
155    *
156    * @return the reference to the style sheet to add as link element to the head
157    *         of the XHTML document.
158    */
159   String getStyleSheet();
160 
161   /**
162    * Returns the mapper of the item class to the resource bundle with
163    * information for instances of this class.
164    *
165    * @return the mapper to the resource bundles.
166    */
167   BundleMapper getBundleMapper();
168 
169   // --- business -------------------------------------------------------------
170 
171   // --- object basics --------------------------------------------------------
172 }