Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Reporting |
|
| 0.0;0 |
1 | /* | |
2 | =================== DO NOT EDIT THIS FILE ==================== | |
3 | Generated by Modello 1.0.1 on 2009-09-09 03:04:48, | |
4 | any modifications will be overwritten. | |
5 | ============================================================== | |
6 | */ | |
7 | ||
8 | package org.apache.maven.model; | |
9 | ||
10 | /** | |
11 | * Section for management of reports and their configuration. | |
12 | * | |
13 | * @version $Revision$ $Date$ | |
14 | */ | |
15 | 6 | public class Reporting |
16 | implements java.io.Serializable | |
17 | { | |
18 | ||
19 | //--------------------------/ | |
20 | //- Class/Member Variables -/ | |
21 | //--------------------------/ | |
22 | ||
23 | /** | |
24 | * If true, then the default reports are not included in the | |
25 | * site generation. | |
26 | * This includes the reports in the "Project Info" | |
27 | * menu. | |
28 | */ | |
29 | private Boolean excludeDefaultsValue; | |
30 | ||
31 | /** | |
32 | * | |
33 | * | |
34 | * Where to store all of the generated reports. The | |
35 | * default is | |
36 | * <code>${project.build.directory}/site</code> | |
37 | * . | |
38 | * | |
39 | * | |
40 | */ | |
41 | private String outputDirectory; | |
42 | ||
43 | /** | |
44 | * Field plugins. | |
45 | */ | |
46 | private java.util.List<ReportPlugin> plugins; | |
47 | ||
48 | ||
49 | //-----------/ | |
50 | //- Methods -/ | |
51 | //-----------/ | |
52 | ||
53 | /** | |
54 | * Method addPlugin. | |
55 | * | |
56 | * @param reportPlugin | |
57 | */ | |
58 | public void addPlugin( ReportPlugin reportPlugin ) | |
59 | { | |
60 | 0 | if ( !(reportPlugin instanceof ReportPlugin) ) |
61 | { | |
62 | 0 | throw new ClassCastException( "Reporting.addPlugins(reportPlugin) parameter must be instanceof " + ReportPlugin.class.getName() ); |
63 | } | |
64 | 0 | getPlugins().add( reportPlugin ); |
65 | 0 | } //-- void addPlugin( ReportPlugin ) |
66 | ||
67 | /** | |
68 | * Get where to store all of the generated reports. The default | |
69 | * is | |
70 | * <code>${project.build.directory}/site</code> | |
71 | * . | |
72 | * | |
73 | * @return String | |
74 | */ | |
75 | public String getOutputDirectory() | |
76 | { | |
77 | 0 | return this.outputDirectory; |
78 | } //-- String getOutputDirectory() | |
79 | ||
80 | /** | |
81 | * Method getPlugins. | |
82 | * | |
83 | * @return List | |
84 | */ | |
85 | public java.util.List<ReportPlugin> getPlugins() | |
86 | { | |
87 | 0 | if ( this.plugins == null ) |
88 | { | |
89 | 0 | this.plugins = new java.util.ArrayList<ReportPlugin>(); |
90 | } | |
91 | ||
92 | 0 | return this.plugins; |
93 | } //-- java.util.List<ReportPlugin> getPlugins() | |
94 | ||
95 | /** | |
96 | * Get if true, then the default reports are not included in | |
97 | * the site generation. | |
98 | * This includes the reports in the "Project Info" | |
99 | * menu. | |
100 | * | |
101 | * @return Boolean | |
102 | */ | |
103 | public Boolean isExcludeDefaultsValue() | |
104 | { | |
105 | 0 | return this.excludeDefaultsValue; |
106 | } //-- Boolean isExcludeDefaultsValue() | |
107 | ||
108 | /** | |
109 | * Method removePlugin. | |
110 | * | |
111 | * @param reportPlugin | |
112 | */ | |
113 | public void removePlugin( ReportPlugin reportPlugin ) | |
114 | { | |
115 | 0 | if ( !(reportPlugin instanceof ReportPlugin) ) |
116 | { | |
117 | 0 | throw new ClassCastException( "Reporting.removePlugins(reportPlugin) parameter must be instanceof " + ReportPlugin.class.getName() ); |
118 | } | |
119 | 0 | getPlugins().remove( reportPlugin ); |
120 | 0 | } //-- void removePlugin( ReportPlugin ) |
121 | ||
122 | /** | |
123 | * Set if true, then the default reports are not included in | |
124 | * the site generation. | |
125 | * This includes the reports in the "Project Info" | |
126 | * menu. | |
127 | * | |
128 | * @param excludeDefaultsValue | |
129 | */ | |
130 | public void setExcludeDefaultsValue( Boolean excludeDefaultsValue ) | |
131 | { | |
132 | 0 | this.excludeDefaultsValue = excludeDefaultsValue; |
133 | 0 | } //-- void setExcludeDefaultsValue( Boolean ) |
134 | ||
135 | /** | |
136 | * Set where to store all of the generated reports. The default | |
137 | * is | |
138 | * <code>${project.build.directory}/site</code> | |
139 | * . | |
140 | * | |
141 | * @param outputDirectory | |
142 | */ | |
143 | public void setOutputDirectory( String outputDirectory ) | |
144 | { | |
145 | 0 | this.outputDirectory = outputDirectory; |
146 | 0 | } //-- void setOutputDirectory( String ) |
147 | ||
148 | /** | |
149 | * Set the reporting plugins to use and their configuration. | |
150 | * | |
151 | * @param plugins | |
152 | */ | |
153 | public void setPlugins( java.util.List<ReportPlugin> plugins ) | |
154 | { | |
155 | 0 | this.plugins = plugins; |
156 | 0 | } //-- void setPlugins( java.util.List ) |
157 | ||
158 | ||
159 | ||
160 | java.util.Map reportPluginMap; | |
161 | ||
162 | /** | |
163 | * Reset the <code>reportPluginMap</code> field to <code>null</code> | |
164 | */ | |
165 | public void flushReportPluginMap() | |
166 | { | |
167 | 0 | this.reportPluginMap = null; |
168 | 0 | } |
169 | ||
170 | /** | |
171 | * @return a Map of plugins field with <code>ReportPlugin#getKey()</code> as key | |
172 | * @see org.apache.maven.model.ReportPlugin#getKey() | |
173 | */ | |
174 | public java.util.Map getReportPluginsAsMap() | |
175 | { | |
176 | 0 | if ( reportPluginMap == null ) |
177 | { | |
178 | 0 | reportPluginMap = new java.util.LinkedHashMap(); |
179 | 0 | if ( getPlugins() != null ) |
180 | { | |
181 | 0 | for ( java.util.Iterator it = getPlugins().iterator(); it.hasNext(); ) |
182 | { | |
183 | 0 | ReportPlugin reportPlugin = (ReportPlugin) it.next(); |
184 | 0 | reportPluginMap.put( reportPlugin.getKey(), reportPlugin ); |
185 | 0 | } |
186 | } | |
187 | } | |
188 | ||
189 | 0 | return reportPluginMap; |
190 | } | |
191 | ||
192 | public boolean isExcludeDefaults() | |
193 | { | |
194 | 0 | return excludeDefaultsValue != null ? excludeDefaultsValue.booleanValue() : false; |
195 | } | |
196 | ||
197 | public void setExcludeDefaults( boolean excludeDefaults ) | |
198 | { | |
199 | 0 | excludeDefaultsValue = excludeDefaults ? Boolean.TRUE : Boolean.FALSE; |
200 | 0 | } |
201 | ||
202 | public void setExcludeDefaultsValue( String excludeDefaults ) | |
203 | { | |
204 | 0 | excludeDefaultsValue = excludeDefaults != null ? Boolean.valueOf( excludeDefaults ) : null; |
205 | 0 | } |
206 | ||
207 | ||
208 | } |