[mapguide-commits] r5368 - trunk/MgDev/Server/src/Services/Resource

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Nov 1 15:17:51 EDT 2010


Author: brucedechant
Date: 2010-11-01 12:17:51 -0700 (Mon, 01 Nov 2010)
New Revision: 5368

Modified:
   trunk/MgDev/Server/src/Services/Resource/ResourceHeaderManager.cpp
Log:
Fix for trac ticket 1398 - Upgrade to DbXml 2.5.16
Fix for trac ticket 1399 - Upgrade to Xerces 3.1.0
http://trac.osgeo.org/mapguide/ticket/1398
http://trac.osgeo.org/mapguide/ticket/1399

Implement RFC 101 - Xerces Upgrade
http://trac.osgeo.org/mapguide/wiki/MapGuideRfc101
Implement RFC 102 - DBXML and Xqilla Upgrade
http://trac.osgeo.org/mapguide/wiki/MapGuideRfc102

Notes:
- XML document updates using the ResourceHeaderManager were not being done and no exception was being thrown. This required a slight coding change to ensure the XML document changes are committed.


Modified: trunk/MgDev/Server/src/Services/Resource/ResourceHeaderManager.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/ResourceHeaderManager.cpp	2010-11-01 09:36:15 UTC (rev 5367)
+++ trunk/MgDev/Server/src/Services/Resource/ResourceHeaderManager.cpp	2010-11-01 19:17:51 UTC (rev 5368)
@@ -1547,6 +1547,9 @@
 
     MG_RESOURCE_SERVICE_TRY()
 
+    // Setup the working XmlDocument as we don't want to query the source
+    XmlDocument workingDoc = m_container.getDocument(GetXmlTxn(), xmlDoc.getName());
+
     // Read the resource permission information.
 
     permissionInfo.reset(new MgPermissionInfo(m_repositoryMan.m_accessedTime));
@@ -1557,7 +1560,7 @@
 
     // Get the owner.
 
-    if (xmlDoc.getMetaData(
+    if (workingDoc.getMetaData(
             MgResourceInfo::sm_metadataUri,
             MgResourceInfo::sm_metadataNames[MgResourceInfo::Owner],
             ownerValue))
@@ -1576,8 +1579,8 @@
     // Get the inherited flag.
 
     inheritedFlagResults = IsTransacted() ?
-        selectInheritedFlags.execute(GetXmlTxn(), xmlDoc, queryContext, 0) :
-        selectInheritedFlags.execute(xmlDoc, queryContext, 0);
+        selectInheritedFlags.execute(GetXmlTxn(), workingDoc, queryContext, 0) :
+        selectInheritedFlags.execute(workingDoc, queryContext, 0);
 
     if (inheritedFlagResults.next(inheritedValue))
     {
@@ -1597,11 +1600,11 @@
         // Get user permissions.
 
         nameResults = IsTransacted() ?
-            selectUserNames.execute(GetXmlTxn(), xmlDoc, queryContext, 0) :
-            selectUserNames.execute(xmlDoc, queryContext, 0);
+            selectUserNames.execute(GetXmlTxn(), workingDoc, queryContext, 0) :
+            selectUserNames.execute(workingDoc, queryContext, 0);
         permissionResults = IsTransacted() ?
-            selectUserPermissions.execute(GetXmlTxn(), xmlDoc, queryContext, 0) :
-            selectUserPermissions.execute(xmlDoc, queryContext, 0);
+            selectUserPermissions.execute(GetXmlTxn(), workingDoc, queryContext, 0) :
+            selectUserPermissions.execute(workingDoc, queryContext, 0);
 
         if (nameResults.size() != permissionResults.size())
         {
@@ -1620,11 +1623,11 @@
         // Get group permissions.
 
         nameResults = IsTransacted() ?
-            selectGroupNames.execute(GetXmlTxn(), xmlDoc, queryContext, 0) :
-            selectGroupNames.execute(xmlDoc, queryContext, 0);
+            selectGroupNames.execute(GetXmlTxn(), workingDoc, queryContext, 0) :
+            selectGroupNames.execute(workingDoc, queryContext, 0);
         permissionResults = IsTransacted() ?
-            selectGroupPermissions.execute(GetXmlTxn(), xmlDoc, queryContext, 0) :
-            selectGroupPermissions.execute(xmlDoc, queryContext, 0);
+            selectGroupPermissions.execute(GetXmlTxn(), workingDoc, queryContext, 0) :
+            selectGroupPermissions.execute(workingDoc, queryContext, 0);
 
         if (nameResults.size() != permissionResults.size())
         {



More information about the mapguide-commits mailing list