diff options
-rw-r--r-- | src/main/java/com/gitblit/IStoredSettings.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/IStoredSettings.java b/src/main/java/com/gitblit/IStoredSettings.java index 9c7a2d23..13dca6b6 100644 --- a/src/main/java/com/gitblit/IStoredSettings.java +++ b/src/main/java/com/gitblit/IStoredSettings.java @@ -343,6 +343,16 @@ public abstract class IStoredSettings { }
/**
+ * Tests for the existence of a setting.
+ *
+ * @param key
+ * @return true if the setting exists
+ */
+ public boolean hasSettings(String key) {
+ return getString(key, null) != null;
+ }
+
+ /**
* Updates the values for the specified keys and persists the entire
* configuration file.
*
|