View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.8.3,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.maven.model;
7   
8   /**
9    * Describes where an artifact has moved to. If any of the values
10   * are omitted, it is
11   *         assumed to be the same as it was before.
12   * 
13   * @version $Revision: 965443 $ $Date: 2015-09-15 00:18:52 +0200 (Tue, 15 Sep 2015) $
14   */
15  @SuppressWarnings( "all" )
16  public class Relocation
17      implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
18  {
19  
20        //--------------------------/
21       //- Class/Member Variables -/
22      //--------------------------/
23  
24      /**
25       * The group ID the artifact has moved to.
26       */
27      private String groupId;
28  
29      /**
30       * The new artifact ID of the artifact.
31       */
32      private String artifactId;
33  
34      /**
35       * The new version of the artifact.
36       */
37      private String version;
38  
39      /**
40       * An additional message to show the user about the move, such
41       * as the reason.
42       */
43      private String message;
44  
45      /**
46       * Field locations.
47       */
48      private java.util.Map<Object, InputLocation> locations;
49  
50  
51        //-----------/
52       //- Methods -/
53      //-----------/
54  
55      /**
56       * Method clone.
57       * 
58       * @return Relocation
59       */
60      public Relocation clone()
61      {
62          try
63          {
64              Relocation copy = (Relocation) super.clone();
65  
66              if ( copy.locations != null )
67              {
68                  copy.locations = new java.util.LinkedHashMap( copy.locations );
69              }
70  
71              return copy;
72          }
73          catch ( java.lang.Exception ex )
74          {
75              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
76                  + " does not support clone()" ).initCause( ex );
77          }
78      } //-- Relocation clone()
79  
80      /**
81       * Get the new artifact ID of the artifact.
82       * 
83       * @return String
84       */
85      public String getArtifactId()
86      {
87          return this.artifactId;
88      } //-- String getArtifactId()
89  
90      /**
91       * Get the group ID the artifact has moved to.
92       * 
93       * @return String
94       */
95      public String getGroupId()
96      {
97          return this.groupId;
98      } //-- String getGroupId()
99  
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 }