001    /*
002     =================== DO NOT EDIT THIS FILE ====================
003     Generated by Modello 1.4.1 on 2012-01-20 18:09:18,
004     any modifications will be overwritten.
005     ==============================================================
006     */
007    
008    package org.apache.maven.model;
009    
010    /**
011     * 
012     *         
013     *         The <code>&lt;exclusion&gt;</code> element contains
014     * informations required to exclude
015     *         an artifact to the project.
016     *         
017     *       
018     * 
019     * @version $Revision$ $Date$
020     */
021    @SuppressWarnings( "all" )
022    public class Exclusion
023        implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
024    {
025    
026          //--------------------------/
027         //- Class/Member Variables -/
028        //--------------------------/
029    
030        /**
031         * The artifact ID of the project to exclude.
032         */
033        private String artifactId;
034    
035        /**
036         * The group ID of the project to exclude.
037         */
038        private String groupId;
039    
040        /**
041         * Field locations.
042         */
043        private java.util.Map<Object, InputLocation> locations;
044    
045    
046          //-----------/
047         //- Methods -/
048        //-----------/
049    
050        /**
051         * Method clone.
052         * 
053         * @return Exclusion
054         */
055        public Exclusion clone()
056        {
057            try
058            {
059                Exclusion copy = (Exclusion) super.clone();
060    
061                if ( copy.locations != null )
062                {
063                    copy.locations = new java.util.LinkedHashMap( copy.locations );
064                }
065    
066                return copy;
067            }
068            catch ( java.lang.Exception ex )
069            {
070                throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
071                    + " does not support clone()" ).initCause( ex );
072            }
073        } //-- Exclusion clone()
074    
075        /**
076         * Get the artifact ID of the project to exclude.
077         * 
078         * @return String
079         */
080        public String getArtifactId()
081        {
082            return this.artifactId;
083        } //-- String getArtifactId()
084    
085        /**
086         * Get the group ID of the project to exclude.
087         * 
088         * @return String
089         */
090        public String getGroupId()
091        {
092            return this.groupId;
093        } //-- String getGroupId()
094    
095        /**
096         * 
097         * 
098         * @param key
099         * @return InputLocation
100         */
101        public InputLocation getLocation( Object key )
102        {
103            return ( locations != null ) ? locations.get( key ) : null;
104        } //-- InputLocation getLocation( Object )
105    
106        /**
107         * Set the artifact ID of the project to exclude.
108         * 
109         * @param artifactId
110         */
111        public void setArtifactId( String artifactId )
112        {
113            this.artifactId = artifactId;
114        } //-- void setArtifactId( String )
115    
116        /**
117         * Set the group ID of the project to exclude.
118         * 
119         * @param groupId
120         */
121        public void setGroupId( String groupId )
122        {
123            this.groupId = groupId;
124        } //-- void setGroupId( String )
125    
126        /**
127         * 
128         * 
129         * @param key
130         * @param location
131         */
132        public void setLocation( Object key, InputLocation location )
133        {
134            if ( location != null )
135            {
136                if ( this.locations == null )
137                {
138                    this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
139                }
140                this.locations.put( key, location );
141            }
142        } //-- void setLocation( Object, InputLocation )
143    
144    }