001 // =================== DO NOT EDIT THIS FILE ====================
002 // Generated by Modello 1.7,
003 // any modifications will be overwritten.
004 // ==============================================================
005
006 package org.apache.maven.model;
007
008 /**
009 * Describes where an artifact has moved to. If any of the values
010 * are omitted, it is
011 * assumed to be the same as it was before.
012 *
013 * @version $Revision$ $Date$
014 */
015 @SuppressWarnings( "all" )
016 public class Relocation
017 implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
018 {
019
020 //--------------------------/
021 //- Class/Member Variables -/
022 //--------------------------/
023
024 /**
025 * The group ID the artifact has moved to.
026 */
027 private String groupId;
028
029 /**
030 * The new artifact ID of the artifact.
031 */
032 private String artifactId;
033
034 /**
035 * The new version of the artifact.
036 */
037 private String version;
038
039 /**
040 * An additional message to show the user about the move, such
041 * as the reason.
042 */
043 private String message;
044
045 /**
046 * Field locations.
047 */
048 private java.util.Map<Object, InputLocation> locations;
049
050
051 //-----------/
052 //- Methods -/
053 //-----------/
054
055 /**
056 * Method clone.
057 *
058 * @return Relocation
059 */
060 public Relocation clone()
061 {
062 try
063 {
064 Relocation copy = (Relocation) super.clone();
065
066 if ( copy.locations != null )
067 {
068 copy.locations = new java.util.LinkedHashMap( copy.locations );
069 }
070
071 return copy;
072 }
073 catch ( java.lang.Exception ex )
074 {
075 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
076 + " does not support clone()" ).initCause( ex );
077 }
078 } //-- Relocation clone()
079
080 /**
081 * Get the new artifact ID of the artifact.
082 *
083 * @return String
084 */
085 public String getArtifactId()
086 {
087 return this.artifactId;
088 } //-- String getArtifactId()
089
090 /**
091 * Get the group ID the artifact has moved to.
092 *
093 * @return String
094 */
095 public String getGroupId()
096 {
097 return this.groupId;
098 } //-- String getGroupId()
099
100 /**
101 *
102 *
103 * @param key
104 * @return InputLocation
105 */
106 public InputLocation getLocation( Object key )
107 {
108 return ( locations != null ) ? locations.get( key ) : null;
109 } //-- InputLocation getLocation( Object )
110
111 /**
112 * Get an additional message to show the user about the move,
113 * such as the reason.
114 *
115 * @return String
116 */
117 public String getMessage()
118 {
119 return this.message;
120 } //-- String getMessage()
121
122 /**
123 * Get the new version of the artifact.
124 *
125 * @return String
126 */
127 public String getVersion()
128 {
129 return this.version;
130 } //-- String getVersion()
131
132 /**
133 * Set the new artifact ID of the artifact.
134 *
135 * @param artifactId
136 */
137 public void setArtifactId( String artifactId )
138 {
139 this.artifactId = artifactId;
140 } //-- void setArtifactId( String )
141
142 /**
143 * Set the group ID the artifact has moved to.
144 *
145 * @param groupId
146 */
147 public void setGroupId( String groupId )
148 {
149 this.groupId = groupId;
150 } //-- void setGroupId( String )
151
152 /**
153 *
154 *
155 * @param key
156 * @param location
157 */
158 public void setLocation( Object key, InputLocation location )
159 {
160 if ( location != null )
161 {
162 if ( this.locations == null )
163 {
164 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
165 }
166 this.locations.put( key, location );
167 }
168 } //-- void setLocation( Object, InputLocation )
169
170 /**
171 * Set an additional message to show the user about the move,
172 * such as the reason.
173 *
174 * @param message
175 */
176 public void setMessage( String message )
177 {
178 this.message = message;
179 } //-- void setMessage( String )
180
181 /**
182 * Set the new version of the artifact.
183 *
184 * @param version
185 */
186 public void setVersion( String version )
187 {
188 this.version = version;
189 } //-- void setVersion( String )
190
191 }