[mapguide-commits] r6136 - in trunk/Tools/Maestro: Maestro.Base/Commands Maestro.Base/Services/DragDropHandlers Maestro.Packaging Maestro.Packaging/Properties

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Sep 20 08:29:07 EDT 2011


Author: jng
Date: 2011-09-20 05:29:07 -0700 (Tue, 20 Sep 2011)
New Revision: 6136

Added:
   trunk/Tools/Maestro/Maestro.Packaging/PackageUploadResultDialog.Designer.cs
   trunk/Tools/Maestro/Maestro.Packaging/PackageUploadResultDialog.cs
   trunk/Tools/Maestro/Maestro.Packaging/PackageUploadResultDialog.resx
   trunk/Tools/Maestro/Maestro.Packaging/UploadPackageResult.cs
Modified:
   trunk/Tools/Maestro/Maestro.Base/Commands/LoadPackageCommand.cs
   trunk/Tools/Maestro/Maestro.Base/Services/DragDropHandlers/PackageFileHandler.cs
   trunk/Tools/Maestro/Maestro.Packaging/Maestro.Packaging.csproj
   trunk/Tools/Maestro/Maestro.Packaging/PackageBuilder.cs
   trunk/Tools/Maestro/Maestro.Packaging/PackageProgress.cs
   trunk/Tools/Maestro/Maestro.Packaging/Properties/Resources.Designer.cs
   trunk/Tools/Maestro/Maestro.Packaging/Properties/Resources.resx
Log:
#1623: Extend the non-transactional package loading to allow for retrying the failed operations. This is done through an interactive dialog showing the list of failed operations with an option to allow the user to back out or retry the upload operation

Modified: trunk/Tools/Maestro/Maestro.Base/Commands/LoadPackageCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/LoadPackageCommand.cs	2011-09-19 01:51:37 UTC (rev 6135)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/LoadPackageCommand.cs	2011-09-20 12:29:07 UTC (rev 6136)
@@ -53,9 +53,7 @@
                     }
                     else
                     {
-                        res = PackageProgress.UploadPackageNonTransactional(wb,
-                                                                            conn,
-                                                                            open.FileName);
+                        res = PackageProgress.StartNonTransactionalUploadLoop(wb, conn, open.FileName);
                     }
                     if (res == System.Windows.Forms.DialogResult.OK)
                     {

Modified: trunk/Tools/Maestro/Maestro.Base/Services/DragDropHandlers/PackageFileHandler.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Services/DragDropHandlers/PackageFileHandler.cs	2011-09-19 01:51:37 UTC (rev 6135)
+++ trunk/Tools/Maestro/Maestro.Base/Services/DragDropHandlers/PackageFileHandler.cs	2011-09-20 12:29:07 UTC (rev 6136)
@@ -57,15 +57,11 @@
                 DialogResult res;
                 if (optDiag.Method == PackageUploadMethod.Transactional)
                 {
-                    res = PackageProgress.UploadPackage(wb,
-                                                        conn,
-                                                        file);
+                    res = PackageProgress.UploadPackage(wb, conn, file);
                 }
                 else
                 {
-                    res = PackageProgress.UploadPackageNonTransactional(wb,
-                                                                        conn,
-                                                                        file);
+                    res = PackageProgress.StartNonTransactionalUploadLoop(wb, conn, file);
                 }
                 if (res == System.Windows.Forms.DialogResult.OK)
                 {

Modified: trunk/Tools/Maestro/Maestro.Packaging/Maestro.Packaging.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.Packaging/Maestro.Packaging.csproj	2011-09-19 01:51:37 UTC (rev 6135)
+++ trunk/Tools/Maestro/Maestro.Packaging/Maestro.Packaging.csproj	2011-09-20 12:29:07 UTC (rev 6136)
@@ -59,6 +59,13 @@
     <Compile Include="PackageProgress.designer.cs">
       <DependentUpon>PackageProgress.cs</DependentUpon>
     </Compile>
+    <Compile Include="PackageUploadResultDialog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="PackageUploadResultDialog.Designer.cs">
+      <DependentUpon>PackageUploadResultDialog.cs</DependentUpon>
+    </Compile>
+    <Compile Include="UploadPackageResult.cs" />
     <Compile Include="PackageUploadOptionDialog.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -78,6 +85,9 @@
     <EmbeddedResource Include="PackageProgress.resx">
       <DependentUpon>PackageProgress.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="PackageUploadResultDialog.resx">
+      <DependentUpon>PackageUploadResultDialog.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="PackageUploadOptionDialog.resx">
       <DependentUpon>PackageUploadOptionDialog.cs</DependentUpon>
     </EmbeddedResource>

Modified: trunk/Tools/Maestro/Maestro.Packaging/PackageBuilder.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Packaging/PackageBuilder.cs	2011-09-19 01:51:37 UTC (rev 6135)
+++ trunk/Tools/Maestro/Maestro.Packaging/PackageBuilder.cs	2011-09-20 12:29:07 UTC (rev 6136)
@@ -154,14 +154,13 @@
         /// failed resources. The upload is non-transactional in the sense that it can partially fail. Failed operations are logged.
         /// </summary>
         /// <param name="sourceFile">The source package file</param>
-        /// <param name="skipResourceIds">The list of resource ids in the package to skip</param>
-        /// <param name="failedResourceIds">The list of resources ids that failed to load</param>
-        public void UploadPackageNonTransactional(string sourceFile, ICollection<PackageOperation> skipResourceIds, ICollection<PackageOperation> failedResourceIds)
+        /// <param name="result">An <see cref="T:Maestro.Packaging.UploadPackageResult"/> object containing an optional list of operations to skip. It will be populated with the list of operations that passed and failed as the process executes</param>
+        public void UploadPackageNonTransactional(string sourceFile, UploadPackageResult result)
         {
             Dictionary<PackageOperation, PackageOperation> skipOps = new Dictionary<PackageOperation, PackageOperation>();
-            if (skipResourceIds != null)
+            if (result.SkipOperations.Count > 0)
             {
-                foreach (var op in skipResourceIds)
+                foreach (var op in result.SkipOperations)
                 {
                     skipOps[op] = op;
                 }
@@ -238,13 +237,15 @@
                                         }
                                     }
                                 }
+
+                                result.Successful.Add(op);
                             }
                             catch (Exception)
                             {
                                 //We don't really care about the header. We consider failure if the
                                 //content upload did not succeed
                                 if (!m_connection.ResourceService.ResourceExists(op.ResourceId))
-                                    failedResourceIds.Add(op);
+                                    result.Failed.Add(op);
                             }
                         }
                         break;
@@ -260,6 +261,8 @@
                                     m_connection.ResourceService.SetResourceData(sop.ResourceId, sop.DataName, sop.DataType, s);
                                     progress(ProgressType.SetResourceData, sop.ResourceId, 100, step);
                                 }
+
+                                result.Successful.Add(op);
                             }
                             catch (Exception)
                             {
@@ -276,7 +279,7 @@
                                 }
 
                                 if (!found)
-                                    failedResourceIds.Add(sop);
+                                    result.Failed.Add(sop);
                             }
                         }
                         break;

Modified: trunk/Tools/Maestro/Maestro.Packaging/PackageProgress.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Packaging/PackageProgress.cs	2011-09-19 01:51:37 UTC (rev 6135)
+++ trunk/Tools/Maestro/Maestro.Packaging/PackageProgress.cs	2011-09-20 12:29:07 UTC (rev 6136)
@@ -83,15 +83,60 @@
                 var optDiag = new PackageUploadOptionDialog();
                 optDiag.ShowDialog();
                 if (optDiag.Method == PackageUploadMethod.Transactional)
+                {
                     return UploadPackage(owner, con, dlg.FileName);
+                }
                 else
-                    return UploadPackageNonTransactional(owner, con, dlg.FileName);
+                {
+                    return StartNonTransactionalUploadLoop(owner, con, dlg.FileName);
+                }
             }
             else
                 return DialogResult.Cancel;
         }
 
         /// <summary>
+        /// Initiates a user-controlled upload loop whereby failed operations from a non-transactional
+        /// package upload can be retried as many times until either all failed operations have been 
+        /// accounted for, or the user has decided to stop
+        /// </summary>
+        /// <param name="owner"></param>
+        /// <param name="conn"></param>
+        /// <param name="fileName"></param>
+        /// <returns></returns>
+        public static DialogResult StartNonTransactionalUploadLoop(Form owner, IServerConnection conn, string fileName)
+        {
+            var result = new UploadPackageResult();
+            var res = UploadPackageNonTransactional(owner, conn, fileName, result);
+
+            //We do this until either there are no failures or the user has given up retrying
+            while (result.Failed.Count > 0)
+            {
+                using (var resultDiag = new PackageUploadResultDialog(result))
+                {
+                    if (resultDiag.ShowDialog() == DialogResult.Retry)
+                    {
+                        var success = result.Successful;
+                        var skipped = result.SkipOperations;
+
+                        //Create a new result object and skip any previous ones that were
+                        //either successful or skipped themselves
+                        result = new UploadPackageResult(success);
+                        foreach (var skip in skipped)
+                            result.SkipOperations.Add(skip);
+
+                        res = UploadPackageNonTransactional(owner, conn, fileName, result);
+                    }
+                    else //Not retrying
+                    {
+                        break;
+                    }
+                }
+            }
+            return res;
+        }
+
+        /// <summary>
         /// Lists the contents of a package
         /// </summary>
         /// <param name="owner">The owner form</param>
@@ -135,12 +180,13 @@
         /// <param name="owner">The owner form</param>
         /// <param name="connection">The connection used to upload the package</param>
         /// <param name="packageFile">The package file to upload</param>
+        /// <param name="result">An <see cref="T:Maestro.Packaging.UploadPackageResult"/> object containing an optional list of operations to skip. It will be populated with the list of operations that passed and failed as the process executes</param>
         /// <returns>A DialogResult object that indicates the result of the operation</returns>
-        public static DialogResult UploadPackageNonTransactional(Form owner, IServerConnection connection, string packageFile)
+        public static DialogResult UploadPackageNonTransactional(Form owner, IServerConnection connection, string packageFile, UploadPackageResult result)
         {
             PackageProgress pkgp = new PackageProgress();
             pkgp.Text = Properties.Resources.TitleUploading;
-            pkgp.m_invokeArgs = new object[] { packageFile, new List<PackageOperation>(), new List<PackageOperation>() };
+            pkgp.m_invokeArgs = new object[] { packageFile, result };
             pkgp.m_invokeObj = new PackageBuilder(connection);
             pkgp.m_invokeMethod = pkgp.m_invokeObj.GetType().GetMethod("UploadPackageNonTransactional");
 

Added: trunk/Tools/Maestro/Maestro.Packaging/PackageUploadResultDialog.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Packaging/PackageUploadResultDialog.Designer.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Packaging/PackageUploadResultDialog.Designer.cs	2011-09-20 12:29:07 UTC (rev 6136)
@@ -0,0 +1,122 @@
+namespace Maestro.Packaging
+{
+    partial class PackageUploadResultDialog
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PackageUploadResultDialog));
+            this.lblSucceeded = new System.Windows.Forms.Label();
+            this.lblFailed = new System.Windows.Forms.Label();
+            this.lblSkipped = new System.Windows.Forms.Label();
+            this.btnRetry = new System.Windows.Forms.Button();
+            this.btnClose = new System.Windows.Forms.Button();
+            this.grdFailed = new System.Windows.Forms.DataGridView();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            ((System.ComponentModel.ISupportInitialize)(this.grdFailed)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // lblSucceeded
+            // 
+            resources.ApplyResources(this.lblSucceeded, "lblSucceeded");
+            this.lblSucceeded.Name = "lblSucceeded";
+            // 
+            // lblFailed
+            // 
+            resources.ApplyResources(this.lblFailed, "lblFailed");
+            this.lblFailed.Name = "lblFailed";
+            // 
+            // lblSkipped
+            // 
+            resources.ApplyResources(this.lblSkipped, "lblSkipped");
+            this.lblSkipped.Name = "lblSkipped";
+            // 
+            // btnRetry
+            // 
+            resources.ApplyResources(this.btnRetry, "btnRetry");
+            this.btnRetry.Name = "btnRetry";
+            this.btnRetry.UseVisualStyleBackColor = true;
+            this.btnRetry.Click += new System.EventHandler(this.btnRetry_Click);
+            // 
+            // btnClose
+            // 
+            resources.ApplyResources(this.btnClose, "btnClose");
+            this.btnClose.Name = "btnClose";
+            this.btnClose.UseVisualStyleBackColor = true;
+            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
+            // 
+            // grdFailed
+            // 
+            this.grdFailed.AllowUserToAddRows = false;
+            this.grdFailed.AllowUserToDeleteRows = false;
+            resources.ApplyResources(this.grdFailed, "grdFailed");
+            this.grdFailed.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.grdFailed.Name = "grdFailed";
+            this.grdFailed.ReadOnly = true;
+            // 
+            // label4
+            // 
+            resources.ApplyResources(this.label4, "label4");
+            this.label4.Name = "label4";
+            // 
+            // label1
+            // 
+            resources.ApplyResources(this.label1, "label1");
+            this.label1.Name = "label1";
+            // 
+            // PackageUploadResultDialog
+            // 
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+            resources.ApplyResources(this, "$this");
+            this.ControlBox = false;
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.grdFailed);
+            this.Controls.Add(this.btnClose);
+            this.Controls.Add(this.btnRetry);
+            this.Controls.Add(this.lblSkipped);
+            this.Controls.Add(this.lblFailed);
+            this.Controls.Add(this.lblSucceeded);
+            this.Name = "PackageUploadResultDialog";
+            ((System.ComponentModel.ISupportInitialize)(this.grdFailed)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Label lblSucceeded;
+        private System.Windows.Forms.Label lblFailed;
+        private System.Windows.Forms.Label lblSkipped;
+        private System.Windows.Forms.Button btnRetry;
+        private System.Windows.Forms.Button btnClose;
+        private System.Windows.Forms.DataGridView grdFailed;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label label1;
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/Maestro.Packaging/PackageUploadResultDialog.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Packaging/PackageUploadResultDialog.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Packaging/PackageUploadResultDialog.cs	2011-09-20 12:29:07 UTC (rev 6136)
@@ -0,0 +1,59 @@
+#region Disclaimer / License
+// Copyright (C) 2011, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Maestro.Packaging
+{
+    /// <summary>
+    /// A dialog to present the results of a non-transactional package upload
+    /// </summary>
+    public partial class PackageUploadResultDialog : Form
+    {
+        private PackageUploadResultDialog()
+        {
+            InitializeComponent();
+        }
+
+        public PackageUploadResultDialog(UploadPackageResult result)
+            : this()
+        {
+            lblFailed.Text = string.Format(Properties.Resources.PackageOperationsFailed, result.Failed.Count);
+            lblSkipped.Text = string.Format(Properties.Resources.PackageOperationsSkipped, result.SkipOperations.Count);
+            lblSucceeded.Text = string.Format(Properties.Resources.PackageOperationsSucceeded, result.Successful.Count);
+            grdFailed.DataSource = result.Failed;
+        }
+
+        private void btnClose_Click(object sender, EventArgs e)
+        {
+            this.DialogResult = DialogResult.OK;
+        }
+
+        private void btnRetry_Click(object sender, EventArgs e)
+        {
+            this.DialogResult = DialogResult.Retry;
+        }
+    }
+}

Added: trunk/Tools/Maestro/Maestro.Packaging/PackageUploadResultDialog.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Packaging/PackageUploadResultDialog.resx	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Packaging/PackageUploadResultDialog.resx	2011-09-20 12:29:07 UTC (rev 6136)
@@ -0,0 +1,343 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="lblSucceeded.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="lblSucceeded.Location" type="System.Drawing.Point, System.Drawing">
+    <value>9, 14</value>
+  </data>
+  <data name="lblSucceeded.Size" type="System.Drawing.Size, System.Drawing">
+    <value>0, 13</value>
+  </data>
+  <data name="lblSucceeded.TabIndex" type="System.Int32, mscorlib">
+    <value>0</value>
+  </data>
+  <data name="&gt;&gt;lblSucceeded.Name" xml:space="preserve">
+    <value>lblSucceeded</value>
+  </data>
+  <data name="&gt;&gt;lblSucceeded.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;lblSucceeded.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;lblSucceeded.ZOrder" xml:space="preserve">
+    <value>7</value>
+  </data>
+  <data name="lblFailed.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="lblFailed.Location" type="System.Drawing.Point, System.Drawing">
+    <value>9, 38</value>
+  </data>
+  <data name="lblFailed.Size" type="System.Drawing.Size, System.Drawing">
+    <value>0, 13</value>
+  </data>
+  <data name="lblFailed.TabIndex" type="System.Int32, mscorlib">
+    <value>1</value>
+  </data>
+  <data name="&gt;&gt;lblFailed.Name" xml:space="preserve">
+    <value>lblFailed</value>
+  </data>
+  <data name="&gt;&gt;lblFailed.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;lblFailed.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;lblFailed.ZOrder" xml:space="preserve">
+    <value>6</value>
+  </data>
+  <data name="lblSkipped.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="lblSkipped.Location" type="System.Drawing.Point, System.Drawing">
+    <value>9, 62</value>
+  </data>
+  <data name="lblSkipped.Size" type="System.Drawing.Size, System.Drawing">
+    <value>0, 13</value>
+  </data>
+  <data name="lblSkipped.TabIndex" type="System.Int32, mscorlib">
+    <value>2</value>
+  </data>
+  <data name="&gt;&gt;lblSkipped.Name" xml:space="preserve">
+    <value>lblSkipped</value>
+  </data>
+  <data name="&gt;&gt;lblSkipped.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;lblSkipped.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;lblSkipped.ZOrder" xml:space="preserve">
+    <value>5</value>
+  </data>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="btnRetry.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Bottom, Right</value>
+  </data>
+  <data name="btnRetry.Location" type="System.Drawing.Point, System.Drawing">
+    <value>293, 278</value>
+  </data>
+  <data name="btnRetry.Size" type="System.Drawing.Size, System.Drawing">
+    <value>75, 23</value>
+  </data>
+  <data name="btnRetry.TabIndex" type="System.Int32, mscorlib">
+    <value>3</value>
+  </data>
+  <data name="btnRetry.Text" xml:space="preserve">
+    <value>Retry</value>
+  </data>
+  <data name="&gt;&gt;btnRetry.Name" xml:space="preserve">
+    <value>btnRetry</value>
+  </data>
+  <data name="&gt;&gt;btnRetry.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;btnRetry.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;btnRetry.ZOrder" xml:space="preserve">
+    <value>4</value>
+  </data>
+  <data name="btnClose.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Bottom, Right</value>
+  </data>
+  <data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
+    <value>374, 278</value>
+  </data>
+  <data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
+    <value>75, 23</value>
+  </data>
+  <data name="btnClose.TabIndex" type="System.Int32, mscorlib">
+    <value>4</value>
+  </data>
+  <data name="btnClose.Text" xml:space="preserve">
+    <value>Close</value>
+  </data>
+  <data name="&gt;&gt;btnClose.Name" xml:space="preserve">
+    <value>btnClose</value>
+  </data>
+  <data name="&gt;&gt;btnClose.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;btnClose.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
+    <value>3</value>
+  </data>
+  <data name="grdFailed.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Top, Bottom, Left, Right</value>
+  </data>
+  <data name="grdFailed.Location" type="System.Drawing.Point, System.Drawing">
+    <value>12, 160</value>
+  </data>
+  <data name="grdFailed.Size" type="System.Drawing.Size, System.Drawing">
+    <value>437, 103</value>
+  </data>
+  <data name="grdFailed.TabIndex" type="System.Int32, mscorlib">
+    <value>5</value>
+  </data>
+  <data name="&gt;&gt;grdFailed.Name" xml:space="preserve">
+    <value>grdFailed</value>
+  </data>
+  <data name="&gt;&gt;grdFailed.Type" xml:space="preserve">
+    <value>System.Windows.Forms.DataGridView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;grdFailed.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;grdFailed.ZOrder" xml:space="preserve">
+    <value>2</value>
+  </data>
+  <data name="label4.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="label4.Location" type="System.Drawing.Point, System.Drawing">
+    <value>9, 144</value>
+  </data>
+  <data name="label4.Size" type="System.Drawing.Size, System.Drawing">
+    <value>89, 13</value>
+  </data>
+  <data name="label4.TabIndex" type="System.Int32, mscorlib">
+    <value>6</value>
+  </data>
+  <data name="label4.Text" xml:space="preserve">
+    <value>Failed Operations</value>
+  </data>
+  <data name="&gt;&gt;label4.Name" xml:space="preserve">
+    <value>label4</value>
+  </data>
+  <data name="&gt;&gt;label4.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;label4.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="label1.Location" type="System.Drawing.Point, System.Drawing">
+    <value>12, 85</value>
+  </data>
+  <data name="label1.Size" type="System.Drawing.Size, System.Drawing">
+    <value>437, 41</value>
+  </data>
+  <data name="label1.TabIndex" type="System.Int32, mscorlib">
+    <value>7</value>
+  </data>
+  <data name="label1.Text" xml:space="preserve">
+    <value>Click Retry to re-run this upload and retry the failed operations. Operations that either
+ succeeded or skipped in this run will be skipped in the next run</value>
+  </data>
+  <data name="&gt;&gt;label1.Name" xml:space="preserve">
+    <value>label1</value>
+  </data>
+  <data name="&gt;&gt;label1.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;label1.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
+    <value>0</value>
+  </data>
+  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
+    <value>461, 313</value>
+  </data>
+  <data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
+    <value>CenterParent</value>
+  </data>
+  <data name="$this.Text" xml:space="preserve">
+    <value>Package Upload Results</value>
+  </data>
+  <data name="&gt;&gt;$this.Name" xml:space="preserve">
+    <value>PackageUploadResultDialog</value>
+  </data>
+  <data name="&gt;&gt;$this.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+</root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro.Packaging/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Packaging/Properties/Resources.Designer.cs	2011-09-19 01:51:37 UTC (rev 6135)
+++ trunk/Tools/Maestro/Maestro.Packaging/Properties/Resources.Designer.cs	2011-09-20 12:29:07 UTC (rev 6136)
@@ -97,6 +97,33 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to {0} Package Operations Failed.
+        /// </summary>
+        internal static string PackageOperationsFailed {
+            get {
+                return ResourceManager.GetString("PackageOperationsFailed", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to {0} Package Operations Skipped.
+        /// </summary>
+        internal static string PackageOperationsSkipped {
+            get {
+                return ResourceManager.GetString("PackageOperationsSkipped", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to {0} Package Operations Succeeded.
+        /// </summary>
+        internal static string PackageOperationsSucceeded {
+            get {
+                return ResourceManager.GetString("PackageOperationsSucceeded", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to Compressed.
         /// </summary>
         internal static string ProgressCompressed {

Modified: trunk/Tools/Maestro/Maestro.Packaging/Properties/Resources.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Packaging/Properties/Resources.resx	2011-09-19 01:51:37 UTC (rev 6135)
+++ trunk/Tools/Maestro/Maestro.Packaging/Properties/Resources.resx	2011-09-20 12:29:07 UTC (rev 6136)
@@ -133,6 +133,15 @@
     <value>Failed to locate file MgResourcePackageManifest.xml in zip file. Most likely the file is not a MapGuide package.</value>
     <comment>An error message that is displayed if the package file is invalid</comment>
   </data>
+  <data name="PackageOperationsFailed" xml:space="preserve">
+    <value>{0} Package Operations Failed</value>
+  </data>
+  <data name="PackageOperationsSkipped" xml:space="preserve">
+    <value>{0} Package Operations Skipped</value>
+  </data>
+  <data name="PackageOperationsSucceeded" xml:space="preserve">
+    <value>{0} Package Operations Succeeded</value>
+  </data>
   <data name="ProgressCompressed" xml:space="preserve">
     <value>Compressed</value>
     <comment>A progress message that is displayed when the files are compressed</comment>

Added: trunk/Tools/Maestro/Maestro.Packaging/UploadPackageResult.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Packaging/UploadPackageResult.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Packaging/UploadPackageResult.cs	2011-09-20 12:29:07 UTC (rev 6136)
@@ -0,0 +1,43 @@
+#region Disclaimer / License
+// Copyright (C) 2011, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Maestro.Packaging
+{
+    public class UploadPackageResult
+    {
+        public ICollection<PackageOperation> Successful { get; private set; }
+
+        public ICollection<PackageOperation> Failed { get; private set; }
+
+        public ICollection<PackageOperation> SkipOperations { get; private set; }
+
+        public UploadPackageResult() : this(new PackageOperation[0]) { }
+
+        public UploadPackageResult(IEnumerable<PackageOperation> skip)
+        {
+            this.Successful = new List<PackageOperation>();
+            this.Failed = new List<PackageOperation>();
+            this.SkipOperations = new List<PackageOperation>(skip);
+        }
+    }
+}



More information about the mapguide-commits mailing list