View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.11,
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 or project.directory
46       * property), or just parent value if
47       *             site's
48       * <code>child.site.url.inherit.append.path="false"</code>
49       *             
50       *           
51       */
52      private String url;
53  
54      /**
55       * 
56       *             
57       *             When children inherit from distribution
58       * management site url, append path or not? Note: While the
59       * type
60       *             of this field is <code>String</code> for
61       * technical reasons, the semantic type is actually
62       *             <code>Boolean</code>
63       *             <br><b>Default value is</b>: <code>true</code>
64       *             <br><b>Since</b>: Maven 3.6.1
65       *             
66       *           .
67       */
68      private String childSiteUrlInheritAppendPath;
69  
70      /**
71       * Field locations.
72       */
73      private java.util.Map<Object, InputLocation> locations;
74  
75      /**
76       * Field location.
77       */
78      private InputLocation location;
79  
80      /**
81       * Field idLocation.
82       */
83      private InputLocation idLocation;
84  
85      /**
86       * Field nameLocation.
87       */
88      private InputLocation nameLocation;
89  
90      /**
91       * Field urlLocation.
92       */
93      private InputLocation urlLocation;
94  
95      /**
96       * Field childSiteUrlInheritAppendPathLocation.
97       */
98      private InputLocation childSiteUrlInheritAppendPathLocation;
99  
100 
101       //-----------/
102      //- Methods -/
103     //-----------/
104 
105     /**
106      * Method clone.
107      * 
108      * @return Site
109      */
110     public Site clone()
111     {
112         try
113         {
114             Site copy = (Site) super.clone();
115 
116             if ( copy.locations != null )
117             {
118                 copy.locations = new java.util.LinkedHashMap( copy.locations );
119             }
120 
121             return copy;
122         }
123         catch ( java.lang.Exception ex )
124         {
125             throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
126                 + " does not support clone()" ).initCause( ex );
127         }
128     } //-- Site clone()
129 
130     /**
131      * Get when children inherit from distribution management site
132      * url, append path or not? Note: While the type
133      *             of this field is <code>String</code> for
134      * technical reasons, the semantic type is actually
135      *             <code>Boolean</code>
136      *             <br><b>Default value is</b>: <code>true</code>
137      *             <br><b>Since</b>: Maven 3.6.1.
138      * 
139      * @return String
140      */
141     public String getChildSiteUrlInheritAppendPath()
142     {
143         return this.childSiteUrlInheritAppendPath;
144     } //-- String getChildSiteUrlInheritAppendPath()
145 
146     /**
147      * Get a unique identifier for a deployment location. This is
148      * used to match the
149      *             site to configuration in the
150      * <code>settings.xml</code> file, for example.
151      * 
152      * @return String
153      */
154     public String getId()
155     {
156         return this.id;
157     } //-- String getId()
158 
159     /**
160      * 
161      * 
162      * @param key
163      * @return InputLocation
164      */
165     public InputLocation getLocation( Object key )
166     {
167         if ( key instanceof String )
168         {
169             switch ( ( String ) key )
170             {
171                 case "" :
172                 {
173                     return this.location;
174                 }
175                 case "id" :
176                 {
177                     return idLocation;
178                 }
179                 case "name" :
180                 {
181                     return nameLocation;
182                 }
183                 case "url" :
184                 {
185                     return urlLocation;
186                 }
187                 case "childSiteUrlInheritAppendPath" :
188                 {
189                     return childSiteUrlInheritAppendPathLocation;
190                 }
191                 default :
192                 {
193                     return getOtherLocation( key );
194                 }
195                 }
196             }
197             else
198             {
199                 return getOtherLocation( key );
200             }
201     } //-- InputLocation getLocation( Object )
202 
203     /**
204      * Get human readable name of the deployment location.
205      * 
206      * @return String
207      */
208     public String getName()
209     {
210         return this.name;
211     } //-- String getName()
212 
213     /**
214      * 
215      * 
216      * @param key
217      * @param location
218      */
219     public void setLocation( Object key, InputLocation location )
220     {
221         if ( key instanceof String )
222         {
223             switch ( ( String ) key )
224             {
225                 case "" :
226                 {
227                     this.location = location;
228                     return;
229                 }
230                 case "id" :
231                 {
232                     idLocation = location;
233                     return;
234                 }
235                 case "name" :
236                 {
237                     nameLocation = location;
238                     return;
239                 }
240                 case "url" :
241                 {
242                     urlLocation = location;
243                     return;
244                 }
245                 case "childSiteUrlInheritAppendPath" :
246                 {
247                     childSiteUrlInheritAppendPathLocation = location;
248                     return;
249                 }
250                 default :
251                 {
252                     setOtherLocation( key, location );
253                     return;
254                 }
255                 }
256             }
257             else
258             {
259                 setOtherLocation( key, location );
260             }
261     } //-- void setLocation( Object, InputLocation )
262 
263     /**
264      * 
265      * 
266      * @param key
267      * @param location
268      */
269     public void setOtherLocation( Object key, InputLocation location )
270     {
271         if ( location != null )
272         {
273             if ( this.locations == null )
274             {
275                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
276             }
277             this.locations.put( key, location );
278         }
279     } //-- void setOtherLocation( Object, InputLocation )
280 
281     /**
282      * 
283      * 
284      * @param key
285      * @return InputLocation
286      */
287     private InputLocation getOtherLocation( Object key )
288     {
289         return ( locations != null ) ? locations.get( key ) : null;
290     } //-- InputLocation getOtherLocation( Object )
291 
292     /**
293      * Get the url of the location where website is deployed, in
294      * the form <code>protocol://hostname/path</code>.
295      *             <br><b>Default value is</b>: parent value [+
296      * path adjustment] + (artifactId or project.directory
297      * property), or just parent value if
298      *             site's
299      * <code>child.site.url.inherit.append.path="false"</code>
300      * 
301      * @return String
302      */
303     public String getUrl()
304     {
305         return this.url;
306     } //-- String getUrl()
307 
308     /**
309      * Set when children inherit from distribution management site
310      * url, append path or not? Note: While the type
311      *             of this field is <code>String</code> for
312      * technical reasons, the semantic type is actually
313      *             <code>Boolean</code>
314      *             <br><b>Default value is</b>: <code>true</code>
315      *             <br><b>Since</b>: Maven 3.6.1.
316      * 
317      * @param childSiteUrlInheritAppendPath
318      */
319     public void setChildSiteUrlInheritAppendPath( String childSiteUrlInheritAppendPath )
320     {
321         this.childSiteUrlInheritAppendPath = childSiteUrlInheritAppendPath;
322     } //-- void setChildSiteUrlInheritAppendPath( String )
323 
324     /**
325      * Set a unique identifier for a deployment location. This is
326      * used to match the
327      *             site to configuration in the
328      * <code>settings.xml</code> file, for example.
329      * 
330      * @param id
331      */
332     public void setId( String id )
333     {
334         this.id = id;
335     } //-- void setId( String )
336 
337     /**
338      * Set human readable name of the deployment location.
339      * 
340      * @param name
341      */
342     public void setName( String name )
343     {
344         this.name = name;
345     } //-- void setName( String )
346 
347     /**
348      * Set the url of the location where website is deployed, in
349      * the form <code>protocol://hostname/path</code>.
350      *             <br><b>Default value is</b>: parent value [+
351      * path adjustment] + (artifactId or project.directory
352      * property), or just parent value if
353      *             site's
354      * <code>child.site.url.inherit.append.path="false"</code>
355      * 
356      * @param url
357      */
358     public void setUrl( String url )
359     {
360         this.url = url;
361     } //-- void setUrl( String )
362 
363     
364             
365 
366     public boolean isChildSiteUrlInheritAppendPath()
367     {
368         return ( childSiteUrlInheritAppendPath != null ) ? Boolean.parseBoolean( childSiteUrlInheritAppendPath ) : true;
369     }
370 
371     public void setChildSiteUrlInheritAppendPath( boolean childSiteUrlInheritAppendPath )
372     {
373         this.childSiteUrlInheritAppendPath = String.valueOf( childSiteUrlInheritAppendPath );
374     }
375 
376             
377           
378 }