Add temporary directory preference key.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@1121 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2003-05-07 17:27:26 +00:00
parent c5f3d888b4
commit a0abb3cbe6
2 changed files with 15 additions and 2 deletions
@@ -1,5 +1,5 @@
//
// $Id: RDJPrefs.java,v 1.1 2003/05/04 18:16:07 mdb Exp $
// $Id: RDJPrefs.java,v 1.2 2003/05/07 17:27:26 mdb Exp $
package robodj.util;
@@ -15,6 +15,9 @@ public class RDJPrefs
/** Configuration key for {@link #getRepositoryDirectory}. */
public static final String REPO_DIR_KEY = "repository.basedir";
/** Configuration key for {@link #getRepositoryTemp}. */
public static final String REPO_TMPDIR_KEY = "repository.tmpdir";
/** Configuration key for {@link #getJDBCConfig}. */
public static final String JDBC_DRIVER_KEY = "jdbc.default.driver";
@@ -50,6 +53,15 @@ public class RDJPrefs
return config.getValue(REPO_DIR_KEY, "");
}
/**
* Returns a temporary directory into which we can store ripped tracks.
*/
public static String getRepositoryTemp ()
{
return config.getValue(
REPO_TMPDIR_KEY, System.getProperty("java.io.tmpdir"));
}
/**
* Returns the JDBC configuration for this RoboDJ installation.
*/
@@ -1,5 +1,5 @@
//
// $Id: RDJPrefsPanel.java,v 1.1 2003/05/04 18:16:07 mdb Exp $
// $Id: RDJPrefsPanel.java,v 1.2 2003/05/07 17:27:26 mdb Exp $
package robodj.util;
@@ -173,6 +173,7 @@ public class RDJPrefsPanel extends JPanel
/** Defines our configurable preferences. */
protected static final String[] PREFS = {
"Music repository directory", RDJPrefs.REPO_DIR_KEY,
"Music temporary directory", RDJPrefs.REPO_TMPDIR_KEY,
"", "",
"Music database JDBC driver", RDJPrefs.JDBC_DRIVER_KEY,
"Music database JDBC url", RDJPrefs.JDBC_URL_KEY,