commit | 2a4eb769185e178d3e71a8802e1bde715b387fbb | [log] [tgz] |
---|---|---|
author | Guillaume Nodet <gnodet@apache.org> | Tue Nov 30 18:29:39 2010 +0000 |
committer | Guillaume Nodet <gnodet@apache.org> | Tue Nov 30 18:29:39 2010 +0000 |
tree | 70de8d02c3961973626ed5b456a34e2f7cf23e2a | |
parent | 340a155818f8f24644c4c24d69c18a9511768cbb [diff] |
[FELIX-2699] Disable writing configuration back to .cfg files git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1040674 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java b/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java index 4711033..bbb8e1f 100644 --- a/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java +++ b/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
@@ -100,6 +100,18 @@ public void configurationEvent(ConfigurationEvent configurationEvent) { + // Check if writing back configurations has been disabled. + { + Object obj = this.context.getProperty( DirectoryWatcher.DISABLE_CONFIG_SAVE ); + if (obj instanceof String) { + obj = new Boolean((String) obj ); + } + if( Boolean.FALSE.equals( obj ) ) + { + return; + } + } + if (configurationEvent.getType() == ConfigurationEvent.CM_UPDATED) { try
diff --git a/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java b/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java index 08b3e17..3792642 100644 --- a/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java +++ b/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
@@ -89,6 +89,7 @@ public final static String START_NEW_BUNDLES = "felix.fileinstall.bundles.new.start"; public final static String USE_START_TRANSIENT = "felix.fileinstall.bundles.startTransient"; public final static String NO_INITIAL_DELAY = "felix.fileinstall.noInitialDelay"; + public final static String DISABLE_CONFIG_SAVE = "felix.fileinstall.disableConfigSave"; public final static String START_LEVEL = "felix.fileinstall.start.level"; static final SecureRandom random = new SecureRandom();