1 /*
2 =================== DO NOT EDIT THIS FILE ====================
3 Generated by Modello 1.0.1 on 2009-09-09 03:30:24,
4 any modifications will be overwritten.
5 ==============================================================
6 */
7
8 package org.apache.maven.plugin.registry;
9
10 /**
11 * Policy for updating a single plugin.
12 *
13 * @version $Revision$ $Date$
14 */
15 public class Plugin
16 extends TrackableBase
17 implements java.io.Serializable
18 {
19
20 //--------------------------/
21 //- Class/Member Variables -/
22 //--------------------------/
23
24 /**
25 * Field groupId.
26 */
27 private String groupId;
28
29 /**
30 * Field artifactId.
31 */
32 private String artifactId;
33
34 /**
35 * [format: yyyy-MM-dd.HH:mm:ss Z] Specifies the date/time at
36 * which this plugin was last checked.
37 */
38 private String lastChecked;
39
40 /**
41 * The current version of this plugin, to be used until the
42 * appropriate update actions happen.
43 */
44 private String useVersion;
45
46 /**
47 * Field rejectedVersions.
48 */
49 private java.util.List<String> rejectedVersions;
50
51
52 //-----------/
53 //- Methods -/
54 //-----------/
55
56 /**
57 * Method addRejectedVersion.
58 *
59 * @param string
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 } //-- void addRejectedVersion( String )
69
70 /**
71 * Get the artifactId field.
72 *
73 * @return String
74 */
75 public String getArtifactId()
76 {
77 return this.artifactId;
78 } //-- String getArtifactId()
79
80 /**
81 * Get the groupId field.
82 *
83 * @return String
84 */
85 public String getGroupId()
86 {
87 return this.groupId;
88 } //-- String getGroupId()
89
90 /**
91 * Get [format: yyyy-MM-dd.HH:mm:ss Z] Specifies the date/time
92 * at which this plugin was last checked.
93 *
94 * @return String
95 */
96 public String getLastChecked()
97 {
98 return this.lastChecked;
99 } //-- String getLastChecked()
100
101 /**
102 * Method getRejectedVersions.
103 *
104 * @return List
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 } //-- java.util.List<String> getRejectedVersions()
115
116 /**
117 * Get the current version of this plugin, to be used until the
118 * appropriate update actions happen.
119 *
120 * @return String
121 */
122 public String getUseVersion()
123 {
124 return this.useVersion;
125 } //-- String getUseVersion()
126
127 /**
128 * Method removeRejectedVersion.
129 *
130 * @param string
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 } //-- void removeRejectedVersion( String )
140
141 /**
142 * Set the artifactId field.
143 *
144 * @param artifactId
145 */
146 public void setArtifactId( String artifactId )
147 {
148 this.artifactId = artifactId;
149 } //-- void setArtifactId( String )
150
151 /**
152 * Set the groupId field.
153 *
154 * @param groupId
155 */
156 public void setGroupId( String groupId )
157 {
158 this.groupId = groupId;
159 } //-- void setGroupId( String )
160
161 /**
162 * Set [format: yyyy-MM-dd.HH:mm:ss Z] Specifies the date/time
163 * at which this plugin was last checked.
164 *
165 * @param lastChecked
166 */
167 public void setLastChecked( String lastChecked )
168 {
169 this.lastChecked = lastChecked;
170 } //-- void setLastChecked( String )
171
172 /**
173 * Set the list of versions for this plugin that the user
174 * declined to "install".
175 *
176 * @param rejectedVersions
177 */
178 public void setRejectedVersions( java.util.List<String> rejectedVersions )
179 {
180 this.rejectedVersions = rejectedVersions;
181 } //-- void setRejectedVersions( java.util.List )
182
183 /**
184 * Set the current version of this plugin, to be used until the
185 * appropriate update actions happen.
186 *
187 * @param useVersion
188 */
189 public void setUseVersion( String useVersion )
190 {
191 this.useVersion = useVersion;
192 } //-- void setUseVersion( String )
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 }