View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.4.1 on 2012-01-20 18:09:18,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.model;
9   
10  /**
11   * Represents a set of reports and configuration to be used to
12   * generate them.
13   * 
14   * @version $Revision$ $Date$
15   */
16  @SuppressWarnings( "all" )
17  public class ReportSet
18      extends ConfigurationContainer
19      implements java.io.Serializable, java.lang.Cloneable
20  {
21  
22        //--------------------------/
23       //- Class/Member Variables -/
24      //--------------------------/
25  
26      /**
27       * The unique id for this report set, to be used during POM
28       * inheritance and profile injection
29       *             for merging of report sets.
30       *           
31       */
32      private String id = "default";
33  
34      /**
35       * Field reports.
36       */
37      private java.util.List<String> reports;
38  
39  
40        //-----------/
41       //- Methods -/
42      //-----------/
43  
44      /**
45       * Method addReport.
46       * 
47       * @param string
48       */
49      public void addReport( String string )
50      {
51          getReports().add( string );
52      } //-- void addReport( String )
53  
54      /**
55       * Method clone.
56       * 
57       * @return ReportSet
58       */
59      public ReportSet clone()
60      {
61          try
62          {
63              ReportSet copy = (ReportSet) super.clone();
64  
65              if ( this.reports != null )
66              {
67                  copy.reports = new java.util.ArrayList<String>();
68                  copy.reports.addAll( this.reports );
69              }
70  
71              return copy;
72          }
73          catch ( java.lang.Exception ex )
74          {
75              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
76                  + " does not support clone()" ).initCause( ex );
77          }
78      } //-- ReportSet clone()
79  
80      /**
81       * Get the unique id for this report set, to be used during POM
82       * inheritance and profile injection
83       *             for merging of report sets.
84       * 
85       * @return String
86       */
87      public String getId()
88      {
89          return this.id;
90      } //-- String getId()
91  
92      /**
93       * Method getReports.
94       * 
95       * @return List
96       */
97      public java.util.List<String> getReports()
98      {
99          if ( this.reports == null )
100         {
101             this.reports = new java.util.ArrayList<String>();
102         }
103 
104         return this.reports;
105     } //-- java.util.List<String> getReports()
106 
107     /**
108      * Method removeReport.
109      * 
110      * @param string
111      */
112     public void removeReport( String string )
113     {
114         getReports().remove( string );
115     } //-- void removeReport( String )
116 
117     /**
118      * Set the unique id for this report set, to be used during POM
119      * inheritance and profile injection
120      *             for merging of report sets.
121      * 
122      * @param id
123      */
124     public void setId( String id )
125     {
126         this.id = id;
127     } //-- void setId( String )
128 
129     /**
130      * Set the list of reports from this plugin which should be
131      * generated from this set.
132      * 
133      * @param reports
134      */
135     public void setReports( java.util.List<String> reports )
136     {
137         this.reports = reports;
138     } //-- void setReports( java.util.List )
139 
140     
141             
142     @Override
143     public String toString()
144     {
145         return getId();
146     }
147             
148           
149 }