001    /*
002     =================== DO NOT EDIT THIS FILE ====================
003     Generated by Modello 1.4.1 on 2013-02-24 03:31:02,
004     any modifications will be overwritten.
005     ==============================================================
006     */
007    
008    package org.apache.maven.model;
009    
010    /**
011     * Describes where an artifact has moved to. If any of the values
012     * are omitted, it is
013     *         assumed to be the same as it was before.
014     * 
015     * @version $Revision$ $Date$
016     */
017    @SuppressWarnings( "all" )
018    public class Relocation
019        implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
020    {
021    
022          //--------------------------/
023         //- Class/Member Variables -/
024        //--------------------------/
025    
026        /**
027         * The group ID the artifact has moved to.
028         */
029        private String groupId;
030    
031        /**
032         * The new artifact ID of the artifact.
033         */
034        private String artifactId;
035    
036        /**
037         * The new version of the artifact.
038         */
039        private String version;
040    
041        /**
042         * An additional message to show the user about the move, such
043         * as the reason.
044         */
045        private String message;
046    
047        /**
048         * Field locations.
049         */
050        private java.util.Map<Object, InputLocation> locations;
051    
052    
053          //-----------/
054         //- Methods -/
055        //-----------/
056    
057        /**
058         * Method clone.
059         * 
060         * @return Relocation
061         */
062        public Relocation clone()
063        {
064            try
065            {
066                Relocation copy = (Relocation) super.clone();
067    
068                if ( copy.locations != null )
069                {
070                    copy.locations = new java.util.LinkedHashMap( copy.locations );
071                }
072    
073                return copy;
074            }
075            catch ( java.lang.Exception ex )
076            {
077                throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
078                    + " does not support clone()" ).initCause( ex );
079            }
080        } //-- Relocation clone()
081    
082        /**
083         * Get the new artifact ID of the artifact.
084         * 
085         * @return String
086         */
087        public String getArtifactId()
088        {
089            return this.artifactId;
090        } //-- String getArtifactId()
091    
092        /**
093         * Get the group ID the artifact has moved to.
094         * 
095         * @return String
096         */
097        public String getGroupId()
098        {
099            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    }