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    * Information about the issue tracking (or bug tracking) system
10   * used to manage this
11   *         project.
12   * 
13   * @version $Revision$ $Date$
14   */
15  @SuppressWarnings( "all" )
16  public class IssueManagement
17      implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
18  {
19  
20        //--------------------------/
21       //- Class/Member Variables -/
22      //--------------------------/
23  
24      /**
25       * The name of the issue management system, e.g. Bugzilla.
26       */
27      private String system;
28  
29      /**
30       * URL for the issue management system used by the project.
31       */
32      private String url;
33  
34      /**
35       * Field locations.
36       */
37      private java.util.Map<Object, InputLocation> locations;
38  
39      /**
40       * Field location.
41       */
42      private InputLocation location;
43  
44      /**
45       * Field systemLocation.
46       */
47      private InputLocation systemLocation;
48  
49      /**
50       * Field urlLocation.
51       */
52      private InputLocation urlLocation;
53  
54  
55        //-----------/
56       //- Methods -/
57      //-----------/
58  
59      /**
60       * Method clone.
61       * 
62       * @return IssueManagement
63       */
64      public IssueManagement clone()
65      {
66          try
67          {
68              IssueManagement copy = (IssueManagement) super.clone();
69  
70              if ( copy.locations != null )
71              {
72                  copy.locations = new java.util.LinkedHashMap( copy.locations );
73              }
74  
75              return copy;
76          }
77          catch ( java.lang.Exception ex )
78          {
79              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
80                  + " does not support clone()" ).initCause( ex );
81          }
82      } //-- IssueManagement clone()
83  
84      /**
85       * 
86       * 
87       * @param key
88       * @return InputLocation
89       */
90      public InputLocation getLocation( Object key )
91      {
92          if ( key instanceof String )
93          {
94              switch ( ( String ) key )
95              {
96                  case "" :
97                  {
98                      return this.location;
99                  }
100                 case "system" :
101                 {
102                     return systemLocation;
103                 }
104                 case "url" :
105                 {
106                     return urlLocation;
107                 }
108                 default :
109                 {
110                     return getOtherLocation( key );
111                 }
112                 }
113             }
114             else
115             {
116                 return getOtherLocation( key );
117             }
118     } //-- InputLocation getLocation( Object )
119 
120     /**
121      * 
122      * 
123      * @param key
124      * @param location
125      */
126     public void setLocation( Object key, InputLocation location )
127     {
128         if ( key instanceof String )
129         {
130             switch ( ( String ) key )
131             {
132                 case "" :
133                 {
134                     this.location = location;
135                     return;
136                 }
137                 case "system" :
138                 {
139                     systemLocation = location;
140                     return;
141                 }
142                 case "url" :
143                 {
144                     urlLocation = location;
145                     return;
146                 }
147                 default :
148                 {
149                     setOtherLocation( key, location );
150                     return;
151                 }
152                 }
153             }
154             else
155             {
156                 setOtherLocation( key, location );
157             }
158     } //-- void setLocation( Object, InputLocation )
159 
160     /**
161      * 
162      * 
163      * @param key
164      * @param location
165      */
166     public void setOtherLocation( Object key, InputLocation location )
167     {
168         if ( location != null )
169         {
170             if ( this.locations == null )
171             {
172                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
173             }
174             this.locations.put( key, location );
175         }
176     } //-- void setOtherLocation( Object, InputLocation )
177 
178     /**
179      * 
180      * 
181      * @param key
182      * @return InputLocation
183      */
184     private InputLocation getOtherLocation( Object key )
185     {
186         return ( locations != null ) ? locations.get( key ) : null;
187     } //-- InputLocation getOtherLocation( Object )
188 
189     /**
190      * Get the name of the issue management system, e.g. Bugzilla.
191      * 
192      * @return String
193      */
194     public String getSystem()
195     {
196         return this.system;
197     } //-- String getSystem()
198 
199     /**
200      * Get uRL for the issue management system used by the project.
201      * 
202      * @return String
203      */
204     public String getUrl()
205     {
206         return this.url;
207     } //-- String getUrl()
208 
209     /**
210      * Set the name of the issue management system, e.g. Bugzilla.
211      * 
212      * @param system
213      */
214     public void setSystem( String system )
215     {
216         this.system = system;
217     } //-- void setSystem( String )
218 
219     /**
220      * Set uRL for the issue management system used by the project.
221      * 
222      * @param url
223      */
224     public void setUrl( String url )
225     {
226         this.url = url;
227     } //-- void setUrl( String )
228 
229     
230             
231     /**
232      * @see java.lang.Object#toString()
233      */
234     public String toString()
235     {
236         return "IssueManagement {system=" + system + ", url=" + url + "}";
237     }
238             
239           
240 }