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   *
27   * @version $Id: DatabaseParams.java 1372260 2012-08-13 04:29:09Z brett $
28   */
29  public class DatabaseParams
30  {
31      private final String driverClass;
32  
33      private String url;
34  
35      private final String groupId;
36  
37      private final String artifactId;
38  
39      private String version;
40  
41      private String username;
42  
43      private String password;
44  
45      private final Properties properties = new Properties();
46  
47      DatabaseParams( String driverClass, String groupId, String artifactId, String version, String username,
48                      String password )
49      {
50          this.driverClass = driverClass;
51  
52          this.groupId = groupId;
53  
54          this.artifactId = artifactId;
55  
56          this.version = version;
57  
58          this.username = username;
59  
60          this.password = password;
61      }
62  
63      DatabaseParams( DatabaseParams params )
64      {
65          this.driverClass = params.driverClass;
66  
67          this.groupId = params.groupId;
68  
69          this.artifactId = params.artifactId;
70  
71          this.version = params.version;
72  
73          this.username = params.username;
74  
75          this.password = params.password;
76  
77          this.url = params.url;
78      }
79  
80      public String getUrl()
81      {
82          return url;
83      }
84  
85      public String getGroupId()
86      {
87          return groupId;
88      }
89  
90      public String getArtifactId()
91      {
92          return artifactId;
93      }
94  
95      public String getVersion()
96      {
97          return version;
98      }
99  
100     public String getUsername()
101     {
102         return username;
103     }
104 
105     public String getPassword()
106     {
107         return password;
108     }
109 
110     public String getDriverClass()
111     {
112         return driverClass;
113     }
114 
115     public void setUrl( String url )
116     {
117         this.url = url;
118     }
119 
120     public Properties getProperties()
121     {
122         return properties;
123     }
124 }