1 package org.apache.maven.plugin.changes;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.util.ArrayList;
23 import java.util.List;
24 import java.util.Iterator;
25
26
27
28
29
30
31 public class Release
32 {
33 public static final String ADD_ACTION = "add";
34
35 public static final String FIX_ACTION = "fix";
36
37 public static final String UPDATE_ACTION = "update";
38
39 public static final String REMOVE_ACTION = "remove";
40
41
42 private List action;
43
44 private String dateRelease;
45
46 private String description;
47
48 private String version;
49
50 public Release()
51 {
52 }
53
54 public void setAction( List action )
55 {
56 this.action = action;
57 }
58
59 public List getAction()
60 {
61 if ( action == null )
62 {
63 action = new ArrayList();
64 }
65 return action;
66 }
67
68 public void addAction( Action act )
69 {
70 if ( action == null )
71 {
72 action = new ArrayList();
73 }
74 action.add( act );
75 }
76
77 public void setDateRelease( String dateRelease )
78 {
79 this.dateRelease = dateRelease;
80 }
81
82 public String getDateRelease()
83 {
84 return dateRelease;
85 }
86
87 public void setDescription( String description )
88 {
89 this.description = description;
90 }
91
92 public String getDescription()
93 {
94 return description;
95 }
96
97 public void setVersion( String version )
98 {
99 this.version = version;
100 }
101
102 public String getVersion()
103 {
104 return version;
105 }
106
107
108
109
110
111
112
113 public List getActions( final String actionType )
114 {
115 final List result = new ArrayList();
116 if ( getAction() == null )
117 {
118 return new ArrayList();
119 }
120 final Iterator it = getAction().iterator();
121 while ( it.hasNext() )
122 {
123 Action action = (Action) it.next();
124 if ( actionType.equals( action.getType() ) )
125 {
126 result.add( action );
127 }
128 }
129
130 return result;
131 }
132 }