View Javadoc
1   /*
2    Licensed to the Apache Software Foundation (ASF) under one
3    or more contributor license agreements.  See the NOTICE file
4    distributed with this work for additional information
5    regarding copyright ownership.  The ASF licenses this file
6    to you under the Apache License, Version 2.0 (the
7    "License"); you may not use this file except in compliance
8    with the License.  You may obtain a copy of the License at
9    
10       http://www.apache.org/licenses/LICENSE-2.0
11   
12   Unless required by applicable law or agreed to in writing,
13   software distributed under the License is distributed on an
14   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   KIND, either express or implied.  See the License for the
16   specific language governing permissions and limitations
17   under the License.
18   =================== DO NOT EDIT THIS FILE ====================
19   Generated by Modello 2.4.0,
20   any modifications will be overwritten.
21   ==============================================================
22   */
23  
24  package org.apache.maven.model;
25  
26  /**
27   * Information about the issue tracking (or bug tracking) system
28   * used to manage this
29   *         project.
30   * 
31   * @version $Revision$ $Date$
32   */
33  @SuppressWarnings( "all" )
34  public class IssueManagement
35      implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
36  {
37  
38        //--------------------------/
39       //- Class/Member Variables -/
40      //--------------------------/
41  
42      /**
43       * The name of the issue management system, e.g. Bugzilla.
44       */
45      private String system;
46  
47      /**
48       * URL for the issue management system used by the project.
49       */
50      private String url;
51  
52      /**
53       * Field locations.
54       */
55      private java.util.Map<Object, InputLocation> locations;
56  
57      /**
58       * Field location.
59       */
60      private InputLocation location;
61  
62      /**
63       * Field systemLocation.
64       */
65      private InputLocation systemLocation;
66  
67      /**
68       * Field urlLocation.
69       */
70      private InputLocation urlLocation;
71  
72  
73        //-----------/
74       //- Methods -/
75      //-----------/
76  
77      /**
78       * Method clone.
79       * 
80       * @return IssueManagement
81       */
82      public IssueManagement clone()
83      {
84          try
85          {
86              IssueManagement copy = (IssueManagement) super.clone();
87  
88              if ( copy.locations != null )
89              {
90                  copy.locations = new java.util.LinkedHashMap( copy.locations );
91              }
92  
93              return copy;
94          }
95          catch ( java.lang.Exception ex )
96          {
97              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
98                  + " does not support clone()" ).initCause( ex );
99          }
100     } //-- IssueManagement clone()
101 
102     /**
103      * 
104      * 
105      * @param key a key object.
106      * @return InputLocation
107      */
108     public InputLocation getLocation( Object key )
109     {
110         if ( key instanceof String )
111         {
112             switch ( ( String ) key )
113             {
114                 case "" :
115                 {
116                     return this.location;
117                 }
118                 case "system" :
119                 {
120                     return systemLocation;
121                 }
122                 case "url" :
123                 {
124                     return urlLocation;
125                 }
126                 default :
127                 {
128                     return getOtherLocation( key );
129                 }
130                 }
131             }
132             else
133             {
134                 return getOtherLocation( key );
135             }
136     } //-- InputLocation getLocation( Object )
137 
138     /**
139      * 
140      * 
141      * @param key a key object.
142      * @param location a location object.
143      */
144     public void setLocation( Object key, InputLocation location )
145     {
146         if ( key instanceof String )
147         {
148             switch ( ( String ) key )
149             {
150                 case "" :
151                 {
152                     this.location = location;
153                     return;
154                 }
155                 case "system" :
156                 {
157                     systemLocation = location;
158                     return;
159                 }
160                 case "url" :
161                 {
162                     urlLocation = location;
163                     return;
164                 }
165                 default :
166                 {
167                     setOtherLocation( key, location );
168                     return;
169                 }
170             }
171         }
172         else
173         {
174             setOtherLocation( key, location );
175         }
176     } //-- void setLocation( Object, InputLocation )
177 
178     /**
179      * 
180      * 
181      * @param key a key object.
182      * @param location a location object.
183      */
184     public void setOtherLocation( Object key, InputLocation location )
185     {
186         if ( location != null )
187         {
188             if ( this.locations == null )
189             {
190                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
191             }
192             this.locations.put( key, location );
193         }
194     } //-- void setOtherLocation( Object, InputLocation )
195 
196     /**
197      * 
198      * 
199      * @param key a key object.
200      * @return InputLocation
201      */
202     private InputLocation getOtherLocation( Object key )
203     {
204         return ( locations != null ) ? locations.get( key ) : null;
205     } //-- InputLocation getOtherLocation( Object )
206 
207     /**
208      * Get the name of the issue management system, e.g. Bugzilla.
209      * 
210      * @return String
211      */
212     public String getSystem()
213     {
214         return this.system;
215     } //-- String getSystem()
216 
217     /**
218      * Get uRL for the issue management system used by the project.
219      * 
220      * @return String
221      */
222     public String getUrl()
223     {
224         return this.url;
225     } //-- String getUrl()
226 
227     /**
228      * Set the name of the issue management system, e.g. Bugzilla.
229      * 
230      * @param system a system object.
231      */
232     public void setSystem( String system )
233     {
234         this.system = system;
235     } //-- void setSystem( String )
236 
237     /**
238      * Set uRL for the issue management system used by the project.
239      * 
240      * @param url a url object.
241      */
242     public void setUrl( String url )
243     {
244         this.url = url;
245     } //-- void setUrl( String )
246 
247     
248             
249     /**
250      * @see java.lang.Object#toString()
251      */
252     public String toString()
253     {
254         return "IssueManagement {system=" + system + ", url=" + url + "}";
255     }
256             
257           
258 }