summaryrefslogtreecommitdiff
path: root/src/utils/Configuration.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/Configuration.java')
-rw-r--r--src/utils/Configuration.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/utils/Configuration.java b/src/utils/Configuration.java
index abb4df0..78bd9e2 100644
--- a/src/utils/Configuration.java
+++ b/src/utils/Configuration.java
@@ -22,6 +22,9 @@ public class Configuration {
public static final String REQUEST_TOKEN_URL = "https://twitter.com/oauth/request_token";
public static final String AUTHORIZE_URL = "https://twitter.com/oauth/authorize";
public static final String ACCESS_TOKEN_URL = "https://twitter.com/oauth/access_token";
+
+ public static final String DEFAULT_TWEETS_FILENAME = "tweets.txt";
+ public static final String DEFAULT_PROFILE_FILENAME = "profiles.txt";
private final Properties properties;
private final File storeFile;
@@ -77,6 +80,17 @@ public class Configuration {
* @return The value for the key or null if there is none.
*/
public String getProperty(String key) {
- return properties.getProperty(key);
+ return getProperty(key, null);
+ }
+
+ /**
+ * Gets a setting with the given key.
+ *
+ * @param key Name of the configuration setting.
+ * @param defaultVal The default value for the key.
+ * @return The value for the key or null if there is none.
+ */
+ public String getProperty(String key, String defaultVal) {
+ return properties.getProperty(key, defaultVal);
}
}