1
2
3
4
5
6
7
8 package org.apache.maven.plugin.registry;
9
10
11
12
13
14
15 public class Plugin
16 extends TrackableBase
17 implements java.io.Serializable
18 {
19
20
21
22
23
24
25
26
27 private String groupId;
28
29
30
31
32 private String artifactId;
33
34
35
36
37
38 private String lastChecked;
39
40
41
42
43
44 private String useVersion;
45
46
47
48
49 private java.util.List<String> rejectedVersions;
50
51
52
53
54
55
56
57
58
59
60
61 public void addRejectedVersion( String string )
62 {
63 if ( !(string instanceof String) )
64 {
65 throw new ClassCastException( "Plugin.addRejectedVersions(string) parameter must be instanceof " + String.class.getName() );
66 }
67 getRejectedVersions().add( string );
68 }
69
70
71
72
73
74
75 public String getArtifactId()
76 {
77 return this.artifactId;
78 }
79
80
81
82
83
84
85 public String getGroupId()
86 {
87 return this.groupId;
88 }
89
90
91
92
93
94
95
96 public String getLastChecked()
97 {
98 return this.lastChecked;
99 }
100
101
102
103
104
105
106 public java.util.List<String> getRejectedVersions()
107 {
108 if ( this.rejectedVersions == null )
109 {
110 this.rejectedVersions = new java.util.ArrayList<String>();
111 }
112
113 return this.rejectedVersions;
114 }
115
116
117
118
119
120
121
122 public String getUseVersion()
123 {
124 return this.useVersion;
125 }
126
127
128
129
130
131
132 public void removeRejectedVersion( String string )
133 {
134 if ( !(string instanceof String) )
135 {
136 throw new ClassCastException( "Plugin.removeRejectedVersions(string) parameter must be instanceof " + String.class.getName() );
137 }
138 getRejectedVersions().remove( string );
139 }
140
141
142
143
144
145
146 public void setArtifactId( String artifactId )
147 {
148 this.artifactId = artifactId;
149 }
150
151
152
153
154
155
156 public void setGroupId( String groupId )
157 {
158 this.groupId = groupId;
159 }
160
161
162
163
164
165
166
167 public void setLastChecked( String lastChecked )
168 {
169 this.lastChecked = lastChecked;
170 }
171
172
173
174
175
176
177
178 public void setRejectedVersions( java.util.List<String> rejectedVersions )
179 {
180 this.rejectedVersions = rejectedVersions;
181 }
182
183
184
185
186
187
188
189 public void setUseVersion( String useVersion )
190 {
191 this.useVersion = useVersion;
192 }
193
194
195 public static final String LAST_CHECKED_DATE_FORMAT = "yyyy-MM-dd.HH:mm:ss Z";
196
197 public String getKey()
198 {
199 return getGroupId() + ":" + getArtifactId();
200 }
201
202 }