[mapguide-commits] r6133 - in trunk/Tools/Maestro: Maestro.AddIn.Local Maestro.AddIn.Local/Commands Maestro.Base/Commands Maestro.Base/Commands/SiteExplorer Maestro.Base/Services Maestro.Base/UI OSGeo.MapGuide.MaestroAPI.Local

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Sep 15 03:58:37 EDT 2011


Author: jng
Date: 2011-09-15 00:58:37 -0700 (Thu, 15 Sep 2011)
New Revision: 6133

Modified:
   trunk/Tools/Maestro/Maestro.AddIn.Local/ACE.dll
   trunk/Tools/Maestro/Maestro.AddIn.Local/Commands/StartupCommand.cs
   trunk/Tools/Maestro/Maestro.AddIn.Local/GEOS.dll
   trunk/Tools/Maestro/Maestro.AddIn.Local/MapGuideDesktopUnmanagedApi.dll
   trunk/Tools/Maestro/Maestro.AddIn.Local/MgDesktop.dll
   trunk/Tools/Maestro/Maestro.AddIn.Local/MgFoundation.dll
   trunk/Tools/Maestro/Maestro.AddIn.Local/MgGeometry.dll
   trunk/Tools/Maestro/Maestro.AddIn.Local/MgGwsCommon.dll
   trunk/Tools/Maestro/Maestro.AddIn.Local/MgGwsQueryEngine.dll
   trunk/Tools/Maestro/Maestro.AddIn.Local/MgGwsResource.dll
   trunk/Tools/Maestro/Maestro.AddIn.Local/MgMdfModel.dll
   trunk/Tools/Maestro/Maestro.AddIn.Local/MgMdfParser.dll
   trunk/Tools/Maestro/Maestro.AddIn.Local/MgPlatformBase.dll
   trunk/Tools/Maestro/Maestro.AddIn.Local/MgRenderers.dll
   trunk/Tools/Maestro/Maestro.AddIn.Local/MgStylization.dll
   trunk/Tools/Maestro/Maestro.AddIn.Local/OSGeo.MapGuide.Desktop.dll
   trunk/Tools/Maestro/Maestro.AddIn.Local/OSGeo.MapGuide.Viewer.dll
   trunk/Tools/Maestro/Maestro.AddIn.Local/gd.dll
   trunk/Tools/Maestro/Maestro.AddIn.Local/xerces-c_3_1mg.dll
   trunk/Tools/Maestro/Maestro.Base/Commands/CopyCommand.cs
   trunk/Tools/Maestro/Maestro.Base/Commands/CutCommand.cs
   trunk/Tools/Maestro/Maestro.Base/Commands/PasteCommand.cs
   trunk/Tools/Maestro/Maestro.Base/Commands/SaveResourceAsCommand.cs
   trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/CopyMoveToAnotherServerCommand.cs
   trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/DuplicateResourceCommand.cs
   trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/FindReplaceXmlContentCommand.cs
   trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/OpenResourceCommand.cs
   trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/OpenWithXmlEditorCommand.cs
   trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/RenameCommand.cs
   trunk/Tools/Maestro/Maestro.Base/Services/OpenResourceManager.cs
   trunk/Tools/Maestro/Maestro.Base/UI/RepositoryTreeModel.cs
   trunk/Tools/Maestro/Maestro.Base/UI/SiteExplorer.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalConnection.cs
Log:
#1808: Fix an assortment of issues introduced with multi-site support. Also update the mg-desktop binaries (revision 14be1c21a0) and fix associated breakage.

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/ACE.dll
===================================================================
(Binary files differ)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/Commands/StartupCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Local/Commands/StartupCommand.cs	2011-09-13 02:45:36 UTC (rev 6132)
+++ trunk/Tools/Maestro/Maestro.AddIn.Local/Commands/StartupCommand.cs	2011-09-15 07:58:37 UTC (rev 6133)
@@ -50,7 +50,8 @@
         {
             try
             {
-                MgdResourceService resSvc = MgServiceFactory.CreateResourceService();
+                var fact = new MgServiceFactory();
+                MgdResourceService resSvc = (MgdResourceService)fact.CreateService(MgServiceType.ResourceService);
                 resSvc.DeleteSessionFiles();
             }
             catch (MgException ex)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/GEOS.dll
===================================================================
(Binary files differ)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/MapGuideDesktopUnmanagedApi.dll
===================================================================
(Binary files differ)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/MgDesktop.dll
===================================================================
(Binary files differ)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/MgFoundation.dll
===================================================================
(Binary files differ)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/MgGeometry.dll
===================================================================
(Binary files differ)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/MgGwsCommon.dll
===================================================================
(Binary files differ)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/MgGwsQueryEngine.dll
===================================================================
(Binary files differ)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/MgGwsResource.dll
===================================================================
(Binary files differ)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/MgMdfModel.dll
===================================================================
(Binary files differ)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/MgMdfParser.dll
===================================================================
(Binary files differ)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/MgPlatformBase.dll
===================================================================
(Binary files differ)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/MgRenderers.dll
===================================================================
(Binary files differ)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/MgStylization.dll
===================================================================
(Binary files differ)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/OSGeo.MapGuide.Desktop.dll
===================================================================
(Binary files differ)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/OSGeo.MapGuide.Viewer.dll
===================================================================
(Binary files differ)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/gd.dll
===================================================================
(Binary files differ)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/xerces-c_3_1mg.dll
===================================================================
(Binary files differ)

Modified: trunk/Tools/Maestro/Maestro.Base/Commands/CopyCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/CopyCommand.cs	2011-09-13 02:45:36 UTC (rev 6132)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/CopyCommand.cs	2011-09-15 07:58:37 UTC (rev 6133)
@@ -23,6 +23,7 @@
 using ICSharpCode.Core;
 using Maestro.Base.Services;
 using Maestro.Base.UI;
+using OSGeo.MapGuide.MaestroAPI;
 
 namespace Maestro.Base.Commands
 {
@@ -34,8 +35,9 @@
             var exp = wb.ActiveSiteExplorer;
             var clip = ServiceRegistry.GetService<ClipboardService>();
             var omgr = ServiceRegistry.GetService<OpenResourceManager>();
+            var connMgr = ServiceRegistry.GetService<ServerConnectionManager>();
 
-            ResetClipboardedItems(clip, omgr);
+            ResetClipboardedItems(clip, omgr, connMgr);
 
             if (exp.SelectedItems.Length > 0)
             {
@@ -53,7 +55,7 @@
 
     internal abstract class ClipboardCommand : AbstractMenuCommand
     {
-        protected static void ResetClipboardedItems(ClipboardService clip, OpenResourceManager omgr)
+        protected static void ResetClipboardedItems(ClipboardService clip, OpenResourceManager omgr, ServerConnectionManager connMgr)
         {
             //Reset state of clipboarded items
             if (clip.HasContent())
@@ -63,30 +65,32 @@
                 var rs = o as RepositoryItem[];
                 if (r != null)
                 {
-                    ResetItem(omgr, r);
+                    var conn = connMgr.GetConnection(r.ConnectionName);
+                    ResetItem(omgr, r, conn);
                 }
                 else if (rs != null)
                 {
-                    ResetItems(omgr, rs);
+                    ResetItems(omgr, rs, connMgr);
                 }
             }
         }
 
-        protected static void ResetItems(OpenResourceManager omgr, IEnumerable<RepositoryItem> rs)
+        protected static void ResetItems(OpenResourceManager omgr, IEnumerable<RepositoryItem> rs, ServerConnectionManager connMgr)
         {
             foreach (var ri in rs)
             {
-                ResetItem(omgr, ri);
+                var conn = connMgr.GetConnection(ri.ConnectionName);
+                ResetItem(omgr, ri, conn);
             }
         }
 
-        protected static void ResetItem(OpenResourceManager omgr, RepositoryItem ri)
+        protected static void ResetItem(OpenResourceManager omgr, RepositoryItem ri, IServerConnection conn)
         {
             ri.Reset();
-            if (omgr.IsOpen(ri.ResourceId))
+            if (omgr.IsOpen(ri.ResourceId, conn))
             {
                 ri.IsOpen = true;
-                var ed = omgr.GetOpenEditor(ri.ResourceId);
+                var ed = omgr.GetOpenEditor(ri.ResourceId, conn);
                 if (ed.IsDirty)
                     ri.IsDirty = true;
             }

Modified: trunk/Tools/Maestro/Maestro.Base/Commands/CutCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/CutCommand.cs	2011-09-13 02:45:36 UTC (rev 6132)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/CutCommand.cs	2011-09-15 07:58:37 UTC (rev 6133)
@@ -34,8 +34,9 @@
             var exp = wb.ActiveSiteExplorer;
             var clip = ServiceRegistry.GetService<ClipboardService>();
             var omgr = ServiceRegistry.GetService<OpenResourceManager>();
+            var connMgr = ServiceRegistry.GetService<ServerConnectionManager>();
 
-            ResetClipboardedItems(clip, omgr);
+            ResetClipboardedItems(clip, omgr, connMgr);
 
             if (exp.SelectedItems.Length > 0)
             {
@@ -50,7 +51,7 @@
             }
         }
 
-        private new static void ResetClipboardedItems(ClipboardService clip, OpenResourceManager omgr)
+        private new static void ResetClipboardedItems(ClipboardService clip, OpenResourceManager omgr, ServerConnectionManager connMgr)
         {
             //Reset state of clipboarded items
             if (clip.HasContent())
@@ -60,11 +61,12 @@
                 var rs = o as RepositoryItem[];
                 if (r != null)
                 {
+                    var conn = connMgr.GetConnection(r.ConnectionName);
                     r.Reset();
-                    if (omgr.IsOpen(r.ResourceId))
+                    if (omgr.IsOpen(r.ResourceId, conn))
                     {
                         r.IsOpen = true;
-                        var ed = omgr.GetOpenEditor(r.ResourceId);
+                        var ed = omgr.GetOpenEditor(r.ResourceId, conn);
                         if (ed.IsDirty)
                             r.IsDirty = true;
                     }
@@ -73,11 +75,12 @@
                 {
                     foreach (var ri in rs)
                     {
+                        var conn = connMgr.GetConnection(r.ConnectionName);
                         ri.Reset();
-                        if (omgr.IsOpen(ri.ResourceId))
+                        if (omgr.IsOpen(ri.ResourceId, conn))
                         {
                             ri.IsOpen = true;
-                            var ed = omgr.GetOpenEditor(ri.ResourceId);
+                            var ed = omgr.GetOpenEditor(ri.ResourceId, conn);
                             if (ed.IsDirty)
                                 ri.IsDirty = true;
                         }

Modified: trunk/Tools/Maestro/Maestro.Base/Commands/PasteCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/PasteCommand.cs	2011-09-13 02:45:36 UTC (rev 6132)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/PasteCommand.cs	2011-09-15 07:58:37 UTC (rev 6133)
@@ -109,7 +109,7 @@
                     {
                         if (!item.IsFolder)
                         {
-                            if (omgr.IsOpen(item.ResourceId))
+                            if (omgr.IsOpen(item.ResourceId, conn))
                             {
                                 sourceItemsNotMoved.Add(item.ResourceId);
                                 continue;
@@ -152,11 +152,11 @@
             if (sourceItemsNotMoved.Count > 0)
                 MessageService.ShowMessage(string.Format(Properties.Resources.ItemsNotMovedDueToBeingOpen, Environment.NewLine + string.Join(Environment.NewLine, sourceItemsNotMoved.ToArray())));
 
-            ResetItems(omgr, itemsToPaste);
-            exp.RefreshModel(folder.ResourceId);
+            ResetItems(omgr, itemsToPaste, connMgr);
+            exp.RefreshModel(conn.DisplayName, folder.ResourceId);
             foreach (var f in folders.Keys)
             {
-                exp.RefreshModel(f);
+                exp.RefreshModel(conn.DisplayName, f);
             }
         }
 

Modified: trunk/Tools/Maestro/Maestro.Base/Commands/SaveResourceAsCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/SaveResourceAsCommand.cs	2011-09-13 02:45:36 UTC (rev 6132)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/SaveResourceAsCommand.cs	2011-09-15 07:58:37 UTC (rev 6133)
@@ -49,7 +49,7 @@
 
                     if (picker.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                     {
-                        if (omgr.IsOpen(picker.ResourceID))
+                        if (omgr.IsOpen(picker.ResourceID, conn))
                         {
                             MessageService.ShowMessage(string.Format(Properties.Resources.CannotSaveToResourceAlreadyOpened, picker.ResourceID));
                             return;
@@ -65,7 +65,7 @@
                             try
                             {
                                 var rid = new ResourceIdentifier(picker.ResourceID);
-                                exp.RefreshModel(rid.ParentFolder);
+                                exp.RefreshModel(conn.DisplayName, rid.ParentFolder);
                             }
                             catch (NullReferenceException)
                             {

Modified: trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/CopyMoveToAnotherServerCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/CopyMoveToAnotherServerCommand.cs	2011-09-13 02:45:36 UTC (rev 6132)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/CopyMoveToAnotherServerCommand.cs	2011-09-15 07:58:37 UTC (rev 6133)
@@ -62,9 +62,9 @@
                         {
                             var parent = exp.SelectedItems[0].Parent;
                             if (parent != null)
-                                exp.RefreshModel(parent.ResourceId);
+                                exp.RefreshModel(source.DisplayName, parent.ResourceId);
                             else
-                                exp.RefreshModel("Library://");
+                                exp.RefreshModel(source.DisplayName, "Library://");
                         }
                     }
                 }

Modified: trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/DuplicateResourceCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/DuplicateResourceCommand.cs	2011-09-13 02:45:36 UTC (rev 6132)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/DuplicateResourceCommand.cs	2011-09-15 07:58:37 UTC (rev 6133)
@@ -78,7 +78,7 @@
                     LoggingService.Info(string.Format(Properties.Resources.ResourceDuplicated, item.ResourceId, resId));
                 }
 
-                exp.RefreshModel(folder.ResourceId);
+                exp.RefreshModel(conn.DisplayName, folder.ResourceId);
             }
         }
     }

Modified: trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/FindReplaceXmlContentCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/FindReplaceXmlContentCommand.cs	2011-09-13 02:45:36 UTC (rev 6132)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/FindReplaceXmlContentCommand.cs	2011-09-15 07:58:37 UTC (rev 6133)
@@ -51,11 +51,11 @@
                         //To maintain resource integrity, we don't modify any open resources. So we
                         //ask if they want to close down first. If they say no, omit this resource from
                         //the find/replace
-                        if (omgr.IsOpen(item.ResourceId))
+                        if (omgr.IsOpen(item.ResourceId, conn))
                         {
                             omgr.CloseEditors(conn, item.ResourceId, false);
                             //Still open. Must've said no
-                            if (omgr.IsOpen(item.ResourceId))
+                            if (omgr.IsOpen(item.ResourceId, conn))
                             {
                                 LoggingService.Info(string.Format(Properties.Resources.SkippingResource, item.ResourceId));
                                 continue;

Modified: trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/OpenResourceCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/OpenResourceCommand.cs	2011-09-13 02:45:36 UTC (rev 6132)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/OpenResourceCommand.cs	2011-09-15 07:58:37 UTC (rev 6133)
@@ -45,9 +45,9 @@
                 {
                     if (!item.IsFolder)
                     {
-                        if (openMgr.IsOpen(item.ResourceId))
+                        if (openMgr.IsOpen(item.ResourceId, _conn))
                         {
-                            openMgr.GetOpenEditor(item.ResourceId).Activate();
+                            openMgr.GetOpenEditor(item.ResourceId, _conn).Activate();
                         }
                         else
                         {

Modified: trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/OpenWithXmlEditorCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/OpenWithXmlEditorCommand.cs	2011-09-13 02:45:36 UTC (rev 6132)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/OpenWithXmlEditorCommand.cs	2011-09-15 07:58:37 UTC (rev 6133)
@@ -45,9 +45,9 @@
                 var item = items[0];
                 if (!item.IsFolder)
                 {
-                    if (openMgr.IsOpen(item.ResourceId))
+                    if (openMgr.IsOpen(item.ResourceId, _conn))
                     {
-                        var ed = openMgr.GetOpenEditor(item.ResourceId);
+                        var ed = openMgr.GetOpenEditor(item.ResourceId, _conn);
                         if (!(ed is XmlEditor))
                         {
                             MessageService.ShowMessage(Properties.Resources.ResourceAlreadyOpened);

Modified: trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/RenameCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/RenameCommand.cs	2011-09-13 02:45:36 UTC (rev 6132)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/RenameCommand.cs	2011-09-15 07:58:37 UTC (rev 6133)
@@ -50,7 +50,7 @@
                     }
                 }
 
-                if (!current.IsFolder && omgr.IsOpen(current.ResourceId))
+                if (!current.IsFolder && omgr.IsOpen(current.ResourceId, conn))
                 {
                     MessageService.ShowMessage(Properties.Resources.CannotRenameAlreadyOpenedResource);
                     return;
@@ -72,7 +72,7 @@
                         newid = parent.ResourceId + dlg.NewName + "." + current.ResourceType;
                     }
 
-                    if (omgr.IsOpen(newid))
+                    if (omgr.IsOpen(newid, conn))
                     {
                         MessageService.ShowMessage(string.Format(Properties.Resources.CannotRenameToResourceAlreadyOpened, newid));
                         return;
@@ -120,7 +120,7 @@
                     //Need to refresh the model because it still is called by the old name
                     var rid = new OSGeo.MapGuide.MaestroAPI.Resource.ResourceIdentifier(oldid);
                     var folder = rid.ParentFolder;
-                    exp.RefreshModel(folder);
+                    exp.RefreshModel(conn.DisplayName, folder);
                 }
             }
         }

Modified: trunk/Tools/Maestro/Maestro.Base/Services/OpenResourceManager.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Services/OpenResourceManager.cs	2011-09-13 02:45:36 UTC (rev 6132)
+++ trunk/Tools/Maestro/Maestro.Base/Services/OpenResourceManager.cs	2011-09-15 07:58:37 UTC (rev 6133)
@@ -125,12 +125,12 @@
             }
         }
 
-        private static string ComputeResourceKey(string resId, IServerConnection conn)
+        public static string ComputeResourceKey(string resId, IServerConnection conn)
         {
             return conn.DisplayName + "|" + resId;
         }
 
-        private static string ComputeResourceKey(IResource res, IServerConnection conn)
+        public static string ComputeResourceKey(IResource res, IServerConnection conn)
         {
             return conn.DisplayName + "|" + res.ResourceID;
         }
@@ -247,14 +247,14 @@
             return ed;
         }
 
-        internal bool IsOpen(string resourceId)
+        internal bool IsOpen(string resourceId, IServerConnection conn)
         {
-            return _openItems.ContainsKey(resourceId);
+            return _openItems.ContainsKey(ComputeResourceKey(resourceId, conn));
         }
 
-        internal IEditorViewContent GetOpenEditor(string resourceId)
+        internal IEditorViewContent GetOpenEditor(string resourceId, IServerConnection conn)
         {
-            return _openItems[resourceId];
+            return _openItems[ComputeResourceKey(resourceId, conn)];
         }
     }
 }
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro.Base/UI/RepositoryTreeModel.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/RepositoryTreeModel.cs	2011-09-13 02:45:36 UTC (rev 6132)
+++ trunk/Tools/Maestro/Maestro.Base/UI/RepositoryTreeModel.cs	2011-09-15 07:58:37 UTC (rev 6133)
@@ -429,10 +429,11 @@
         /// <param name="item"></param>
         private void ApplyCurrentItemState(RepositoryItem item)
         {
-            if (_openResMgr.IsOpen(item.ResourceId))
+            var conn = _connManager.GetConnection(item.ConnectionName);
+            if (_openResMgr.IsOpen(item.ResourceId, conn))
             {
                 item.IsOpen = true;
-                var ed = _openResMgr.GetOpenEditor(item.ResourceId);
+                var ed = _openResMgr.GetOpenEditor(item.ResourceId, conn);
                 if (ed.IsDirty)
                     item.IsDirty = true;
             }

Modified: trunk/Tools/Maestro/Maestro.Base/UI/SiteExplorer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/SiteExplorer.cs	2011-09-13 02:45:36 UTC (rev 6132)
+++ trunk/Tools/Maestro/Maestro.Base/UI/SiteExplorer.cs	2011-09-15 07:58:37 UTC (rev 6133)
@@ -664,13 +664,13 @@
                     {
                         var rid = new ResourceIdentifier(r);
                         var target = folderId + rid.Name + "." + rid.Extension;
-                        if (omgr.IsOpen(r))
+                        if (omgr.IsOpen(r, conn))
                         {
                             notMovedFromSource.Add(r);
                             continue;
                         }
 
-                        if (!omgr.IsOpen(target))
+                        if (!omgr.IsOpen(target, conn))
                             conn.ResourceService.MoveResourceWithReferences(r, target, null, cb);
                         else
                             notMovedToTarget.Add(r);

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalConnection.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalConnection.cs	2011-09-13 02:45:36 UTC (rev 6132)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalConnection.cs	2011-09-15 07:58:37 UTC (rev 6133)
@@ -50,8 +50,11 @@
 
         static bool _init = false;
 
+        private MgServiceFactory _fact;
+
         protected LocalConnection(NameValueCollection initParams) : base()
         {
+            _fact = new MgServiceFactory();
             _sessionId = Guid.NewGuid().ToString();
             _configFile = initParams[PARAM_CONFIG];
 
@@ -152,7 +155,7 @@
         private MgResourceService GetResourceService()
         {
             if (_resSvc == null)
-                _resSvc = MgServiceFactory.CreateResourceService();
+                _resSvc = (MgResourceService)_fact.CreateService(MgServiceType.ResourceService);
 
             return _resSvc;
         }
@@ -160,7 +163,7 @@
         private MgFeatureService GetFeatureService()
         {
             if (_featSvc == null)
-                _featSvc = MgServiceFactory.CreateFeatureService();
+                _featSvc = (MgFeatureService)_fact.CreateService(MgServiceType.FeatureService);
 
             return _featSvc;
         }
@@ -168,7 +171,7 @@
         private MgDrawingService GetDrawingService()
         {
             if (_drawSvc == null)
-                _drawSvc = MgServiceFactory.CreateDrawingService();
+                _drawSvc = (MgDrawingService)_fact.CreateService(MgServiceType.DrawingService);
 
             return _drawSvc;
         }
@@ -176,7 +179,7 @@
         private MgRenderingService GetRenderingService()
         {
             if (_renderSvc == null)
-                _renderSvc = MgServiceFactory.CreateRenderingService();
+                _renderSvc = (MgRenderingService)_fact.CreateService(MgServiceType.RenderingService);
 
             return _renderSvc;
         }
@@ -184,7 +187,7 @@
         private MgTileService GetTileService()
         {
             if (_tileSvc == null)
-                _tileSvc = MgServiceFactory.CreateTileService();
+                _tileSvc = (MgTileService)_fact.CreateService(MgServiceType.TileService);
 
             return _tileSvc;
         }



More information about the mapguide-commits mailing list