Class DatabaseUtils
- java.lang.Object
-
- org.openrefine.extension.database.DatabaseUtils
-
public class DatabaseUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
DATABASE_EXTENSION_DIR
static String
SAVED_CONNECTION_KEY
static String
SETTINGS_FILE_NAME
-
Constructor Summary
Constructors Constructor Description DatabaseUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addToSavedConnections(DatabaseConfiguration dbConfig)
ADD to saved connectionsstatic String
decrypt(String encodedPassword)
static List<DatabaseConfiguration>
decryptAll(List<DatabaseConfiguration> savedConnections)
static void
deleteAllSavedConnections()
static void
deleteSavedConnections(String connectionName)
DELETE saved connectionsstatic void
editSavedConnections(DatabaseConfiguration jdbcConfig)
EDIT saved connectionsstatic String
encrypt(String plainPassword)
static DatabaseColumnType
getDbColumnType(int dbColumnType)
static String
getExtensionFilePath()
static String
getExtensionFolder()
static DatabaseConfiguration
getSavedConnection(String connectionName)
GET one saved connectionstatic List<DatabaseConfiguration>
getSavedConnections()
GET saved connectionsstatic int
getSavedConnectionsSize()
-
-
-
Field Detail
-
DATABASE_EXTENSION_DIR
public static final String DATABASE_EXTENSION_DIR
- See Also:
- Constant Field Values
-
SETTINGS_FILE_NAME
public static final String SETTINGS_FILE_NAME
- See Also:
- Constant Field Values
-
SAVED_CONNECTION_KEY
public static final String SAVED_CONNECTION_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSavedConnectionsSize
public static int getSavedConnectionsSize()
-
getSavedConnections
public static List<DatabaseConfiguration> getSavedConnections()
GET saved connections- Returns:
-
getSavedConnection
public static DatabaseConfiguration getSavedConnection(String connectionName)
GET one saved connection- Parameters:
connectionName
-- Returns:
-
decryptAll
public static List<DatabaseConfiguration> decryptAll(List<DatabaseConfiguration> savedConnections)
-
addToSavedConnections
public static void addToSavedConnections(DatabaseConfiguration dbConfig)
ADD to saved connections- Parameters:
dbConfig
-
-
deleteAllSavedConnections
public static void deleteAllSavedConnections()
-
deleteSavedConnections
public static void deleteSavedConnections(String connectionName)
DELETE saved connections- Parameters:
connectionName
-
-
editSavedConnections
public static void editSavedConnections(DatabaseConfiguration jdbcConfig)
EDIT saved connections- Parameters:
jdbcConfig
-
-
getExtensionFilePath
public static String getExtensionFilePath()
-
getExtensionFolder
public static String getExtensionFolder()
-
getDbColumnType
public static DatabaseColumnType getDbColumnType(int dbColumnType)
-
-