View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.8.1,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.maven.model;
7   
8   /**
9    * Contains the information needed for deploying websites.
10   * 
11   * @version $Revision$ $Date$
12   */
13  @SuppressWarnings( "all" )
14  public class Site
15      implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
16  {
17  
18        //--------------------------/
19       //- Class/Member Variables -/
20      //--------------------------/
21  
22      /**
23       * 
24       *             
25       *             A unique identifier for a deployment location.
26       * This is used to match the
27       *             site to configuration in the
28       * <code>settings.xml</code> file, for example.
29       *             
30       *           
31       */
32      private String id;
33  
34      /**
35       * Human readable name of the deployment location.
36       */
37      private String name;
38  
39      /**
40       * 
41       *             
42       *             The url of the location where website is
43       * deployed, in the form <code>protocol://hostname/path</code>.
44       *             <br /><b>Default value is</b>: parent value [+
45       * path adjustment] + artifactId
46       *             
47       *           .
48       */
49      private String url;
50  
51      /**
52       * Field locations.
53       */
54      private java.util.Map<Object, InputLocation> locations;
55  
56  
57        //-----------/
58       //- Methods -/
59      //-----------/
60  
61      /**
62       * Method clone.
63       * 
64       * @return Site
65       */
66      public Site clone()
67      {
68          try
69          {
70              Site copy = (Site) super.clone();
71  
72              if ( copy.locations != null )
73              {
74                  copy.locations = new java.util.LinkedHashMap( copy.locations );
75              }
76  
77              return copy;
78          }
79          catch ( java.lang.Exception ex )
80          {
81              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
82                  + " does not support clone()" ).initCause( ex );
83          }
84      } //-- Site clone()
85  
86      /**
87       * Get a unique identifier for a deployment location. This is
88       * used to match the
89       *             site to configuration in the
90       * <code>settings.xml</code> file, for example.
91       * 
92       * @return String
93       */
94      public String getId()
95      {
96          return this.id;
97      } //-- String getId()
98  
99      /**
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      *             <br /><b>Default value is</b>: parent value [+
124      * path adjustment] + artifactId.
125      * 
126      * @return String
127      */
128     public String getUrl()
129     {
130         return this.url;
131     } //-- String getUrl()
132 
133     /**
134      * Set a unique identifier for a deployment location. This is
135      * used to match the
136      *             site to configuration in the
137      * <code>settings.xml</code> file, for example.
138      * 
139      * @param id
140      */
141     public void setId( String id )
142     {
143         this.id = id;
144     } //-- void setId( String )
145 
146     /**
147      * 
148      * 
149      * @param key
150      * @param location
151      */
152     public void setLocation( Object key, InputLocation location )
153     {
154         if ( location != null )
155         {
156             if ( this.locations == null )
157             {
158                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
159             }
160             this.locations.put( key, location );
161         }
162     } //-- void setLocation( Object, InputLocation )
163 
164     /**
165      * Set human readable name of the deployment location.
166      * 
167      * @param name
168      */
169     public void setName( String name )
170     {
171         this.name = name;
172     } //-- void setName( String )
173 
174     /**
175      * Set the url of the location where website is deployed, in
176      * the form <code>protocol://hostname/path</code>.
177      *             <br /><b>Default value is</b>: parent value [+
178      * path adjustment] + artifactId.
179      * 
180      * @param url
181      */
182     public void setUrl( String url )
183     {
184         this.url = url;
185     } //-- void setUrl( String )
186 
187 }