1   
2   
3   
4   
5   
6   package org.apache.maven.model;
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  
17  
18  @SuppressWarnings( "all" )
19  public class ReportPlugin
20      extends ConfigurationContainer
21      implements java.io.Serializable, java.lang.Cloneable
22  {
23  
24        
25       
26      
27  
28      
29  
30  
31      private String groupId = "org.apache.maven.plugins";
32  
33      
34  
35  
36      private String artifactId;
37  
38      
39  
40  
41      private String version;
42  
43      
44  
45  
46      private java.util.List<ReportSet> reportSets;
47  
48  
49        
50       
51      
52  
53      
54  
55  
56  
57  
58      public void addReportSet( ReportSet reportSet )
59      {
60          getReportSets().add( reportSet );
61      } 
62  
63      
64  
65  
66  
67  
68      public ReportPlugin clone()
69      {
70          try
71          {
72              ReportPlugin copy = (ReportPlugin) super.clone();
73  
74              if ( this.reportSets != null )
75              {
76                  copy.reportSets = new java.util.ArrayList<ReportSet>();
77                  for ( ReportSet item : this.reportSets )
78                  {
79                      copy.reportSets.add( ( (ReportSet) item).clone() );
80                  }
81              }
82  
83              return copy;
84          }
85          catch ( java.lang.Exception ex )
86          {
87              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
88                  + " does not support clone()" ).initCause( ex );
89          }
90      } 
91  
92      
93  
94  
95  
96  
97  
98      public String getArtifactId()
99      {
100         return this.artifactId;
101     } 
102 
103     
104 
105 
106 
107 
108     public String getGroupId()
109     {
110         return this.groupId;
111     } 
112 
113     
114 
115 
116 
117 
118     public java.util.List<ReportSet> getReportSets()
119     {
120         if ( this.reportSets == null )
121         {
122             this.reportSets = new java.util.ArrayList<ReportSet>();
123         }
124 
125         return this.reportSets;
126     } 
127 
128     
129 
130 
131 
132 
133     public String getVersion()
134     {
135         return this.version;
136     } 
137 
138     
139 
140 
141 
142 
143     public void removeReportSet( ReportSet reportSet )
144     {
145         getReportSets().remove( reportSet );
146     } 
147 
148     
149 
150 
151 
152 
153 
154     public void setArtifactId( String artifactId )
155     {
156         this.artifactId = artifactId;
157     } 
158 
159     
160 
161 
162 
163 
164     public void setGroupId( String groupId )
165     {
166         this.groupId = groupId;
167     } 
168 
169     
170 
171 
172 
173 
174 
175 
176 
177     public void setReportSets( java.util.List<ReportSet> reportSets )
178     {
179         this.reportSets = reportSets;
180     } 
181 
182     
183 
184 
185 
186 
187     public void setVersion( String version )
188     {
189         this.version = version;
190     } 
191 
192     
193             
194     private java.util.Map<String, ReportSet> reportSetMap = null;
195 
196     
197 
198 
199     public void flushReportSetMap()
200     {
201         this.reportSetMap = null;
202     }
203 
204     
205 
206 
207 
208     public java.util.Map<String, ReportSet> getReportSetsAsMap()
209     {
210         if ( reportSetMap == null )
211         {
212             reportSetMap = new java.util.LinkedHashMap<String, ReportSet>();
213             if ( getReportSets() != null )
214             {
215                 for ( java.util.Iterator<ReportSet> i = getReportSets().iterator(); i.hasNext(); )
216                 {
217                     ReportSet reportSet = (ReportSet) i.next();
218                     reportSetMap.put( reportSet.getId(), reportSet );
219                 }
220             }
221         }
222 
223         return reportSetMap;
224     }
225 
226     
227 
228 
229     public String getKey()
230     {
231         return constructKey( groupId, artifactId );
232     }
233 
234     
235 
236 
237 
238 
239     public static String constructKey( String groupId, String artifactId )
240     {
241         return groupId + ":" + artifactId;
242     }
243             
244           
245 }