From 03a03105bc613cf8b87aa67938e9c940197ef511 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Thu, 27 Mar 2014 09:31:57 -0400
Subject: [PATCH] Change build identifier to 1.5.0-SNAPSHOT
---
src/main/java/com/gitblit/IStoredSettings.java | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/gitblit/IStoredSettings.java b/src/main/java/com/gitblit/IStoredSettings.java
index 01c478f..13dca6b 100644
--- a/src/main/java/com/gitblit/IStoredSettings.java
+++ b/src/main/java/com/gitblit/IStoredSettings.java
@@ -343,6 +343,16 @@
}
/**
+ * 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.
*
@@ -351,4 +361,14 @@
* @return true if successful
*/
public abstract boolean saveSettings(Map<String, String> updatedSettings);
+
+ /**
+ * Merge all settings from the settings parameter into this instance.
+ *
+ * @param settings
+ */
+ public void merge(IStoredSettings settings) {
+ getSettings().putAll(settings.getSettings());
+ overrides.putAll(settings.overrides);
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1