View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.9.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: 1008624 $ $Date: 2017-03-19 14:17:57 +0000 (Sun, 19 Mar 2017) $
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
46       * <code>project.directory</code> property)
47       *             
48       *           .
49       */
50      private String url;
51  
52      /**
53       * Field locations.
54       */
55      private java.util.Map<Object, InputLocation> locations;
56  
57  
58        //-----------/
59       //- Methods -/
60      //-----------/
61  
62      /**
63       * Method clone.
64       * 
65       * @return Site
66       */
67      public Site clone()
68      {
69          try
70          {
71              Site copy = (Site) super.clone();
72  
73              if ( copy.locations != null )
74              {
75                  copy.locations = new java.util.LinkedHashMap( copy.locations );
76              }
77  
78              return copy;
79          }
80          catch ( java.lang.Exception ex )
81          {
82              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
83                  + " does not support clone()" ).initCause( ex );
84          }
85      } //-- Site clone()
86  
87      /**
88       * Get a unique identifier for a deployment location. This is
89       * used to match the
90       *             site to configuration in the
91       * <code>settings.xml</code> file, for example.
92       * 
93       * @return String
94       */
95      public String getId()
96      {
97          return this.id;
98      } //-- String getId()
99  
100     /**
101      * 
102      * 
103      * @param key
104      * @return InputLocation
105      */
106     public InputLocation getLocation( Object key )
107     {
108         return ( locations != null ) ? locations.get( key ) : null;
109     } //-- InputLocation getLocation( Object )
110 
111     /**
112      * Get human readable name of the deployment location.
113      * 
114      * @return String
115      */
116     public String getName()
117     {
118         return this.name;
119     } //-- String getName()
120 
121     /**
122      * Get the url of the location where website is deployed, in
123      * the form <code>protocol://hostname/path</code>.
124      *             <br><b>Default value is</b>: parent value [+
125      * path adjustment] + (artifactId or
126      * <code>project.directory</code> property).
127      * 
128      * @return String
129      */
130     public String getUrl()
131     {
132         return this.url;
133     } //-- String getUrl()
134 
135     /**
136      * Set a unique identifier for a deployment location. This is
137      * used to match the
138      *             site to configuration in the
139      * <code>settings.xml</code> file, for example.
140      * 
141      * @param id
142      */
143     public void setId( String id )
144     {
145         this.id = id;
146     } //-- void setId( String )
147 
148     /**
149      * 
150      * 
151      * @param key
152      * @param location
153      */
154     public void setLocation( Object key, InputLocation location )
155     {
156         if ( location != null )
157         {
158             if ( this.locations == null )
159             {
160                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
161             }
162             this.locations.put( key, location );
163         }
164     } //-- void setLocation( Object, InputLocation )
165 
166     /**
167      * Set human readable name of the deployment location.
168      * 
169      * @param name
170      */
171     public void setName( String name )
172     {
173         this.name = name;
174     } //-- void setName( String )
175 
176     /**
177      * Set the url of the location where website is deployed, in
178      * the form <code>protocol://hostname/path</code>.
179      *             <br><b>Default value is</b>: parent value [+
180      * path adjustment] + (artifactId or
181      * <code>project.directory</code> property).
182      * 
183      * @param url
184      */
185     public void setUrl( String url )
186     {
187         this.url = url;
188     } //-- void setUrl( String )
189 
190 }