felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1040674 - in /felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal: ConfigInstaller.java DirectoryWatcher.java
Date Tue, 30 Nov 2010 18:29:39 GMT
Author: gnodet
Date: Tue Nov 30 18:29:39 2010
New Revision: 1040674

URL: http://svn.apache.org/viewvc?rev=1040674&view=rev
Log:
[FELIX-2699] Disable writing configuration back to .cfg files

Modified:
    felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
    felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java

Modified: felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
URL: http://svn.apache.org/viewvc/felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java?rev=1040674&r1=1040673&r2=1040674&view=diff
==============================================================================
--- felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
(original)
+++ felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
Tue Nov 30 18:29:39 2010
@@ -100,6 +100,18 @@ public class ConfigInstaller implements 
 
     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

Modified: felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
URL: http://svn.apache.org/viewvc/felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java?rev=1040674&r1=1040673&r2=1040674&view=diff
==============================================================================
--- felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
(original)
+++ felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
Tue Nov 30 18:29:39 2010
@@ -89,6 +89,7 @@ public class DirectoryWatcher extends Th
     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();



Mime
View raw message