incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1075771 - in /sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl: AbstractConfigTask.java ConfigRemoveTask.java ConfigTaskCreator.java ConfigUtil.java
Date Tue, 01 Mar 2011 10:49:51 GMT
Author: cziegeler
Date: Tue Mar  1 10:49:50 2011
New Revision: 1075771

URL: http://svn.apache.org/viewvc?rev=1075771&view=rev
Log:
SLING-2004 : Don't add org.apache.sling.installer.osgi.path property to configurations

Modified:
    sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/AbstractConfigTask.java
    sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/ConfigRemoveTask.java
    sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/ConfigTaskCreator.java
    sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/ConfigUtil.java

Modified: sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/AbstractConfigTask.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/AbstractConfigTask.java?rev=1075771&r1=1075770&r2=1075771&view=diff
==============================================================================
--- sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/AbstractConfigTask.java
(original)
+++ sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/AbstractConfigTask.java
Tue Mar  1 10:49:50 2011
@@ -84,7 +84,6 @@ abstract class AbstractConfigTask extend
             result.put(key, d.get(key));
         }
 
-        result.put(ConfigTaskCreator.CONFIG_PATH_KEY, getResource().getURL());
         if ( this.factoryPid != null ) {
             result.put(ConfigTaskCreator.ALIAS_KEY, configPid);
         }

Modified: sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/ConfigRemoveTask.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/ConfigRemoveTask.java?rev=1075771&r1=1075770&r2=1075771&view=diff
==============================================================================
--- sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/ConfigRemoveTask.java
(original)
+++ sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/ConfigRemoveTask.java
Tue Mar  1 10:49:50 2011
@@ -52,10 +52,7 @@ public class ConfigRemoveTask extends Ab
                 this.getLogger().debug("Cannot delete config , pid={} not found, ignored
({})", getCompositePid(), getResource());
                 this.setFinishedState(ResourceState.IGNORED);
             } else {
-                if ( cfg.getProperties().get(ConfigTaskCreator.CONFIG_PATH_KEY) == null )
{
-                    this.getLogger().debug("Configuration has not been installed by this
resource. Not removing!");
-                    this.setFinishedState(ResourceState.IGNORED);
-                } else if ( !ConfigUtil.isSameData(cfg.getProperties(), this.getResource().getDictionary())
) {
+                if ( !ConfigUtil.isSameData(cfg.getProperties(), this.getResource().getDictionary())
) {
                     this.getLogger().debug("Configuration has changed after it has been installed.
Not removing!");
                     this.setFinishedState(ResourceState.IGNORED);
                 } else {

Modified: sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/ConfigTaskCreator.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/ConfigTaskCreator.java?rev=1075771&r1=1075770&r2=1075771&view=diff
==============================================================================
--- sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/ConfigTaskCreator.java
(original)
+++ sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/ConfigTaskCreator.java
Tue Mar  1 10:49:50 2011
@@ -45,7 +45,6 @@ public class ConfigTaskCreator
     implements InstallTaskFactory, ConfigurationListener, ResourceTransformer {
 
     public static final String ALIAS_KEY = "org.apache.sling.installer.osgi.factoryaliaspid";
-    public static final String CONFIG_PATH_KEY = "org.apache.sling.installer.osgi.path";
 
     /** Configuration admin. */
     private ConfigurationAdmin configAdmin;

Modified: sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/ConfigUtil.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/ConfigUtil.java?rev=1075771&r1=1075770&r2=1075771&view=diff
==============================================================================
--- sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/ConfigUtil.java
(original)
+++ sling/trunk/installer/factories/configuration/src/main/java/org/apache/sling/installer/factories/configuration/impl/ConfigUtil.java
Tue Mar  1 10:49:50 2011
@@ -35,11 +35,17 @@ import org.osgi.service.cm.Configuration
  */
 abstract class ConfigUtil {
 
+    /**
+     * This property has been used in older versions to keep track where the
+     * configuration has been installed from.
+     */
+    private static final String CONFIG_PATH_KEY = "org.apache.sling.installer.osgi.path";
+
     /** Configuration properties to ignore when comparing configs */
     private static final Set<String> IGNORED_PROPERTIES = new HashSet<String>();
     static {
         IGNORED_PROPERTIES.add(Constants.SERVICE_PID);
-        IGNORED_PROPERTIES.add(ConfigTaskCreator.CONFIG_PATH_KEY);
+        IGNORED_PROPERTIES.add(CONFIG_PATH_KEY);
         IGNORED_PROPERTIES.add(ConfigTaskCreator.ALIAS_KEY);
     }
 



Mime
View raw message