View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.0.1 on 2011-06-19 15:23:53,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.plugins.changes.model;
9   
10  /**
11   * A single release of this project.
12   * 
13   * @version $Revision: 816603 $ $Date: 2012-05-08 12:53:30 +0000 (Tue, 08 May 2012) $
14   */
15  public class Release
16      implements java.io.Serializable
17  {
18  
19        //--------------------------/
20       //- Class/Member Variables -/
21      //--------------------------/
22  
23      /**
24       * 
25       *             The version number associated with this release.
26       *           
27       */
28      private String version;
29  
30      /**
31       * 
32       *             
33       *             <p>The date of this release.</p>
34       *             <p>This field can be any String, such as "in
35       * SVN" when the version isn't yet released. </p>
36       *           
37       *           
38       */
39      private String dateRelease;
40  
41      /**
42       * 
43       *             A short description of this release.
44       *           
45       */
46      private String description;
47  
48      /**
49       * Field actions.
50       */
51      private java.util.List/*<Action>*/ actions;
52  
53  
54        //-----------/
55       //- Methods -/
56      //-----------/
57  
58      /**
59       * Method addAction.
60       * 
61       * @param action
62       */
63      public void addAction( Action action )
64      {
65          if ( !(action instanceof Action) )
66          {
67              throw new ClassCastException( "Release.addActions(action) parameter must be instanceof " + Action.class.getName() );
68          }
69          getActions().add( action );
70      } //-- void addAction( Action )
71  
72      /**
73       * Method getActions.
74       * 
75       * @return List
76       */
77      public java.util.List/*<Action>*/ getActions()
78      {
79          if ( this.actions == null )
80          {
81              this.actions = new java.util.ArrayList/*<Action>*/();
82          }
83  
84          return this.actions;
85      } //-- java.util.List/*<Action>*/ getActions()
86  
87      /**
88       * Get <p>The date of this release.</p>
89       *             <p>This field can be any String, such as "in
90       * SVN" when the version isn't yet released. </p>
91       * 
92       * @return String
93       */
94      public String getDateRelease()
95      {
96          return this.dateRelease;
97      } //-- String getDateRelease()
98  
99      /**
100      * Get a short description of this release.
101      * 
102      * @return String
103      */
104     public String getDescription()
105     {
106         return this.description;
107     } //-- String getDescription()
108 
109     /**
110      * Get the version number associated with this release.
111      * 
112      * @return String
113      */
114     public String getVersion()
115     {
116         return this.version;
117     } //-- String getVersion()
118 
119     /**
120      * Method removeAction.
121      * 
122      * @param action
123      */
124     public void removeAction( Action action )
125     {
126         if ( !(action instanceof Action) )
127         {
128             throw new ClassCastException( "Release.removeActions(action) parameter must be instanceof " + Action.class.getName() );
129         }
130         getActions().remove( action );
131     } //-- void removeAction( Action )
132 
133     /**
134      * Set the list of actions taken for this release.
135      * 
136      * @param actions
137      */
138     public void setActions( java.util.List/*<Action>*/ actions )
139     {
140         this.actions = actions;
141     } //-- void setActions( java.util.List )
142 
143     /**
144      * Set <p>The date of this release.</p>
145      *             <p>This field can be any String, such as "in
146      * SVN" when the version isn't yet released. </p>
147      * 
148      * @param dateRelease
149      */
150     public void setDateRelease( String dateRelease )
151     {
152         this.dateRelease = dateRelease;
153     } //-- void setDateRelease( String )
154 
155     /**
156      * Set a short description of this release.
157      * 
158      * @param description
159      */
160     public void setDescription( String description )
161     {
162         this.description = description;
163     } //-- void setDescription( String )
164 
165     /**
166      * Set the version number associated with this release.
167      * 
168      * @param version
169      */
170     public void setVersion( String version )
171     {
172         this.version = version;
173     } //-- void setVersion( String )
174 
175 
176             public java.util.List getActions(String type)
177             {
178                 java.util.List actions = new java.util.ArrayList();
179                 for (java.util.Iterator iterator = getActions().iterator(); iterator.hasNext(); )
180                 {
181                   Action action = (Action) iterator.next();
182                   if ( action.getType() != null && action.getType().equalsIgnoreCase( type ) )
183                   {
184                       actions.add( action );
185                   }
186                 }
187                 return actions;
188             }
189           
190 }