Author: bpapez
Date: Thu Jan  3 15:55:57 2008
New Revision: 19454

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D19454&repname=
=3Djahia
Log:
JAHIA-2645: Not possible to remove windowSize from declareContainerList
- it was impossible to remove any property on declaration, now it is

Modified:
    branches/JAHIA-4-1-BRANCH/src/java/org/jahia/data/containers/JahiaConta=
inerDefinition.java
    branches/JAHIA-4-1-BRANCH/src/java/org/jahia/data/containers/JahiaConta=
inerSet.java

Modified: branches/JAHIA-4-1-BRANCH/src/java/org/jahia/data/containers/Jahi=
aContainerDefinition.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-4-1-BR=
ANCH/src/java/org/jahia/data/containers/JahiaContainerDefinition.java&rev=
=3D19454&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-4-1-BRANCH/src/java/org/jahia/data/containers/JahiaConta=
inerDefinition.java (original)
+++ branches/JAHIA-4-1-BRANCH/src/java/org/jahia/data/containers/JahiaConta=
inerDefinition.java Thu Jan  3 15:55:57 2008
@@ -383,34 +383,6 @@
         }
     }
 =

-    /**
-     * Merge a set of properties passed in parameters with the internal
-     * properties set. Returns true if the resulting set of internal prope=
rties
-     * must be serialized.
-     * @param newProperties
-     * @return true if the result of the merge is a different set of prope=
rties
-     * that needs to be serialized.
-     */
-    public boolean propertiesChanged(Properties newProperties) {
-        boolean mustSave =3D false;
-        Enumeration newPropKeys =3D newProperties.keys();
-        while (newPropKeys.hasMoreElements()) {
-            String curNewPropName =3D (String) newPropKeys.nextElement();
-            String curNewPropValue =3D newProperties.getProperty(curNewPro=
pName);
-            if (this.ctnDefProperties.containsKey(curNewPropName)) {
-                String internalPropValue =3D this.ctnDefProperties.getProp=
erty(curNewPropName);
-                if (!internalPropValue.equals(curNewPropValue)) {
-                    // properties are not equal
-                    mustSave =3D true;
-                }
-            } else {
-                // this is a new property.
-                mustSave =3D true;
-            }
-        }
-        return mustSave;
-    }
-
     //--------------------------------------------------------------------=
------
     /**
      * Set the Container Edit View

Modified: branches/JAHIA-4-1-BRANCH/src/java/org/jahia/data/containers/Jahi=
aContainerSet.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-4-1-BR=
ANCH/src/java/org/jahia/data/containers/JahiaContainerSet.java&rev=3D19454&=
repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-4-1-BRANCH/src/java/org/jahia/data/containers/JahiaConta=
inerSet.java (original)
+++ branches/JAHIA-4-1-BRANCH/src/java/org/jahia/data/containers/JahiaConta=
inerSet.java Thu Jan  3 15:55:57 2008
@@ -588,7 +588,7 @@
 =

             // second, let's build the property set of the container defin=
ition
             Properties ctnDefProperties =3D new Properties();
-            if ((windowSize >=3D 1)) {
+            if (windowSize >=3D 1) {
                 if (windowOffset < 0) {
                     windowOffset =3D 0;
                 }
@@ -620,9 +620,7 @@
                 // okay, it seems the definition already exists.
                 // now has it the same data than in the database ?
                 =

-                Properties properties =3D new Properties(aDef.getPropertie=
s());
-                boolean propertiesHaveChanged =3D aDef
-                    .propertiesChanged(ctnDefProperties);
+                boolean propertiesHaveChanged =3D !aDef.getProperties().eq=
uals(ctnDefProperties);
                 // checks if title changed
                 boolean titleHasChanged =3D !aDef.getTitle(pageDefID).equa=
ls(
                                 containerTitle);
@@ -639,7 +637,7 @@
                                 + " has changed");
                         if (propertiesHaveChanged) {
                             logger.warn(" Properties have changed : "
-                                    + properties + " / " + ctnDefPropertie=
s);
+                                    + aDef.getProperties() + " / " + ctnDe=
fProperties);
                         }
                         if (titleHasChanged) {
                             logger.warn(" Title has changed : "
@@ -651,7 +649,7 @@
                         }
                     }
                     synchronized (ctnDefRegistry) {
-                        aDef.getProperties().putAll(ctnDefProperties);
+                        aDef.setProperties(ctnDefProperties);
                         // well, data is not the same in the registry and =
in the declare() method !
                         // this means the user has changed the container d=
eclaration in the template...
                         aDef.setTitle(containerTitle, pageDefID);

_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list

Reply via email to