[exo-jcr-commits] exo-jcr SVN: r3023 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Aug 31 04:39:05 EDT 2010


Author: areshetnyak
Date: 2010-08-31 04:39:04 -0400 (Tue, 31 Aug 2010)
New Revision: 3023

Modified:
   jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java
Log:
EXOJCR-880 : Remarks to this issue was applied.

Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java	2010-08-31 08:14:31 UTC (rev 3022)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java	2010-08-31 08:39:04 UTC (rev 3023)
@@ -311,7 +311,7 @@
       
       if (currentNodePropertiesInfo != null)
       {
-         checkPropertis(currentNodePropertiesInfo);
+         checkProperties(currentNodePropertiesInfo);
       }
       
       mapNodePropertiesInfo.remove(currentNodeInfo.getQPath().getAsString());
@@ -337,17 +337,11 @@
     * @throws IllegalNameException 
     * @throws IllegalStateException 
     */
-   private void checkPropertis(NodePropertiesInfo currentNodePropertiesInfo) throws RepositoryException
+   private void checkProperties(NodePropertiesInfo currentNodePropertiesInfo) throws RepositoryException
    {
       if (currentNodePropertiesInfo.getNode().getQPath().isDescendantOf(Constants.JCR_VERSION_STORAGE_PATH)
                && currentNodePropertiesInfo.getNode().getPrimaryTypeName().equals(Constants.NT_FROZENNODE))
       {
-         // name of frozenPrimaryType property 
-         InternalQName fptPropertyName = locationFactory.parseJCRName("jcr:frozenPrimaryType").getInternalName();
-
-         // node of frozenMixinTypes property
-         InternalQName fmtPropertyName = locationFactory.parseJCRName("jcr:frozenMixinTypes").getInternalName();
-
          InternalQName fptName = null;
          List<InternalQName> fmtNames = new ArrayList<InternalQName>();
 
@@ -356,15 +350,15 @@
          {
             for (ImportPropertyData propertyData : currentNodePropertiesInfo.getProperties())
             {
-               if (propertyData.getQName().equals(fptPropertyName))
+               if (propertyData.getQName().equals(Constants.JCR_FROZENPRIMARYTYPE))
                {
                   fptName = InternalQName.parse(new String(propertyData.getValues().get(0).getAsByteArray()));
                }
-               else if (propertyData.getQName().equals(fmtPropertyName))
+               else if (propertyData.getQName().equals(Constants.JCR_FROZENMIXINTYPES))
                {
                   for (ValueData valueData : propertyData.getValues())
                   {
-                     fmtNames.add(InternalQName.parse(new String(valueData.getAsByteArray())));
+                     fmtNames.add(InternalQName.parse(new String(valueData.getAsByteArray(), Constants.DEFAULT_ENCODING)));
                   }
                }
             }



More information about the exo-jcr-commits mailing list