Autopsy  4.4.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
PostgresEamDbSettings.java
Go to the documentation of this file.
1 /*
2  * Central Repository
3  *
4  * Copyright 2015-2017 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.autopsy.centralrepository.datamodel;
20 
21 import java.sql.Connection;
22 import java.sql.DriverManager;
23 import java.sql.PreparedStatement;
24 import java.sql.ResultSet;
25 import java.sql.SQLException;
26 import java.sql.Statement;
27 import java.util.ArrayList;
28 import java.util.Arrays;
29 import java.util.List;
30 import java.util.Properties;
31 import java.util.logging.Level;
32 import java.util.regex.Pattern;
37 
41 public final class PostgresEamDbSettings {
42 
43  private final static Logger LOGGER = Logger.getLogger(PostgresEamDbSettings.class.getName());
44  private final String DEFAULT_HOST = "localhost"; // NON-NLS
45  private final int DEFAULT_PORT = 5432;
46  private final String DEFAULT_DBNAME = "central_repository"; // NON-NLS
47  private final int DEFAULT_BULK_THRESHHOLD = 1000;
48  private final String DEFAULT_USERNAME = "";
49  private final String DEFAULT_PASSWORD = "";
50  private final String DEFAULT_BAD_TAGS = "Evidence"; // NON-NLS
51  private final String VALIDATION_QUERY = "SELECT version()"; // NON-NLS
52  private final String JDBC_BASE_URI = "jdbc:postgresql://"; // NON-NLS
53  private final String JDBC_DRIVER = "org.postgresql.Driver"; // NON-NLS
54  private final String DB_NAMES_REGEX = "[a-z][a-z0-9_]*"; // only lower case
55  private final String DB_USER_NAMES_REGEX = "[a-zA-Z]\\w*";
56  private String host;
57  private int port;
58  private String dbName;
59  private int bulkThreshold;
60  private String userName;
61  private String password;
62  private List<String> badTags;
63 
65  loadSettings();
66  }
67 
68  public void loadSettings() {
69  host = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.host"); // NON-NLS
70  if (host == null || host.isEmpty()) {
71  host = DEFAULT_HOST;
72  }
73 
74  try {
75  String portString = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.port"); // NON-NLS
76  if (portString == null || portString.isEmpty()) {
77  port = DEFAULT_PORT;
78  } else {
79  port = Integer.parseInt(portString);
80  if (port < 0 || port > 65535) {
81  port = DEFAULT_PORT;
82  }
83  }
84  } catch (NumberFormatException ex) {
85  port = DEFAULT_PORT;
86  }
87 
88  dbName = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.dbName"); // NON-NLS
89  if (dbName == null || dbName.isEmpty()) {
90  dbName = DEFAULT_DBNAME;
91  }
92 
93  try {
94  String bulkThresholdString = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.bulkThreshold"); // NON-NLS
95  if (bulkThresholdString == null || bulkThresholdString.isEmpty()) {
96  this.bulkThreshold = DEFAULT_BULK_THRESHHOLD;
97  } else {
98  this.bulkThreshold = Integer.parseInt(bulkThresholdString);
99  if (getBulkThreshold() <= 0) {
100  this.bulkThreshold = DEFAULT_BULK_THRESHHOLD;
101  }
102  }
103  } catch (NumberFormatException ex) {
104  this.bulkThreshold = DEFAULT_BULK_THRESHHOLD;
105  }
106 
107  userName = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.user"); // NON-NLS
108  if (userName == null || userName.isEmpty()) {
109  userName = DEFAULT_USERNAME;
110  }
111 
112  password = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.password"); // NON-NLS
113  if (password == null || password.isEmpty()) {
114  password = DEFAULT_PASSWORD;
115  } else {
116  try {
117  password = TextConverter.convertHexTextToText(password);
118  } catch (TextConverterException ex) {
119  LOGGER.log(Level.WARNING, "Failed to convert password from hex text to text.", ex);
120  password = DEFAULT_PASSWORD;
121  }
122  }
123 
124  String badTagsStr = ModuleSettings.getConfigSetting("CentralRepository", "db.badTags"); // NON-NLS
125  if (badTagsStr == null) {
126  badTagsStr = DEFAULT_BAD_TAGS;
127  }
128  if(badTagsStr.isEmpty()){
129  badTags = new ArrayList<>();
130  } else {
131  badTags = new ArrayList<>(Arrays.asList(badTagsStr.split(",")));
132  }
133  }
134 
135  public void saveSettings() {
136  ModuleSettings.setConfigSetting("CentralRepository", "db.postgresql.host", getHost()); // NON-NLS
137  ModuleSettings.setConfigSetting("CentralRepository", "db.postgresql.port", Integer.toString(port)); // NON-NLS
138  ModuleSettings.setConfigSetting("CentralRepository", "db.postgresql.dbName", getDbName()); // NON-NLS
139  ModuleSettings.setConfigSetting("CentralRepository", "db.postgresql.bulkThreshold", Integer.toString(getBulkThreshold())); // NON-NLS
140  ModuleSettings.setConfigSetting("CentralRepository", "db.postgresql.user", getUserName()); // NON-NLS
141  try {
142  ModuleSettings.setConfigSetting("CentralRepository", "db.postgresql.password", TextConverter.convertTextToHexText(getPassword())); // NON-NLS
143  } catch (TextConverterException ex) {
144  LOGGER.log(Level.SEVERE, "Failed to convert password from text to hex text.", ex);
145  }
146 
147  ModuleSettings.setConfigSetting("CentralRepository", "db.badTags", String.join(",", badTags)); // NON-NLS
148  }
149 
158  public String getConnectionURL(boolean usePostgresDb) {
159  StringBuilder url = new StringBuilder();
160  url.append(getJDBCBaseURI());
161  url.append(getHost());
162  url.append("/"); // NON-NLS
163  if (usePostgresDb) {
164  url.append("postgres"); // NON-NLS
165  } else {
166  url.append(getDbName());
167  }
168 
169  return url.toString();
170  }
171 
178  private Connection getEphemeralConnection(boolean usePostgresDb) {
179  Connection conn;
180  try {
181  String url = getConnectionURL(usePostgresDb);
182  Properties props = new Properties();
183  props.setProperty("user", getUserName());
184  props.setProperty("password", getPassword());
185 
186  Class.forName(getDriver());
187  conn = DriverManager.getConnection(url, props);
188  } catch (ClassNotFoundException | SQLException ex) {
189  // TODO: Determine why a connection failure (ConnectionException) re-throws
190  // the SQLException and does not print this log message?
191  LOGGER.log(Level.SEVERE, "Failed to acquire ephemeral connection to postgresql."); // NON-NLS
192  conn = null;
193  }
194  return conn;
195  }
196 
203  public boolean verifyConnection() {
204  Connection conn = getEphemeralConnection(true);
205  if (null == conn) {
206  return false;
207  }
208 
209  boolean result = EamDbUtil.executeValidationQuery(conn, VALIDATION_QUERY);
211  return result;
212  }
213 
219  public boolean verifyDatabaseExists() {
220  Connection conn = getEphemeralConnection(true);
221  if (null == conn) {
222  return false;
223  }
224 
225  String sql = "SELECT datname FROM pg_catalog.pg_database WHERE lower(datname) = lower(?) LIMIT 1"; // NON-NLS
226  PreparedStatement ps = null;
227  ResultSet rs = null;
228  try {
229  ps = conn.prepareStatement(sql);
230  ps.setString(1, getDbName());
231  rs = ps.executeQuery();
232  if (rs.next()) {
233  return true;
234  }
235  } catch (SQLException ex) {
236  LOGGER.log(Level.SEVERE, "Failed to execute database existance query.", ex); // NON-NLS
237  return false;
238  } finally {
242  }
243  return false;
244  }
245 
252  public boolean verifyDatabaseSchema() {
253  Connection conn = getEphemeralConnection(false);
254  if (null == conn) {
255  return false;
256  }
257 
258  boolean result = EamDbUtil.schemaVersionIsSet(conn);
259 
261  return result;
262  }
263 
264  public boolean createDatabase() {
265  Connection conn = getEphemeralConnection(true);
266  if (null == conn) {
267  return false;
268  }
269 
270  String sql = "CREATE DATABASE %s OWNER %s"; // NON-NLS
271  try {
272  Statement stmt;
273  stmt = conn.createStatement();
274  stmt.execute(String.format(sql, getDbName(), getUserName()));
275  } catch (SQLException ex) {
276  LOGGER.log(Level.SEVERE, "Failed to execute create database statement.", ex); // NON-NLS
277  return false;
278  } finally {
280  }
281  return true;
282 
283  }
284 
285  public boolean deleteDatabase() {
286  Connection conn = getEphemeralConnection(true);
287  if (null == conn) {
288  return false;
289  }
290 
291  String sql = "DROP DATABASE %s"; // NON-NLS
292  try {
293  Statement stmt;
294  stmt = conn.createStatement();
295  stmt.execute(String.format(sql, getDbName()));
296  } catch (SQLException ex) {
297  LOGGER.log(Level.SEVERE, "Failed to execute drop database statement.", ex); // NON-NLS
298  return false;
299  } finally {
301  }
302  return true;
303 
304  }
305 
317  public boolean initializeDatabaseSchema() {
318  // The "id" column is an alias for the built-in 64-bit int "rowid" column.
319  // It is autoincrementing by default and must be of type "integer primary key".
320  // We've omitted the autoincrement argument because we are not currently
321  // using the id value to search for specific rows, so we do not care
322  // if a rowid is re-used after an existing rows was previously deleted.
323  StringBuilder createOrganizationsTable = new StringBuilder();
324  createOrganizationsTable.append("CREATE TABLE IF NOT EXISTS organizations (");
325  createOrganizationsTable.append("id SERIAL PRIMARY KEY,");
326  createOrganizationsTable.append("org_name text NOT NULL,");
327  createOrganizationsTable.append("poc_name text NOT NULL,");
328  createOrganizationsTable.append("poc_email text NOT NULL,");
329  createOrganizationsTable.append("poc_phone text NOT NULL,");
330  createOrganizationsTable.append("CONSTRAINT org_name_unique UNIQUE (org_name)");
331  createOrganizationsTable.append(")");
332 
333  // NOTE: The organizations will only have a small number of rows, so
334  // an index is probably not worthwhile.
335  StringBuilder createCasesTable = new StringBuilder();
336  createCasesTable.append("CREATE TABLE IF NOT EXISTS cases (");
337  createCasesTable.append("id SERIAL PRIMARY KEY,");
338  createCasesTable.append("case_uid text NOT NULL,");
339  createCasesTable.append("org_id integer,");
340  createCasesTable.append("case_name text NOT NULL,");
341  createCasesTable.append("creation_date text NOT NULL,");
342  createCasesTable.append("case_number text,");
343  createCasesTable.append("examiner_name text,");
344  createCasesTable.append("examiner_email text,");
345  createCasesTable.append("examiner_phone text,");
346  createCasesTable.append("notes text,");
347  createCasesTable.append("foreign key (org_id) references organizations(id) ON UPDATE SET NULL ON DELETE SET NULL");
348  createCasesTable.append(")");
349 
350  // NOTE: when there are few cases in the cases table, these indices may not be worthwhile
351  String casesIdx1 = "CREATE INDEX IF NOT EXISTS cases_org_id ON cases (org_id)";
352  String casesIdx2 = "CREATE INDEX IF NOT EXISTS cases_case_uid ON cases (case_uid)";
353 
354  StringBuilder createDataSourcesTable = new StringBuilder();
355  createDataSourcesTable.append("CREATE TABLE IF NOT EXISTS data_sources (");
356  createDataSourcesTable.append("id SERIAL PRIMARY KEY,");
357  createDataSourcesTable.append("device_id text NOT NULL,");
358  createDataSourcesTable.append("name text NOT NULL,");
359  createDataSourcesTable.append("CONSTRAINT device_id_unique UNIQUE (device_id)");
360  createDataSourcesTable.append(")");
361 
362  String dataSourceIdx1 = "CREATE INDEX IF NOT EXISTS data_sources_name ON data_sources (name)";
363 
364  StringBuilder createReferenceSetsTable = new StringBuilder();
365  createReferenceSetsTable.append("CREATE TABLE IF NOT EXISTS reference_sets (");
366  createReferenceSetsTable.append("id SERIAL PRIMARY KEY,");
367  createReferenceSetsTable.append("org_id integer NOT NULL,");
368  createReferenceSetsTable.append("set_name text NOT NULL,");
369  createReferenceSetsTable.append("version text NOT NULL,");
370  createReferenceSetsTable.append("import_date text NOT NULL,");
371  createReferenceSetsTable.append("foreign key (org_id) references organizations(id) ON UPDATE SET NULL ON DELETE SET NULL,");
372  createReferenceSetsTable.append("CONSTRAINT hash_set_unique UNIQUE (set_name, version)");
373  createReferenceSetsTable.append(")");
374 
375  String referenceSetsIdx1 = "CREATE INDEX IF NOT EXISTS reference_sets_org_id ON reference_sets (org_id)";
376 
377  // Each "%s" will be replaced with the relevant reference_TYPE table name.
378  StringBuilder createReferenceTypesTableTemplate = new StringBuilder();
379  createReferenceTypesTableTemplate.append("CREATE TABLE IF NOT EXISTS %s (");
380  createReferenceTypesTableTemplate.append("id SERIAL PRIMARY KEY,");
381  createReferenceTypesTableTemplate.append("reference_set_id integer,");
382  createReferenceTypesTableTemplate.append("value text NOT NULL,");
383  createReferenceTypesTableTemplate.append("known_status integer NOT NULL,");
384  createReferenceTypesTableTemplate.append("comment text,");
385  createReferenceTypesTableTemplate.append("CONSTRAINT %s_multi_unique UNIQUE (reference_set_id, value),");
386  createReferenceTypesTableTemplate.append("foreign key (reference_set_id) references reference_sets(id) ON UPDATE SET NULL ON DELETE SET NULL");
387  createReferenceTypesTableTemplate.append(")");
388 
389  // Each "%s" will be replaced with the relevant reference_TYPE table name.
390  String referenceTypesIdx1 = "CREATE INDEX IF NOT EXISTS %s_value ON %s (value)";
391  String referenceTypesIdx2 = "CREATE INDEX IF NOT EXISTS %s_value_known_status ON %s (value, known_status)";
392 
393  StringBuilder createCorrelationTypesTable = new StringBuilder();
394  createCorrelationTypesTable.append("CREATE TABLE IF NOT EXISTS correlation_types (");
395  createCorrelationTypesTable.append("id SERIAL PRIMARY KEY,");
396  createCorrelationTypesTable.append("display_name text NOT NULL,");
397  createCorrelationTypesTable.append("db_table_name text NOT NULL,");
398  createCorrelationTypesTable.append("supported integer NOT NULL,");
399  createCorrelationTypesTable.append("enabled integer NOT NULL,");
400  createCorrelationTypesTable.append("CONSTRAINT correlation_types_names UNIQUE (display_name, db_table_name)");
401  createCorrelationTypesTable.append(")");
402 
403  // Each "%s" will be replaced with the relevant TYPE_instances table name.
404  StringBuilder createArtifactInstancesTableTemplate = new StringBuilder();
405  createArtifactInstancesTableTemplate.append("CREATE TABLE IF NOT EXISTS %s (");
406  createArtifactInstancesTableTemplate.append("id SERIAL PRIMARY KEY,");
407  createArtifactInstancesTableTemplate.append("case_id integer,");
408  createArtifactInstancesTableTemplate.append("data_source_id integer,");
409  createArtifactInstancesTableTemplate.append("value text NOT NULL,");
410  createArtifactInstancesTableTemplate.append("file_path text NOT NULL,");
411  createArtifactInstancesTableTemplate.append("known_status integer NOT NULL,");
412  createArtifactInstancesTableTemplate.append("comment text,");
413  createArtifactInstancesTableTemplate.append("CONSTRAINT %s_multi_unique_ UNIQUE (case_id, data_source_id, value, file_path),");
414  createArtifactInstancesTableTemplate.append("foreign key (case_id) references cases(id) ON UPDATE SET NULL ON DELETE SET NULL,");
415  createArtifactInstancesTableTemplate.append("foreign key (data_source_id) references data_sources(id) ON UPDATE SET NULL ON DELETE SET NULL");
416  createArtifactInstancesTableTemplate.append(")");
417 
418  // Each "%s" will be replaced with the relevant TYPE_instances table name.
419  String instancesIdx1 = "CREATE INDEX IF NOT EXISTS %s_case_id ON %s (case_id)";
420  String instancesIdx2 = "CREATE INDEX IF NOT EXISTS %s_data_source_id ON %s (data_source_id)";
421  String instancesIdx3 = "CREATE INDEX IF NOT EXISTS %s_value ON %s (value)";
422  String instancesIdx4 = "CREATE INDEX IF NOT EXISTS %s_value_known_status ON %s (value, known_status)";
423 
424  StringBuilder createDbInfoTable = new StringBuilder();
425  createDbInfoTable.append("CREATE TABLE IF NOT EXISTS db_info (");
426  createDbInfoTable.append("id SERIAL PRIMARY KEY NOT NULL,");
427  createDbInfoTable.append("name text NOT NULL,");
428  createDbInfoTable.append("value text NOT NULL");
429  createDbInfoTable.append(")");
430 
431  // NOTE: the db_info table currenly only has 1 row, so having an index
432  // provides no benefit.
433  Connection conn = null;
434  try {
435  conn = getEphemeralConnection(false);
436  if (null == conn) {
437  return false;
438  }
439  Statement stmt = conn.createStatement();
440 
441  stmt.execute(createOrganizationsTable.toString());
442 
443  stmt.execute(createCasesTable.toString());
444  stmt.execute(casesIdx1);
445  stmt.execute(casesIdx2);
446 
447  stmt.execute(createDataSourcesTable.toString());
448  stmt.execute(dataSourceIdx1);
449 
450  stmt.execute(createReferenceSetsTable.toString());
451  stmt.execute(referenceSetsIdx1);
452 
453  stmt.execute(createCorrelationTypesTable.toString());
454 
455  stmt.execute(createDbInfoTable.toString());
456 
457  // Create a separate instance and reference table for each correlation type
458  List<CorrelationAttribute.Type> DEFAULT_CORRELATION_TYPES = CorrelationAttribute.getDefaultCorrelationTypes();
459 
460  String reference_type_dbname;
461  String instance_type_dbname;
462  for (CorrelationAttribute.Type type : DEFAULT_CORRELATION_TYPES) {
463  reference_type_dbname = EamDbUtil.correlationTypeToReferenceTableName(type);
464  instance_type_dbname = EamDbUtil.correlationTypeToInstanceTableName(type);
465 
466  stmt.execute(String.format(createArtifactInstancesTableTemplate.toString(), instance_type_dbname, instance_type_dbname));
467  stmt.execute(String.format(instancesIdx1, instance_type_dbname, instance_type_dbname));
468  stmt.execute(String.format(instancesIdx2, instance_type_dbname, instance_type_dbname));
469  stmt.execute(String.format(instancesIdx3, instance_type_dbname, instance_type_dbname));
470  stmt.execute(String.format(instancesIdx4, instance_type_dbname, instance_type_dbname));
471 
472  // FUTURE: allow more than the FILES type
473  if (type.getId() == CorrelationAttribute.FILES_TYPE_ID) {
474  stmt.execute(String.format(createReferenceTypesTableTemplate.toString(), reference_type_dbname, reference_type_dbname));
475  stmt.execute(String.format(referenceTypesIdx1, reference_type_dbname, reference_type_dbname));
476  stmt.execute(String.format(referenceTypesIdx2, reference_type_dbname, reference_type_dbname));
477  }
478  }
479 
480  } catch (SQLException ex) {
481  LOGGER.log(Level.SEVERE, "Error initializing db schema.", ex); // NON-NLS
482  return false;
483  } catch (EamDbException ex) {
484  LOGGER.log(Level.SEVERE, "Error getting default correlation types. Likely due to one or more Type's with an invalid db table name."); // NON-NLS
485  return false;
486  } finally {
488  }
489  return true;
490  }
491 
492  public boolean insertDefaultDatabaseContent() {
493  Connection conn = getEphemeralConnection(false);
494  if (null == conn) {
495  return false;
496  }
497 
498  boolean result = EamDbUtil.insertDefaultCorrelationTypes(conn)
501 
502  return result;
503  }
504 
505  public boolean isChanged() {
506  String hostString = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.host"); // NON-NLS
507  String portString = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.port"); // NON-NLS
508  String dbNameString = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.dbName"); // NON-NLS
509  String bulkThresholdString = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.bulkThreshold"); // NON-NLS
510  String userNameString = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.user"); // NON-NLS
511  String userPasswordString = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.password"); // NON-NLS
512 
513  return !host.equals(hostString) || !Integer.toString(port).equals(portString)
514  || !dbName.equals(dbNameString) || !Integer.toString(bulkThreshold).equals(bulkThresholdString)
515  || !userName.equals(userNameString) || !password.equals(userPasswordString);
516  }
517 
521  public String getHost() {
522  return host;
523  }
524 
528  public void setHost(String host) throws EamDbException {
529  if (null != host && !host.isEmpty()) {
530  this.host = host;
531  } else {
532  throw new EamDbException("Invalid host name. Cannot be empty."); // NON-NLS
533  }
534  }
535 
539  public int getPort() {
540  return port;
541  }
542 
546  public void setPort(int port) throws EamDbException {
547  if (port > 0 && port < 65535) {
548  this.port = port;
549  } else {
550  throw new EamDbException("Invalid port. Must be a number greater than 0."); // NON-NLS
551  }
552  }
553 
560  public String getDbName() {
561  return dbName.toLowerCase();
562  }
563 
567  public void setDbName(String dbName) throws EamDbException {
568  if (dbName == null || dbName.isEmpty()) {
569  throw new EamDbException("Invalid database name. Cannot be empty."); // NON-NLS
570  } else if (!Pattern.matches(DB_NAMES_REGEX, dbName)) {
571  throw new EamDbException("Invalid database name. Name must start with a lowercase letter and can only contain lowercase letters, numbers, and '_'."); // NON-NLS
572  }
573 
574  this.dbName = dbName.toLowerCase();
575  }
576 
580  public int getBulkThreshold() {
581  return bulkThreshold;
582  }
583 
587  public void setBulkThreshold(int bulkThreshold) throws EamDbException {
588  if (bulkThreshold > 0) {
589  this.bulkThreshold = bulkThreshold;
590  } else {
591  throw new EamDbException("Invalid bulk threshold."); // NON-NLS
592  }
593  }
594 
598  public String getUserName() {
599  return userName;
600  }
601 
605  public void setUserName(String userName) throws EamDbException {
606  if (userName == null || userName.isEmpty()) {
607  throw new EamDbException("Invalid user name. Cannot be empty."); // NON-NLS
608  } else if (!Pattern.matches(DB_USER_NAMES_REGEX, userName)) {
609  throw new EamDbException("Invalid user name. Name must start with a letter and can only contain letters, numbers, and '_'."); // NON-NLS
610  }
611  this.userName = userName;
612  }
613 
617  public String getPassword() {
618  return password;
619  }
620 
624  public void setPassword(String password) throws EamDbException {
625  if (password == null || password.isEmpty()) {
626  throw new EamDbException("Invalid user password. Cannot be empty."); // NON-NLS
627  }
628  this.password = password;
629  }
630 
634  public List<String> getBadTags() {
635  return badTags;
636  }
637 
641  public void setBadTags(List<String> badTags) {
642  this.badTags = badTags;
643  }
644 
648  public String getValidationQuery() {
649  return VALIDATION_QUERY;
650  }
651 
655  public String getDriver() {
656  return JDBC_DRIVER;
657  }
658 
662  public String getJDBCBaseURI() {
663  return JDBC_BASE_URI;
664  }
665 
666 }
static boolean executeValidationQuery(Connection conn, String validationQuery)
Definition: EamDbUtil.java:205
static String correlationTypeToReferenceTableName(CorrelationAttribute.Type type)
Definition: EamDbUtil.java:244
static synchronized void setConfigSetting(String moduleName, String settingName, String settingVal)
static boolean insertDefaultCorrelationTypes(Connection conn)
Definition: EamDbUtil.java:99
static String correlationTypeToInstanceTableName(CorrelationAttribute.Type type)
Definition: EamDbUtil.java:233
static String getConfigSetting(String moduleName, String settingName)
synchronized static Logger getLogger(String name)
Definition: Logger.java:161
static String convertTextToHexText(String property)
static void closePreparedStatement(PreparedStatement preparedStatement)
Definition: EamDbUtil.java:48
static String convertHexTextToText(String property)

Copyright © 2012-2016 Basis Technology. Generated on: Fri Sep 29 2017
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.