Sleuth Kit Java Bindings (JNI)  4.9.0
Java bindings for using The Sleuth Kit
CaseDbConnectionInfo.java
Go to the documentation of this file.
1 /*
2  * Sleuth Kit Data Model
3  *
4  * Copyright 2011-2015 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.datamodel;
20 
22 
30 public class CaseDbConnectionInfo {
31 
32  private String hostNameOrIP;
33  private String portNumber;
34  private String userName;
35  private String password;
36  private DbType dbType;
37 
52  public CaseDbConnectionInfo(String hostNameOrIP, String portNumber, String userName, String password, DbType dbType) {
53  this.hostNameOrIP = hostNameOrIP;
54  this.portNumber = portNumber;
55  this.userName = userName;
56  this.password = password;
57  if (dbType == DbType.SQLITE) {
58  throw new IllegalArgumentException("SQLite database type invalid for CaseDbConnectionInfo. CaseDbConnectionInfo should be used only for remote database types.");
59  }
60  this.dbType = dbType;
61  }
62 
63  public DbType getDbType() {
64  return this.dbType;
65  }
66 
67  public String getHost() {
68  return this.hostNameOrIP;
69  }
70 
71  public String getPort() {
72  return this.portNumber;
73  }
74 
75  public String getUserName() {
76  return this.userName;
77  }
78 
79  public String getPassword() {
80  return this.password;
81  }
82 
83  public void setDbType(DbType db) {
84  this.dbType = db;
85  }
86 
87  public void setHost(String host) {
88  this.hostNameOrIP = host;
89  }
90 
91  public void setPort(String port) {
92  this.portNumber = port;
93  }
94 
95  public void setUserName(String user) {
96  this.userName = user;
97  }
98 
99  public void setPassword(String pass) {
100  this.password = pass;
101  }
102 }
CaseDbConnectionInfo(String hostNameOrIP, String portNumber, String userName, String password, DbType dbType)

Copyright © 2011-2020 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.