View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.4.1 on 2013-02-24 03:32:14,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.model;
9   
10  /**
11   * Describes where an artifact has moved to. If any of the values
12   * are omitted, it is
13   *         assumed to be the same as it was before.
14   * 
15   * @version $Revision$ $Date$
16   */
17  @SuppressWarnings( "all" )
18  public class Relocation
19      implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
20  {
21  
22        //--------------------------/
23       //- Class/Member Variables -/
24      //--------------------------/
25  
26      /**
27       * The group ID the artifact has moved to.
28       */
29      private String groupId;
30  
31      /**
32       * The new artifact ID of the artifact.
33       */
34      private String artifactId;
35  
36      /**
37       * The new version of the artifact.
38       */
39      private String version;
40  
41      /**
42       * An additional message to show the user about the move, such
43       * as the reason.
44       */
45      private String message;
46  
47      /**
48       * Field locations.
49       */
50      private java.util.Map<Object, InputLocation> locations;
51  
52  
53        //-----------/
54       //- Methods -/
55      //-----------/
56  
57      /**
58       * Method clone.
59       * 
60       * @return Relocation
61       */
62      public Relocation clone()
63      {
64          try
65          {
66              Relocation copy = (Relocation) super.clone();
67  
68              if ( copy.locations != null )
69              {
70                  copy.locations = new java.util.LinkedHashMap( copy.locations );
71              }
72  
73              return copy;
74          }
75          catch ( java.lang.Exception ex )
76          {
77              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
78                  + " does not support clone()" ).initCause( ex );
79          }
80      } //-- Relocation clone()
81  
82      /**
83       * Get the new artifact ID of the artifact.
84       * 
85       * @return String
86       */
87      public String getArtifactId()
88      {
89          return this.artifactId;
90      } //-- String getArtifactId()
91  
92      /**
93       * Get the group ID the artifact has moved to.
94       * 
95       * @return String
96       */
97      public String getGroupId()
98      {
99          return this.groupId;
100     } //-- String getGroupId()
101 
102     /**
103      * 
104      * 
105      * @param key
106      * @return InputLocation
107      */
108     public InputLocation getLocation( Object key )
109     {
110         return ( locations != null ) ? locations.get( key ) : null;
111     } //-- InputLocation getLocation( Object )
112 
113     /**
114      * Get an additional message to show the user about the move,
115      * such as the reason.
116      * 
117      * @return String
118      */
119     public String getMessage()
120     {
121         return this.message;
122     } //-- String getMessage()
123 
124     /**
125      * Get the new version of the artifact.
126      * 
127      * @return String
128      */
129     public String getVersion()
130     {
131         return this.version;
132     } //-- String getVersion()
133 
134     /**
135      * Set the new artifact ID of the artifact.
136      * 
137      * @param artifactId
138      */
139     public void setArtifactId( String artifactId )
140     {
141         this.artifactId = artifactId;
142     } //-- void setArtifactId( String )
143 
144     /**
145      * Set the group ID the artifact has moved to.
146      * 
147      * @param groupId
148      */
149     public void setGroupId( String groupId )
150     {
151         this.groupId = groupId;
152     } //-- void setGroupId( String )
153 
154     /**
155      * 
156      * 
157      * @param key
158      * @param location
159      */
160     public void setLocation( Object key, InputLocation location )
161     {
162         if ( location != null )
163         {
164             if ( this.locations == null )
165             {
166                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
167             }
168             this.locations.put( key, location );
169         }
170     } //-- void setLocation( Object, InputLocation )
171 
172     /**
173      * Set an additional message to show the user about the move,
174      * such as the reason.
175      * 
176      * @param message
177      */
178     public void setMessage( String message )
179     {
180         this.message = message;
181     } //-- void setMessage( String )
182 
183     /**
184      * Set the new version of the artifact.
185      * 
186      * @param version
187      */
188     public void setVersion( String version )
189     {
190         this.version = version;
191     } //-- void setVersion( String )
192 
193 }