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     * Contains the information needed for deploying websites.
012     * 
013     * @version $Revision$ $Date$
014     */
015    @SuppressWarnings( "all" )
016    public class Site
017        implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
018    {
019    
020          //--------------------------/
021         //- Class/Member Variables -/
022        //--------------------------/
023    
024        /**
025         * 
026         *             
027         *             A unique identifier for a deployment location.
028         * This is used to match the
029         *             site to configuration in the
030         * <code>settings.xml</code> file, for example.
031         *             
032         *           
033         */
034        private String id;
035    
036        /**
037         * Human readable name of the deployment location.
038         */
039        private String name;
040    
041        /**
042         * 
043         *             
044         *             The url of the location where website is
045         * deployed, in the form <code>protocol://hostname/path</code>.
046         *             
047         *           
048         */
049        private String url;
050    
051        /**
052         * Field locations.
053         */
054        private java.util.Map<Object, InputLocation> locations;
055    
056    
057          //-----------/
058         //- Methods -/
059        //-----------/
060    
061        /**
062         * Method clone.
063         * 
064         * @return Site
065         */
066        public Site clone()
067        {
068            try
069            {
070                Site copy = (Site) super.clone();
071    
072                if ( copy.locations != null )
073                {
074                    copy.locations = new java.util.LinkedHashMap( copy.locations );
075                }
076    
077                return copy;
078            }
079            catch ( java.lang.Exception ex )
080            {
081                throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
082                    + " does not support clone()" ).initCause( ex );
083            }
084        } //-- Site clone()
085    
086        /**
087         * Get a unique identifier for a deployment location. This is
088         * used to match the
089         *             site to configuration in the
090         * <code>settings.xml</code> file, for example.
091         * 
092         * @return String
093         */
094        public String getId()
095        {
096            return this.id;
097        } //-- String getId()
098    
099        /**
100         * 
101         * 
102         * @param key
103         * @return InputLocation
104         */
105        public InputLocation getLocation( Object key )
106        {
107            return ( locations != null ) ? locations.get( key ) : null;
108        } //-- InputLocation getLocation( Object )
109    
110        /**
111         * Get human readable name of the deployment location.
112         * 
113         * @return String
114         */
115        public String getName()
116        {
117            return this.name;
118        } //-- String getName()
119    
120        /**
121         * Get the url of the location where website is deployed, in
122         * the form <code>protocol://hostname/path</code>.
123         * 
124         * @return String
125         */
126        public String getUrl()
127        {
128            return this.url;
129        } //-- String getUrl()
130    
131        /**
132         * Set a unique identifier for a deployment location. This is
133         * used to match the
134         *             site to configuration in the
135         * <code>settings.xml</code> file, for example.
136         * 
137         * @param id
138         */
139        public void setId( String id )
140        {
141            this.id = id;
142        } //-- void setId( String )
143    
144        /**
145         * 
146         * 
147         * @param key
148         * @param location
149         */
150        public void setLocation( Object key, InputLocation location )
151        {
152            if ( location != null )
153            {
154                if ( this.locations == null )
155                {
156                    this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
157                }
158                this.locations.put( key, location );
159            }
160        } //-- void setLocation( Object, InputLocation )
161    
162        /**
163         * Set human readable name of the deployment location.
164         * 
165         * @param name
166         */
167        public void setName( String name )
168        {
169            this.name = name;
170        } //-- void setName( String )
171    
172        /**
173         * Set the url of the location where website is deployed, in
174         * the form <code>protocol://hostname/path</code>.
175         * 
176         * @param url
177         */
178        public void setUrl( String url )
179        {
180            this.url = url;
181        } //-- void setUrl( String )
182    
183    }