View Javadoc

1   package org.apache.maven.continuum.management;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import java.util.Properties;
23  
24  /**
25   * Bean for storing database parameters.
26   * @version $Id: DatabaseParams.java 729479 2008-12-26 10:52:45Z olamy $
27   */
28  public class DatabaseParams
29  {
30      private final String driverClass;
31  
32      private String url;
33  
34      private final String groupId;
35  
36      private final String artifactId;
37  
38      private String version;
39  
40      private String username;
41  
42      private String password;
43  
44      private final Properties properties = new Properties();
45  
46      DatabaseParams( String driverClass, String groupId, String artifactId, String version, String username,
47                      String password )
48      {
49          this.driverClass = driverClass;
50  
51          this.groupId = groupId;
52  
53          this.artifactId = artifactId;
54  
55          this.version = version;
56  
57          this.username = username;
58  
59          this.password = password;
60      }
61  
62      DatabaseParams( DatabaseParams params )
63      {
64          this.driverClass = params.driverClass;
65  
66          this.groupId = params.groupId;
67  
68          this.artifactId = params.artifactId;
69  
70          this.version = params.version;
71  
72          this.username = params.username;
73  
74          this.password = params.password;
75  
76          this.url = params.url;
77      }
78  
79      public String getUrl()
80      {
81          return url;
82      }
83  
84      public String getGroupId()
85      {
86          return groupId;
87      }
88  
89      public String getArtifactId()
90      {
91          return artifactId;
92      }
93  
94      public String getVersion()
95      {
96          return version;
97      }
98  
99      public String getUsername()
100     {
101         return username;
102     }
103 
104     public String getPassword()
105     {
106         return password;
107     }
108 
109     public String getDriverClass()
110     {
111         return driverClass;
112     }
113 
114     public void setUrl( String url )
115     {
116         this.url = url;
117     }
118 
119     public Properties getProperties()
120     {
121         return properties;
122     }
123 }