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