git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube...
authorVásáry Dániel <daniel.vasary@userrendszerhaz.hu>
Wed, 25 Oct 2017 14:45:22 +0000 (14:45 +0000)
committerVásáry Dániel <daniel.vasary@userrendszerhaz.hu>
Wed, 25 Oct 2017 14:45:22 +0000 (14:45 +0000)
19 files changed:
client/Maestro/Commons/ObjectExtensions.cs
client/Maestro/Configuration/ConfigurationInfo.cs
client/Maestro/Maestro.csproj
client/Maestro/MaestroForm.Designer.cs
client/Maestro/MaestroForm.Metadata.cs
client/Maestro/MaestroForm.Source.cs
client/Maestro/MaestroForm.Target.cs
client/Maestro/MaestroForm.cs
client/Maestro/MaestroForm.resx
client/Maestro/MeastroFormNotifyIcon.cs
client/Maestro/Program.cs
client/Maestro/Sources/FileSystemSource.cs
client/Maestro/Targets/FTPTargetProcessor.cs
client/Maestro/Targets/UNCTargetProcessor.cs
client/MediaCube.vssscc [new file with mode: 0644]
client/OctopusClient/OctopusIDSelector.cs
server/-configuration/mediacube-dev-user.properties [new file with mode: 0644]
server/user.jobengine.osgi.commons/test/user/common/octopus/test/OctopusDataMinerTest.java
server/user.jobengine.osgi.db/sql/5-CreateFTIndex.db2

index 7d328df99ae56d436008b653ffadbaf944eadcbf..be3cb5a2cdb1517d989950b8518632b0f066a290 100644 (file)
@@ -4,14 +4,15 @@ using System.Windows.Forms;
 namespace Maestro.Commons {\r
     public static class ObjectExtensions {\r
 \r
-        public static void SafeCall(this Control ctrl, Action x) {\r
+        public static void SafeCall(this Control ctrl, Action x, bool force = false) {\r
             if (x != null) {\r
-                if (ctrl.InvokeRequired) {\r
+                if (ctrl.InvokeRequired || force) {\r
                     ctrl.BeginInvoke(x);\r
                 } else {\r
                     x();\r
                 }\r
             }\r
         }\r
+\r
     }\r
 }\r
index c5f9afbe7c1b764858c488dcae8badf48f9d3fa7..420f6e4b6fd4e4aca3d3b80b3520c191495de422 100644 (file)
@@ -1,5 +1,6 @@
 using Newtonsoft.Json;\r
 using System;\r
+using System.Linq;\r
 using System.Collections.Generic;\r
 using System.IO;\r
 \r
@@ -30,6 +31,15 @@ namespace Maestro.Configuration {
         public bool EnableCustomMetadataId { get; set; }\r
         public MetadataProvider[] Metadatas { get; set; }\r
         public Target[] Targets { get; set; }\r
+\r
+        public T GetMetadataProvider<T>() {\r
+            MetadataProvider provider = Metadatas?.Where(m => { return m is T; }).FirstOrDefault();\r
+            T result = default(T);\r
+            try {\r
+                result = (T)Convert.ChangeType(provider, typeof(T));\r
+            } finally { }\r
+            return result;\r
+        }\r
     }\r
 \r
     public class Player {\r
@@ -49,6 +59,7 @@ namespace Maestro.Configuration {
         public bool CreateSubFolder { get; set; }\r
         public string Tag { get; set; }\r
         public bool SaveMetadata {get; set;}\r
+        public bool DisableFileVersioning { get; set; }\r
         public bool SendEmailOnError { get; set; }\r
         public string ErrorEmailRecipient { get; set; }\r
         public string ErrorEmailPattern { get; set; }\r
index ec0469feebcf7023d0ea6c065e76beb4de8923f3..716098e02c986095cdd5e3bd53da81616da02d54 100644 (file)
     <Reference Include="LinkDotNet.MessageHandling.Contracts, Version=0.2.0.0, Culture=neutral, processorArchitecture=MSIL">\r
       <HintPath>..\packages\LinkDotNet.MessageBus.Contracts.0.1.1\lib\LinkDotNet.MessageHandling.Contracts.dll</HintPath>\r
     </Reference>\r
-    <Reference Include="Microsoft.VisualStudio.OLE.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
-      <HintPath>..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll</HintPath>\r
-      <Private>True</Private>\r
-    </Reference>\r
-    <Reference Include="Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
-      <HintPath>..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll</HintPath>\r
-      <Private>True</Private>\r
-    </Reference>\r
-    <Reference Include="Microsoft.VisualStudio.Shell.Interop.10.0, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">\r
-      <EmbedInteropTypes>True</EmbedInteropTypes>\r
-      <HintPath>..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll</HintPath>\r
-      <Private>True</Private>\r
-    </Reference>\r
-    <Reference Include="Microsoft.VisualStudio.Shell.Interop.11.0, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">\r
-      <EmbedInteropTypes>True</EmbedInteropTypes>\r
-      <HintPath>..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll</HintPath>\r
-      <Private>True</Private>\r
-    </Reference>\r
-    <Reference Include="Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
-      <HintPath>..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll</HintPath>\r
-      <Private>True</Private>\r
-    </Reference>\r
-    <Reference Include="Microsoft.VisualStudio.TextManager.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
-      <HintPath>..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll</HintPath>\r
-      <Private>True</Private>\r
-    </Reference>\r
-    <Reference Include="Microsoft.VisualStudio.TextManager.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
-      <HintPath>..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll</HintPath>\r
-      <Private>True</Private>\r
-    </Reference>\r
     <Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">\r
       <HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net20\Newtonsoft.Json.dll</HintPath>\r
     </Reference>\r
       <Name>MediaCubeClient</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="..\OctopusClient\OctopusClient.csproj">\r
-      <Project>{8CC7C930-9DBF-487B-AED5-776937A649D5}</Project>\r
+      <Project>{8cc7c930-9dbf-487b-aed5-776937a649d5}</Project>\r
       <Name>OctopusClient</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="..\PasswordEncrypter\PasswordEncrypter.csproj">\r
index 1375fcc67c57e6ccddba3e25f1c1da604e23f4d6..4c575d77794534d7d408b777867945dd2b857918 100644 (file)
@@ -30,21 +30,20 @@ namespace Maestro {
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();\r
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();\r
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();\r
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();\r
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();\r
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();\r
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();\r
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();\r
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();\r
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();\r
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();\r
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();\r
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();\r
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();\r
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();\r
             this.groupSource = new System.Windows.Forms.GroupBox();\r
             this.dataGridSource = new System.Windows.Forms.DataGridView();\r
             this.bindingSource = new System.Windows.Forms.BindingSource(this.components);\r
             this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();\r
-            this.txtSelectedSource = new System.Windows.Forms.TextBox();\r
+            this.textSelectedSource = new System.Windows.Forms.TextBox();\r
             this.label1 = new System.Windows.Forms.Label();\r
             this.buttonMetadata = new System.Windows.Forms.Button();\r
             this.panel2 = new System.Windows.Forms.Panel();\r
@@ -64,7 +63,7 @@ namespace Maestro {
             this.trafficIDSelector = new TrafficClient.TrafficIDSelector();\r
             this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();\r
             this.labelSelectedMetadata = new System.Windows.Forms.Label();\r
-            this.txtSelectedMetadata = new System.Windows.Forms.TextBox();\r
+            this.textSelectedMetadata = new System.Windows.Forms.TextBox();\r
             this.menuButtonActions = new Maestro.MenuButton();\r
             this.groupTarget = new System.Windows.Forms.GroupBox();\r
             this.panelActions = new System.Windows.Forms.TableLayoutPanel();\r
@@ -78,7 +77,6 @@ namespace Maestro {
             this.columnLabel = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
             this.columnID = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
             this.columnStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
-            this.columnProgress = new Maestro.Commons.DataGridViewProgressColumn();\r
             this.columnStarted = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
             this.columnFinished = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
             this.columnInput = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
@@ -91,6 +89,7 @@ namespace Maestro {
             this.Level = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
             this.messageDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
             this.systemMessageBindingSource = new System.Windows.Forms.BindingSource(this.components);\r
+            this.columnProgress = new Maestro.Commons.DataGridViewProgressColumn();\r
             this.metadataInfoBindingSource = new System.Windows.Forms.BindingSource(this.components);\r
             this.groupSource.SuspendLayout();\r
             ((System.ComponentModel.ISupportInitialize)(this.dataGridSource)).BeginInit();\r
@@ -199,7 +198,7 @@ namespace Maestro {
             this.tableLayoutPanel2.ColumnCount = 2;\r
             this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));\r
             this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\r
-            this.tableLayoutPanel2.Controls.Add(this.txtSelectedSource, 0, 1);\r
+            this.tableLayoutPanel2.Controls.Add(this.textSelectedSource, 0, 1);\r
             this.tableLayoutPanel2.Controls.Add(this.label1, 0, 0);\r
             this.tableLayoutPanel2.Controls.Add(this.buttonMetadata, 1, 1);\r
             this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Bottom;\r
@@ -212,17 +211,16 @@ namespace Maestro {
             this.tableLayoutPanel2.Size = new System.Drawing.Size(394, 62);\r
             this.tableLayoutPanel2.TabIndex = 12;\r
             // \r
-            // txtSelectedSource\r
+            // textSelectedSource\r
             // \r
-            this.txtSelectedSource.BackColor = System.Drawing.SystemColors.ActiveCaption;\r
-            this.txtSelectedSource.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\r
-            this.txtSelectedSource.Dock = System.Windows.Forms.DockStyle.Fill;\r
-            this.txtSelectedSource.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
-            this.txtSelectedSource.Location = new System.Drawing.Point(3, 28);\r
-            this.txtSelectedSource.Name = "txtSelectedSource";\r
-            this.txtSelectedSource.Size = new System.Drawing.Size(292, 26);\r
-            this.txtSelectedSource.TabIndex = 10;\r
-            this.txtSelectedSource.TextChanged += new System.EventHandler(this.OnInfoTextChanged);\r
+            this.textSelectedSource.BackColor = System.Drawing.SystemColors.ActiveCaption;\r
+            this.textSelectedSource.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\r
+            this.textSelectedSource.Dock = System.Windows.Forms.DockStyle.Fill;\r
+            this.textSelectedSource.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+            this.textSelectedSource.Location = new System.Drawing.Point(3, 28);\r
+            this.textSelectedSource.Name = "textSelectedSource";\r
+            this.textSelectedSource.Size = new System.Drawing.Size(292, 26);\r
+            this.textSelectedSource.TabIndex = 10;\r
             // \r
             // label1\r
             // \r
@@ -436,7 +434,7 @@ namespace Maestro {
             this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));\r
             this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\r
             this.tableLayoutPanel1.Controls.Add(this.labelSelectedMetadata, 0, 0);\r
-            this.tableLayoutPanel1.Controls.Add(this.txtSelectedMetadata, 0, 1);\r
+            this.tableLayoutPanel1.Controls.Add(this.textSelectedMetadata, 0, 1);\r
             this.tableLayoutPanel1.Controls.Add(this.menuButtonActions, 1, 1);\r
             this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;\r
             this.tableLayoutPanel1.Location = new System.Drawing.Point(10, 399);\r
@@ -461,17 +459,17 @@ namespace Maestro {
             this.labelSelectedMetadata.TabIndex = 13;\r
             this.labelSelectedMetadata.Text = "Selected metadata";\r
             // \r
-            // txtSelectedMetadata\r
+            // textSelectedMetadata\r
             // \r
-            this.txtSelectedMetadata.BackColor = System.Drawing.SystemColors.ActiveCaption;\r
-            this.txtSelectedMetadata.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\r
-            this.txtSelectedMetadata.Dock = System.Windows.Forms.DockStyle.Fill;\r
-            this.txtSelectedMetadata.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
-            this.txtSelectedMetadata.Location = new System.Drawing.Point(3, 28);\r
-            this.txtSelectedMetadata.Name = "txtSelectedMetadata";\r
-            this.txtSelectedMetadata.Size = new System.Drawing.Size(162, 26);\r
-            this.txtSelectedMetadata.TabIndex = 12;\r
-            this.txtSelectedMetadata.TextChanged += new System.EventHandler(this.OnInfoTextChanged);\r
+            this.textSelectedMetadata.BackColor = System.Drawing.SystemColors.ActiveCaption;\r
+            this.textSelectedMetadata.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\r
+            this.textSelectedMetadata.Dock = System.Windows.Forms.DockStyle.Fill;\r
+            this.textSelectedMetadata.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+            this.textSelectedMetadata.Location = new System.Drawing.Point(3, 28);\r
+            this.textSelectedMetadata.Name = "textSelectedMetadata";\r
+            this.textSelectedMetadata.Size = new System.Drawing.Size(162, 26);\r
+            this.textSelectedMetadata.TabIndex = 12;\r
+            this.textSelectedMetadata.TextChanged += new System.EventHandler(this.OnMetadataIDChanged);\r
             // \r
             // menuButtonActions\r
             // \r
@@ -623,36 +621,35 @@ namespace Maestro {
             this.columnLabel,\r
             this.columnID,\r
             this.columnStatus,\r
-            this.columnProgress,\r
             this.columnStarted,\r
             this.columnFinished,\r
             this.columnInput,\r
             this.columnOutput,\r
             this.columnKillDate});\r
             this.dataGridJobs.DataSource = this.bindingSourceJobs;\r
-            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
-            dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window;\r
-            dataGridViewCellStyle8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
-            dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText;\r
-            dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.Gainsboro;\r
-            dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.Black;\r
-            dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;\r
-            this.dataGridJobs.DefaultCellStyle = dataGridViewCellStyle8;\r
+            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
+            dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window;\r
+            dataGridViewCellStyle7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+            dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText;\r
+            dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.Gainsboro;\r
+            dataGridViewCellStyle7.SelectionForeColor = System.Drawing.Color.Black;\r
+            dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False;\r
+            this.dataGridJobs.DefaultCellStyle = dataGridViewCellStyle7;\r
             this.dataGridJobs.Dock = System.Windows.Forms.DockStyle.Fill;\r
             this.dataGridJobs.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;\r
             this.dataGridJobs.Location = new System.Drawing.Point(3, 3);\r
             this.dataGridJobs.Name = "dataGridJobs";\r
-            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
-            dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control;\r
-            dataGridViewCellStyle9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
-            dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText;\r
-            dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight;\r
-            dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText;\r
-            dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;\r
-            this.dataGridJobs.RowHeadersDefaultCellStyle = dataGridViewCellStyle9;\r
+            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
+            dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control;\r
+            dataGridViewCellStyle8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+            dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText;\r
+            dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;\r
+            dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;\r
+            dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;\r
+            this.dataGridJobs.RowHeadersDefaultCellStyle = dataGridViewCellStyle8;\r
             this.dataGridJobs.RowHeadersVisible = false;\r
-            dataGridViewCellStyle10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
-            this.dataGridJobs.RowsDefaultCellStyle = dataGridViewCellStyle10;\r
+            dataGridViewCellStyle9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+            this.dataGridJobs.RowsDefaultCellStyle = dataGridViewCellStyle9;\r
             this.dataGridJobs.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
             this.dataGridJobs.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;\r
             this.dataGridJobs.Size = new System.Drawing.Size(988, 92);\r
@@ -691,20 +688,6 @@ namespace Maestro {
             this.columnStatus.Name = "columnStatus";\r
             this.columnStatus.Width = 66;\r
             // \r
-            // columnProgress\r
-            // \r
-            this.columnProgress.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;\r
-            this.columnProgress.DataPropertyName = "Progress";\r
-            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;\r
-            dataGridViewCellStyle7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
-            dataGridViewCellStyle7.NullValue = null;\r
-            this.columnProgress.DefaultCellStyle = dataGridViewCellStyle7;\r
-            this.columnProgress.HeaderText = "Progress";\r
-            this.columnProgress.Name = "columnProgress";\r
-            this.columnProgress.Resizable = System.Windows.Forms.DataGridViewTriState.True;\r
-            this.columnProgress.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;\r
-            this.columnProgress.Width = 200;\r
-            // \r
             // columnStarted\r
             // \r
             this.columnStarted.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;\r
@@ -766,43 +749,43 @@ namespace Maestro {
             this.dataGridMessages.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.DisplayedCells;\r
             this.dataGridMessages.BackgroundColor = System.Drawing.Color.White;\r
             this.dataGridMessages.BorderStyle = System.Windows.Forms.BorderStyle.None;\r
-            dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
-            dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window;\r
-            dataGridViewCellStyle11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);\r
-            dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;\r
-            dataGridViewCellStyle11.SelectionBackColor = System.Drawing.Color.Transparent;\r
-            dataGridViewCellStyle11.SelectionForeColor = System.Drawing.Color.Transparent;\r
-            dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;\r
-            this.dataGridMessages.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;\r
+            dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
+            dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window;\r
+            dataGridViewCellStyle10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);\r
+            dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText;\r
+            dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.Transparent;\r
+            dataGridViewCellStyle10.SelectionForeColor = System.Drawing.Color.Transparent;\r
+            dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True;\r
+            this.dataGridMessages.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;\r
             this.dataGridMessages.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;\r
             this.dataGridMessages.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {\r
             this.timeDataGridViewTextBoxColumn,\r
             this.Level,\r
             this.messageDataGridViewTextBoxColumn});\r
             this.dataGridMessages.DataSource = this.systemMessageBindingSource;\r
-            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
-            dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window;\r
-            dataGridViewCellStyle12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
-            dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText;\r
-            dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.Transparent;\r
-            dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.ControlText;\r
-            dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False;\r
-            this.dataGridMessages.DefaultCellStyle = dataGridViewCellStyle12;\r
+            dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
+            dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window;\r
+            dataGridViewCellStyle11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+            dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText;\r
+            dataGridViewCellStyle11.SelectionBackColor = System.Drawing.Color.Transparent;\r
+            dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.ControlText;\r
+            dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False;\r
+            this.dataGridMessages.DefaultCellStyle = dataGridViewCellStyle11;\r
             this.dataGridMessages.Dock = System.Windows.Forms.DockStyle.Fill;\r
             this.dataGridMessages.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;\r
             this.dataGridMessages.Location = new System.Drawing.Point(3, 3);\r
             this.dataGridMessages.Name = "dataGridMessages";\r
-            dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
-            dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Control;\r
-            dataGridViewCellStyle13.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);\r
-            dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.WindowText;\r
-            dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Control;\r
-            dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.WindowText;\r
-            dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True;\r
-            this.dataGridMessages.RowHeadersDefaultCellStyle = dataGridViewCellStyle13;\r
+            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
+            dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control;\r
+            dataGridViewCellStyle12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);\r
+            dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText;\r
+            dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Control;\r
+            dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.WindowText;\r
+            dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;\r
+            this.dataGridMessages.RowHeadersDefaultCellStyle = dataGridViewCellStyle12;\r
             this.dataGridMessages.RowHeadersVisible = false;\r
-            dataGridViewCellStyle14.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);\r
-            this.dataGridMessages.RowsDefaultCellStyle = dataGridViewCellStyle14;\r
+            dataGridViewCellStyle13.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);\r
+            this.dataGridMessages.RowsDefaultCellStyle = dataGridViewCellStyle13;\r
             this.dataGridMessages.RowTemplate.DefaultCellStyle.BackColor = System.Drawing.Color.Transparent;\r
             this.dataGridMessages.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);\r
             this.dataGridMessages.RowTemplate.DefaultCellStyle.SelectionBackColor = System.Drawing.Color.Transparent;\r
@@ -837,6 +820,10 @@ namespace Maestro {
             // \r
             this.systemMessageBindingSource.DataSource = typeof(Maestro.SystemMessage);\r
             // \r
+            // columnProgress\r
+            // \r
+            this.columnProgress.Name = "columnProgress";\r
+            // \r
             // metadataInfoBindingSource\r
             // \r
             this.metadataInfoBindingSource.DataSource = typeof(Maestro.Metadata.MetadataInfo);\r
@@ -908,9 +895,9 @@ namespace Maestro {
         private System.Windows.Forms.GroupBox groupMetadata;\r
         private System.Windows.Forms.GroupBox groupTarget;\r
         private System.Windows.Forms.Button btnExecute;\r
-        private System.Windows.Forms.TextBox txtSelectedSource;\r
+        private System.Windows.Forms.TextBox textSelectedSource;\r
         private System.Windows.Forms.Label labelSelectedMetadata;\r
-        private System.Windows.Forms.TextBox txtSelectedMetadata;\r
+        private System.Windows.Forms.TextBox textSelectedMetadata;\r
         private System.Windows.Forms.TableLayoutPanel panelActions;\r
         private System.Windows.Forms.GroupBox groupActions;\r
         private System.Windows.Forms.DataGridView dataGridJobs;\r
index fc7d4f0e11efbeb54ca044a0027671e6c7538526..e4d3187022dbe15061d85658186840270eb364ef 100644 (file)
@@ -29,7 +29,7 @@ namespace Maestro {
                 selectedMetadata = value;\r
                 movieSegments = null;\r
                 segments = null;\r
-                txtSelectedMetadata.Text = value?.ID;\r
+                textSelectedMetadata.Text = value?.ID;\r
             }\r
         }\r
 \r
@@ -37,11 +37,11 @@ namespace Maestro {
             InitializeOctopusSelector();\r
             InitializeTrafficSelector();\r
             InitializeMediaCubeApi();\r
-            txtSelectedMetadata.ReadOnly = !Configuration.EnableCustomMetadataId;\r
+            textSelectedMetadata.ReadOnly = !Configuration.EnableCustomMetadataId;\r
         }\r
 \r
         private void InitializeTrafficSelector() {\r
-            TrafficMetadata metadata = Configuration.Metadatas.Where(m => { return m is TrafficMetadata; }).FirstOrDefault() as TrafficMetadata;\r
+            TrafficMetadata metadata = Configuration.GetMetadataProvider<TrafficMetadata>();\r
             if (metadata == null)\r
                 return;\r
             trafficIDSelector.Configuration = new TrafficConfiguration() {\r
@@ -55,7 +55,7 @@ namespace Maestro {
         }\r
 \r
         private void InitializeOctopusSelector() {\r
-            OctopusMetadata metadata = Configuration.Metadatas.Where(m => { return m is OctopusMetadata; }).FirstOrDefault() as OctopusMetadata;\r
+            OctopusMetadata metadata = Configuration.GetMetadataProvider<OctopusMetadata>();\r
             if (metadata == null)\r
                 return;\r
             octopusIDSelector.Configuration = new OctopusConfiguration() {\r
@@ -134,12 +134,12 @@ namespace Maestro {
 \r
         private ArchiveMetadata GetArchiveMetadata() {\r
             ArchiveMetadata result = null;\r
-            SourceIDType idType = GetSourceType(txtSelectedMetadata.Text);\r
+            SourceIDType idType = GetSourceType(textSelectedMetadata.Text);\r
             Cursor.Current = Cursors.WaitCursor;\r
             switch (idType) {\r
                 case SourceIDType.MediaCube:\r
                     result = GetMediaCubeMetadata();\r
-                    txtSelectedMetadata.Text = result.itemHouseId;\r
+                    textSelectedMetadata.Text = result.itemHouseId;\r
                     break;\r
                 case SourceIDType.OctopusID:\r
                     result = GetOctopusMetadata();\r
@@ -163,7 +163,7 @@ namespace Maestro {
         }\r
 \r
         private ArchiveMetadata GetTrafficMetadata() {\r
-            string id = txtSelectedMetadata.Text;\r
+            string id = textSelectedMetadata.Text;\r
             if (String.IsNullOrEmpty(id))\r
                 return null;\r
             TrafficAPI api = trafficIDSelector.trafficAPI;\r
@@ -195,7 +195,7 @@ namespace Maestro {
 \r
         private ArchiveMetadata GetOctopusMetadata() {\r
             ArchiveMetadata result = new ArchiveMetadata();\r
-            string id = txtSelectedMetadata.Text;\r
+            string id = textSelectedMetadata.Text;\r
             OctopusAPI api = octopusIDSelector.GetClient();\r
             IEnumerable<Story> storyEnum = api.GetStoriesById(id);\r
             if (storyEnum != null)\r
@@ -289,7 +289,7 @@ namespace Maestro {
         }\r
 \r
         private void UpdateEditArchiveMetadataEnabled() {\r
-            ctxiModifyArchiveMetadata.Enabled = !String.IsNullOrEmpty(txtSelectedSource.Text);\r
+            ctxiModifyArchiveMetadata.Enabled = !String.IsNullOrEmpty(textSelectedMetadata.Text);\r
         }\r
 \r
         private void UpdateDefineSegmentEnabled() {\r
index 0f6d26fa88d5fd9a0b85e9f2cf86b9c4b48cb961..1e23e20636122ecccc84d1925258e61a564ad78a 100644 (file)
@@ -6,7 +6,6 @@ using Maestro.Sources.Messages;
 using OctopusClient;\r
 using System;\r
 using System.Collections.Generic;\r
-using System.Collections.ObjectModel;\r
 using System.Drawing;\r
 using System.Linq;\r
 using System.Windows.Forms;\r
@@ -30,7 +29,7 @@ namespace Maestro {
             }\r
             set {\r
                 selectedSource = value;\r
-                txtSelectedSource.Text = selectedSource.Name;\r
+                textSelectedSource.Text = selectedSource.Name;\r
                 UpdateEditArchiveMetadataEnabled();\r
             }\r
         }\r
@@ -55,8 +54,7 @@ namespace Maestro {
                 logger.Debug("NEXIO source created");\r
             }\r
 \r
-            MessageBus.Subscribe<CreateFileActionMsg>(OnFileInvolved);\r
-            MessageBus.Subscribe<ModifyFileActionMsg>(OnFileInvolved);\r
+            MessageBus.Subscribe<RemoveFileActionMsg>(OnFileInvolved);\r
 \r
             source.Startup(localAddress);\r
             bindingSource.DataSource = source;\r
@@ -76,14 +74,7 @@ namespace Maestro {
         }\r
 \r
         private void OnFileInvolved(FileActionMsg m) {\r
-            Collection<ISourceItem> source = bindingSource.DataSource as Collection<ISourceItem>;\r
-            if (source == null)\r
-                return;\r
-            ISourceItem item = source.Where(x => x.Name.Equals(m.FileName)).SingleOrDefault();\r
-            if (item == null)\r
-                return;\r
-\r
-            item.IsHighlighted = true;\r
+            UpdateSelectedSources();\r
         }\r
 \r
         private void dataGridSource_CellMouseEnter(object sender, DataGridViewCellEventArgs e) {\r
@@ -112,7 +103,7 @@ namespace Maestro {
             if (selectedrows == null)\r
                 return;\r
             if (e.ColumnIndex == 0) {\r
-                UpdateSelectedSources(selectedrows);\r
+                UpdateSelectedSources();\r
                 return;\r
             }\r
             if (IsPlayColumn(e.ColumnIndex)) {\r
@@ -130,8 +121,9 @@ namespace Maestro {
             }\r
         }\r
 \r
-        private void UpdateSelectedSources(DataGridViewSelectedRowCollection selectedRows) {\r
+        private void UpdateSelectedSources() {\r
             String name;\r
+            var selectedRows = dataGridSource.SelectedRows;\r
             bool valueOfCheckBoxes = GetValueOfCheckBoxes(selectedRows);\r
             int nameIndex = dataGridSource.Columns.Cast<DataGridViewColumn>().Where(x => x.HeaderText == StringResources.NEV).SingleOrDefault().Index;\r
             int checkBoxIndex = dataGridSource.Columns.Cast<DataGridViewColumn>().Where(x => x.GetType() == typeof(DataGridViewCheckBoxColumn)).SingleOrDefault().Index;\r
@@ -269,36 +261,13 @@ namespace Maestro {
         private void dataGridSource_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) {\r
             if (e.RowIndex < 0)\r
                 return;\r
-            var selectedRows = dataGridSource.SelectedRows;\r
-            UpdateSelectedSources(selectedRows);\r
-        }\r
-\r
-        public void SourceDeleted(String fileName) {\r
-            int index = dataGridSource.Columns.Cast<DataGridViewColumn>().Where(x => x.HeaderText == StringResources.NEV).SingleOrDefault().Index;\r
-            foreach (DataGridViewRow actual in selectedSourceRows) {\r
-                String actualName = actual.Cells[index].Value as string;\r
-                if (fileName.Equals(actualName)) {\r
-                    selectedSourceRows.Remove(actual);\r
-                    if (txtSelectedSource.InvokeRequired) {\r
-                        SetTextCallback d = new SetTextCallback(SetTextSelectedSourceAndMetadataButtonEnabled);\r
-                        Invoke(d);\r
-                    } else\r
-                        SetTextSelectedSourceAndMetadataButtonEnabled();\r
-                    return;\r
-                }\r
-            }\r
-        }\r
-\r
-        private void SetTextSelectedSourceAndMetadataButtonEnabled() {\r
-            SetTextSelectedSourceTextFromCheckBoxes();\r
-            SetMetadataButtonEnabled(selectedSourceRows.Count > 0);\r
+            UpdateSelectedSources();\r
         }\r
 \r
         private void dataGridSource_KeyDown(object sender, KeyEventArgs e) {\r
-            if (e.KeyCode == Keys.Space && dataGridSource.CurrentCell.GetType() != typeof(DataGridViewCheckBoxCell)) {\r
-                var selectedRows = dataGridSource.SelectedRows;\r
-                UpdateSelectedSources(selectedRows);\r
-            }\r
+            if (e.KeyCode != Keys.Space || dataGridSource.CurrentCell.GetType() == typeof(DataGridViewCheckBoxCell))\r
+                return;\r
+            UpdateSelectedSources();\r
         }\r
 \r
         private void buttonMetadata_Click(object sender, EventArgs e) {\r
@@ -336,7 +305,7 @@ namespace Maestro {
             if (result.Count == 1) {\r
                 trafficMetadataSelected?.Invoke(result[0].MediaID, result[0].VariantID);\r
                 UpdateEditArchiveMetadataEnabled();\r
-                txtSelectedMetadata.Text = result[0].MediaID;\r
+                textSelectedMetadata.Text = result[0].MediaID;\r
             } else {\r
                 TrafficLookupResultSelector lookupResult = new TrafficLookupResultSelector(result, trafficMetadataSelected);\r
                 lookupResult.ShowDialog();\r
@@ -357,7 +326,7 @@ namespace Maestro {
             List<Story> list = stories.ToList();\r
             if (list.Count == 1) {\r
                 UpdateEditArchiveMetadataEnabled();\r
-                txtSelectedMetadata.Text = list[0].ID;\r
+                textSelectedMetadata.Text = list[0].ID;\r
                 octopusMetadataSelected?.Invoke(list[0].ID);\r
             } else {\r
                 OctopusLookupResultSelector box = new OctopusLookupResultSelector(list, octopusMetadataSelected);\r
@@ -379,7 +348,7 @@ namespace Maestro {
             }\r
             if (list.Count == 1) {\r
                 UpdateEditArchiveMetadataEnabled();\r
-                txtSelectedMetadata.Text = list[0].ID;\r
+                textSelectedMetadata.Text = list[0].ID;\r
                 octopusMetadataSelected?.Invoke(list[0].ID);\r
                 //octopusIDSelector.IDSelectedFromOutside(list[0].ID);\r
                 return;\r
index cc94116e715bce8f4d6f53df7a58d60ca82bd1fe..a67fe8bb3ba6b4cc4ddfe1683e2cc58862a046c2 100644 (file)
@@ -167,7 +167,7 @@ namespace Maestro {
                 MediaCubeApi = mediaCubeApi,\r
                 SourceConfig = Configuration.Source,\r
                 TargetConfig = target,\r
-                ID = txtSelectedMetadata.Text,\r
+                ID = textSelectedMetadata.Text,\r
                 InputFileName = sourceItem.Name,\r
                 Segments = segments == null ? null : new List<Segment>(segments),\r
                 ArchiveMetadata = ArchiveMetadata.DeepClone(archiveMetadata),\r
@@ -209,9 +209,8 @@ namespace Maestro {
             return result;\r
         }\r
 \r
-        private void OnInfoTextChanged(object sender, EventArgs e) {\r
-            if (!sender.Equals(txtSelectedSource))\r
-                ApplyProcessorButtonsLogic();\r
+        private void OnMetadataIDChanged(object sender, EventArgs e) {\r
+            ApplyProcessorButtonsLogic();\r
             ApplyMetaDataButtonLogic();\r
         }\r
 \r
@@ -240,7 +239,7 @@ namespace Maestro {
 \r
         private void ApplyProcessorButtonsLogic() {\r
             ClearSelectedProcessors();\r
-            if (!String.IsNullOrEmpty(txtSelectedSource.Text) && !String.IsNullOrEmpty(txtSelectedMetadata.Text)) {\r
+            if (!String.IsNullOrEmpty(textSelectedMetadata.Text) && !String.IsNullOrEmpty(textSelectedMetadata.Text)) {\r
                 ChangeProcessButtonsState(true);\r
             } else {\r
                 ChangeProcessButtonsState(false);\r
@@ -273,7 +272,7 @@ namespace Maestro {
 \r
         private void ApplyProcessorButtonsLogicWithoutArchiveMetadataButton() {\r
             ClearSelectedProcessors();\r
-            if (!String.IsNullOrEmpty(txtSelectedMetadata.Text) && !String.IsNullOrEmpty(txtSelectedMetadata.Text)) {\r
+            if (!String.IsNullOrEmpty(textSelectedMetadata.Text) && !String.IsNullOrEmpty(textSelectedMetadata.Text)) {\r
                 ChangeProcessButtonsState(true);\r
             } else {\r
                 ChangeProcessButtonsState(false);\r
index a6722265b5411d5055a7391b9eaaf951efd081f1..3d67fd99e06aa66640cb9a7e06ecb66d71b64f26 100644 (file)
@@ -27,7 +27,15 @@ namespace Maestro {
         private BlockingCollection<ITargetProcessor> jobsQueue = new BlockingCollection<ITargetProcessor>();\r
         private BackgroundWorker processorWorker;\r
         public IMessageBus MessageBus { get; set; }\r
-        public ConfigurationInfo Configuration;\r
+        private ConfigurationInfo configuration;\r
+        public ConfigurationInfo Configuration {\r
+            get { return configuration; }\r
+            set {\r
+                //Try modban indulva, ennek mar futnia kell\r
+                configuration = value;\r
+                InitializeSource();\r
+            }\r
+        }\r
         private TraficMetadataSelected trafficMetadataSelected;\r
         private OctopusMetadataSelected octopusMetadataSelected;\r
         private Color newMSGColor;\r
@@ -71,7 +79,6 @@ namespace Maestro {
         }\r
 \r
         private void InitializeComponents() {\r
-            InitializeSource();\r
             InitializeMetadata();\r
             InitializeTarget();\r
             InitializeJobs();\r
index 065969d11f83cc36458ed61e91d4d45062908729..b4607954d87b6be0511714eeb16c5d3f78e220c4 100644 (file)
   <metadata name="columnStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
     <value>True</value>\r
   </metadata>\r
-  <metadata name="columnProgress.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
-    <value>True</value>\r
-  </metadata>\r
   <metadata name="columnStarted.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
     <value>True</value>\r
   </metadata>\r
index 4182c2e6e7d493c8d735a2aa08b98ad95e92565e..f5d74d5b0783ee8bab5e4f13d015cd539632915d 100644 (file)
@@ -14,8 +14,8 @@ namespace Maestro {
 \r
         public MeastroFormNotifyIcon(ConfigurationInfo config, IMessageBus messageBus) {\r
             Config = config;\r
-            form.Configuration = config;\r
             form.MessageBus = messageBus;\r
+            form.Configuration = config;\r
 \r
             messageBus.Subscribe<CreateFileActionMsg>(OnFileCreated);\r
             messageBus.Subscribe<RemoveFileActionMsg>(OnFileRemoved);\r
@@ -24,6 +24,11 @@ namespace Maestro {
             notification.Icon = System.Drawing.SystemIcons.Information;\r
             notification.Click += Notification_Click;\r
             notification.BalloonTipClicked += Notification_BalloonTipClicked;\r
+            notification.BalloonTipClosed += Notification_BalloonTipClosed; ;\r
+        }\r
+\r
+        private void Notification_BalloonTipClosed(object sender, EventArgs e) {\r
+            notification.Visible = false;\r
         }\r
 \r
         private void OnFileCreated(FileActionMsg m) {\r
@@ -45,7 +50,7 @@ namespace Maestro {
         }\r
 \r
         public void Show(string tooltipText) {\r
-            if (tooltipText == null)\r
+            if (tooltipText == null || form.Visible)\r
                 return;\r
             notification.BalloonTipText = tooltipText;\r
             notification.Visible = true;\r
@@ -62,10 +67,10 @@ namespace Maestro {
             form.Activate();\r
         }\r
 \r
-        public void BeginShowForm() {\r
-            Task.Run(() => {\r
-                ShowForm();                    \r
-            });\r
+        public void ShowFormMinimized() {\r
+            notification.Visible = false;\r
+            form.WindowState = FormWindowState.Minimized;\r
+            form.Show();\r
         }\r
 \r
         public void HideForm() {\r
index 382eaf5a0dc5b2c6a67d7af169985e704cf3ca12..1709bf7630a35bfc95740f989202916d0e0f732d 100644 (file)
@@ -9,6 +9,7 @@ using System.Collections.Concurrent;
 using System.Collections.Generic;\r
 using System.Drawing;\r
 using System.IO;\r
+using System.Linq;\r
 using System.Reflection;\r
 using System.Runtime.InteropServices;\r
 using System.Security.AccessControl;\r
@@ -26,36 +27,36 @@ namespace Maestro {
         /// </summary>\r
         [STAThread]\r
         static void Main() {\r
-            //string appGuid = ((GuidAttribute)Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(GuidAttribute), false).GetValue(0)).Value.ToString();\r
-            //string mutexId = string.Format("Global\\{{{0}}}", appGuid);\r
-            //bool createdNew;\r
-            //var allowEveryoneRule = new MutexAccessRule(new SecurityIdentifier(WellKnownSidType.WorldSid, null), MutexRights.FullControl, AccessControlType.Allow);\r
-            //var securitySettings = new MutexSecurity();\r
-            //securitySettings.AddAccessRule(allowEveryoneRule);\r
-            //using (var mutex = new Mutex(false, mutexId, out createdNew, securitySettings)) {\r
-            //    var hasHandle = false;\r
-            //    try {\r
-            //        try {\r
-            //            hasHandle = mutex.WaitOne(500, false);\r
-            //            if (hasHandle == false)\r
-            //                MessageBox.Show("A MediaCube Maestro alkalmazás már fut egy példányban.");\r
-            //        }\r
-            //        catch (AbandonedMutexException) {\r
-            //            hasHandle = true;\r
-            //        }\r
-            //    }\r
-            //    finally {\r
-            //        if (hasHandle) {\r
-            //            Application.EnableVisualStyles();\r
-            //            Application.SetCompatibleTextRenderingDefault(false);\r
-            //            Application.Run(new TrayApplicationContext());\r
-            //            mutex.ReleaseMutex();\r
-            //        }\r
-            //    }\r
-            //}\r
-            Application.EnableVisualStyles();\r
-            Application.SetCompatibleTextRenderingDefault(false);\r
-            Application.Run(new TrayApplicationContext());\r
+            string appGuid = ((GuidAttribute)Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(GuidAttribute), false).GetValue(0)).Value.ToString();\r
+            string mutexId = string.Format("Global\\{{{0}}}", appGuid);\r
+            bool createdNew;\r
+            var allowEveryoneRule = new MutexAccessRule(new SecurityIdentifier(WellKnownSidType.WorldSid, null), MutexRights.FullControl, AccessControlType.Allow);\r
+            var securitySettings = new MutexSecurity();\r
+            securitySettings.AddAccessRule(allowEveryoneRule);\r
+            using (var mutex = new Mutex(false, mutexId, out createdNew, securitySettings)) {\r
+                var hasHandle = false;\r
+                try {\r
+                    try {\r
+                        hasHandle = mutex.WaitOne(500, false);\r
+                        if (hasHandle == false)\r
+                            MessageBox.Show("A MediaCube Maestro alkalmazás már fut egy példányban.");\r
+                    }\r
+                    catch (AbandonedMutexException) {\r
+                        hasHandle = true;\r
+                    }\r
+                }\r
+                finally {\r
+                    if (hasHandle) {\r
+                        Application.EnableVisualStyles();\r
+                        Application.SetCompatibleTextRenderingDefault(false);\r
+                        Application.Run(new TrayApplicationContext());\r
+                        mutex.ReleaseMutex();\r
+                    }\r
+                }\r
+            }\r
+            //Application.EnableVisualStyles();\r
+            //Application.SetCompatibleTextRenderingDefault(false);\r
+            //Application.Run(new TrayApplicationContext());\r
         }\r
     }\r
 \r
@@ -66,11 +67,14 @@ namespace Maestro {
         private IMessageBus messageBus = new MessageBus();\r
 \r
         public TrayApplicationContext() {\r
-            Splash splash = new Splash();\r
-            Task.Run(() => {\r
-                Application.Run(splash);\r
-            });\r
 \r
+            String[] arguments = Environment.GetCommandLineArgs();\r
+            if (!arguments.ToList().Contains("nosplash")) {\r
+                Splash splash = new Splash();\r
+                Task.Run(() => {\r
+                    Application.Run(splash);\r
+                });\r
+            }\r
             CreateForms();\r
             CreateTrayIcon();\r
         }\r
@@ -93,13 +97,14 @@ namespace Maestro {
         private void CreateForm(string file) {\r
             try {\r
                 ConfigurationInfo config = Loader.Get(file);\r
-                //string decryptedstring = StringCipher.Decrypt(encryptedstring, password);\r
-\r
                 if (!config.Active)\r
                     return;\r
+                ApplyCommandLineParameters(ref config);\r
                 MeastroFormNotifyIcon form = new MeastroFormNotifyIcon(config, messageBus);\r
                 forms.Add(form);\r
-                if (!config.StartInTray)\r
+                if (config.StartInTray)\r
+                    form.ShowFormMinimized();\r
+                else\r
                     form.ShowForm();\r
             }\r
             catch (Exception e) {\r
@@ -108,6 +113,29 @@ namespace Maestro {
             }\r
         }\r
 \r
+        private void ApplyCommandLineParameters(ref ConfigurationInfo config) {\r
+            String[] arguments = Environment.GetCommandLineArgs();\r
+            string replacementHost = arguments.ToList().Where(i => i.StartsWith("http") || i.StartsWith("https")).FirstOrDefault();\r
+            if (String.IsNullOrEmpty(replacementHost))\r
+                return;\r
+            var mediaCubeProvider = config.GetMetadataProvider<MediaCubeMetadata>();\r
+            mediaCubeProvider.Server.Address = replaceAuthority(replacementHost, mediaCubeProvider.Server.Address);\r
+            var octopusProvider = config.GetMetadataProvider<OctopusMetadata>();\r
+            octopusProvider.Server.Address = replaceAuthority(replacementHost, octopusProvider.Server.Address);\r
+            if (config.Source is NEXIOSource)\r
+                config.Source.Local.Address = replaceAuthority(replacementHost, config.Source.Local.Address);\r
+        }\r
+\r
+        private Uri replaceAuthority(string replacementHost, Uri address) {\r
+            if (address == null)\r
+                return address;\r
+            Uri replacementUri = new Uri(replacementHost);\r
+            var builder = new UriBuilder(address);\r
+            builder.Host = replacementUri.Host;\r
+            builder.Port = replacementUri.Port;\r
+            return builder.Uri;\r
+        }\r
+\r
         private List<MenuItem> CreateMenuItems() {\r
             List<MenuItem> menuItems = new List<MenuItem>();\r
             menuItems.Add(new MenuItem("Mindet megjeleníti", ShowAll));\r
index 8df8c9036c10056f59d994024d282c69f4af83a7..0d277666e640abe0fb2d95335de998fd9c989ece 100644 (file)
@@ -107,10 +107,7 @@ namespace Maestro.Sources {
         }\r
 \r
         private void ClearDataGridView() {\r
-            this.parent.SafeCall(() => {\r
-                Clear();\r
-            }\r
-                );\r
+            parent.SafeCall(() => Clear());\r
             cache.Clear();\r
             initialized = false;\r
         }\r
@@ -176,70 +173,86 @@ namespace Maestro.Sources {
 \r
         public void OnRenamed(object sender, RenamedEventArgs e) {\r
             logger.Debug("{0} {1} {2}", e.ChangeType, e.OldName, e.Name);\r
-            var item = this.Where(x => x.Name == e.OldName).SingleOrDefault();\r
-            if (item == null)\r
-                return;\r
-            if (item.CanHandle(acceptableExtensions)) {\r
-                item.FileInfo = new FileInfo(e.FullPath);\r
+            FileInfo fiOld = new FileInfo(e.OldFullPath);\r
+            FileInfo fiNew = new FileInfo(e.FullPath);\r
+            if (fiOld.Extension.Equals(fiNew.Extension)) {\r
+                var item = this.Where(x => x.Name == e.OldName).SingleOrDefault();\r
+                if (item == null || !item.CanHandle(acceptableExtensions))\r
+                    return;\r
                 parent.SafeCall(() => {\r
+                    item.FileInfo = new FileInfo(e.FullPath);\r
+                    item.IsHighlighted = true;\r
                     messageBus.Send(new ModifyFileActionMsg() {\r
                         FileName = e.Name,\r
                         Source = parent\r
                     });\r
                 });\r
+            } else {\r
+                var newItem = CreateItem(fiNew, true);\r
+                if (newItem.CanHandle(acceptableExtensions))\r
+                    SafeCreateItem(newItem);\r
+                else {\r
+                    var item = this.Where(x => x.Name == e.OldName).SingleOrDefault();\r
+                    SafeDeleteItem(item);\r
+                }\r
             }\r
         }\r
 \r
         private void OnChanged(object sender, FileSystemEventArgs e) {\r
             logger.Debug("{0} {1}", e.ChangeType, e.Name);\r
-            var item = this.Where(x => x.Name == e.Name).SingleOrDefault();\r
-            if (item == null)\r
+            var item = this.Where(x => x.Name == e.Name).FirstOrDefault();\r
+            if (item == null || !item.CanHandle(acceptableExtensions))\r
                 return;\r
-            if (item.CanHandle(acceptableExtensions)) {\r
+            parent.SafeCall(() => {\r
                 item.FileInfo = new FileInfo(e.FullPath);\r
-                parent.SafeCall(() => {\r
-                    messageBus.Send(new ModifyFileActionMsg() {\r
-                        FileName = e.Name,\r
-                        Source = parent\r
-                    });\r
+                item.IsHighlighted = true;\r
+                messageBus.Send(new ModifyFileActionMsg() {\r
+                    FileName = e.Name,\r
+                    Source = parent\r
                 });\r
-            }\r
+            });\r
         }\r
 \r
         private void OnCreated(object sender, FileSystemEventArgs e) {\r
             //TODO enable cancel\r
+            var item = CreateItem(new FileInfo(e.FullPath), true);\r
+            if (!item.CanHandle(acceptableExtensions))\r
+                return;\r
             CreatedFileMonitor createdFileMonitor = new CreatedFileMonitor(e.FullPath);\r
             createdFileMonitor.RunWorkerCompleted += (s1, e1) => {\r
                 FileInfo fileInfo = e1.Result as FileInfo;\r
-                parent.SafeCall(() => {\r
-                    Insert(0, CreateItem(fileInfo, true));\r
-                    messageBus.Send(new CreateFileActionMsg() {\r
-                        FileName = fileInfo.Name,\r
-                        Source = parent\r
-                    });\r
-                });\r
+                var completedItem = CreateItem(fileInfo, true);\r
+                SafeCreateItem(completedItem);\r
             };\r
             logger.Debug("{0} {1}", e.ChangeType, e.Name);\r
         }\r
 \r
+        private void SafeCreateItem(FileSourceItem item) {\r
+            parent.SafeCall(() => {\r
+                Insert(0, item);\r
+                messageBus.Send(new CreateFileActionMsg() {\r
+                    FileName = item.Name,\r
+                    Source = parent\r
+                });\r
+            });\r
+        }\r
+\r
         private void OnDeleted(object sender, FileSystemEventArgs e) {\r
             logger.Debug("{0} {1}", e.ChangeType, e.Name);\r
-            var enumList = this.Where(item => item.Name.Equals(e.Name))?.ToList();\r
-            FileSourceItem fileSourceItem = enumList.Count == 0 ? null : enumList.First();\r
-            if (fileSourceItem == null)\r
+            FileSourceItem item = this.Where(i => i.Name.Equals(e.Name)).FirstOrDefault();\r
+            if (item == null || !item.CanHandle(acceptableExtensions))\r
                 return;\r
-            if (fileSourceItem.CanHandle(acceptableExtensions)) {\r
-                parent.SafeCall(() => {\r
-                    Remove(fileSourceItem);\r
-                    messageBus.Send(new RemoveFileActionMsg() {\r
-                        FileName = e.Name,\r
-                        Source = parent\r
-                    });\r
+            SafeDeleteItem(item);\r
+        }\r
+\r
+        private void SafeDeleteItem(FileSourceItem item) {\r
+            parent.SafeCall(() => {\r
+                Remove(item);\r
+                messageBus.Send(new RemoveFileActionMsg() {\r
+                    FileName = item.Name,\r
+                    Source = parent\r
                 });\r
-                MaestroForm form = (MaestroForm)parent;\r
-                form.SourceDeleted(e.Name);\r
-                return;\r
-            }\r
+            });\r
         }\r
 \r
         public void ApplySort(ListSortDescriptionCollection sorts) {\r
index 5911c427c783f69390766b4fb91025caebc0a3ac..b391febc0e74ddab364ae337f040896c840222db 100644 (file)
@@ -34,6 +34,10 @@ namespace Maestro.Targets {
             TerminateClient(targetFTP);\r
         }\r
 \r
+        private void DeleteFile(string currentFile) {\r
+            targetFTP.DeleteFile(currentFile);\r
+        }\r
+\r
         protected override void UploadFile() {\r
             using (FileStream istream = File.OpenRead(Input)) {\r
                 using (Stream ostream = targetFTP.OpenWrite(OutputName)) {\r
index abac4edbba6df5c0f55f9705bedb56bf86eb63be..aa50f3b3a3b8637437621ce18c33deb3d07fd622 100644 (file)
@@ -60,6 +60,9 @@ namespace Maestro.Targets {
                 workFlowAction.destination = Output;\r
                 Status = "Folyamatban";\r
                 //DateTime started = DateTime.Now;\r
+                string currentFile = GetOutputFilePath(workingDir, OutputName);\r
+                if (FileExists(currentFile) && parameters.TargetConfig.DisableFileVersioning)\r
+                    DeleteFile(currentFile);\r
                 UploadFile();\r
                 //logger.Info("Spend (s):" + (DateTime.Now - started).TotalSeconds);\r
                 ExecuteCompleted();\r
@@ -79,6 +82,9 @@ namespace Maestro.Targets {
             return result;\r
         }\r
 \r
+        private void DeleteFile(string currentFile) {\r
+            File.Delete(currentFile);\r
+        }\r
 \r
         private string GetOutputName() {\r
             if (String.IsNullOrEmpty(OutputName))\r
@@ -228,14 +234,15 @@ namespace Maestro.Targets {
             string nameWithoutExtension = parameters.TargetConfig.OutputFormat.Replace("%ID%", ID).Replace("%SOURCENAME%", Path.GetFileNameWithoutExtension(InputName));\r
             string extension = InputName.Contains(".") ? InputName.Substring(InputName.LastIndexOf(".")) : DEFAULT_EXTENSION;\r
             extension = extension.ToUpper();\r
-\r
             string result = String.Format(FILENAME, nameWithoutExtension, extension);\r
-            int version = 1;\r
-            while (FileExists(GetOutputFilePath(workingDir, result))) {\r
-                string versioned = String.Format(VERSIONED_FILENAME, nameWithoutExtension, version, extension);\r
-                logger.Debug(ALREADY_EXISTS, result, versioned);\r
-                result = versioned;\r
-                version++;\r
+            if (!parameters.TargetConfig.DisableFileVersioning) {\r
+                int version = 1;\r
+                while (FileExists(GetOutputFilePath(workingDir, result))) {\r
+                    string versioned = String.Format(VERSIONED_FILENAME, nameWithoutExtension, version, extension);\r
+                    logger.Debug(ALREADY_EXISTS, result, versioned);\r
+                    result = versioned;\r
+                    version++;\r
+                }\r
             }\r
             return result;\r
         }\r
diff --git a/client/MediaCube.vssscc b/client/MediaCube.vssscc
new file mode 100644 (file)
index 0000000..794f014
--- /dev/null
@@ -0,0 +1,10 @@
+""\r
+{\r
+"FILE_VERSION" = "9237"\r
+"ENLISTMENT_CHOICE" = "NEVER"\r
+"PROJECT_FILE_RELATIVE_PATH" = ""\r
+"NUMBER_OF_EXCLUDED_FILES" = "0"\r
+"ORIGINAL_PROJECT_FILE_PATH" = ""\r
+"NUMBER_OF_NESTED_PROJECTS" = "0"\r
+"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT"\r
+}\r
index b44190b973d1af592558ad7f50a428a407463662..276618f0f7bc5171667ed86ccda8cf11534a7bf5 100644 (file)
@@ -40,8 +40,8 @@ namespace OctopusClient {
             tpRundown.Text = Resources.ADASTUKOR;\r
             tpStoryFolder.Text = Resources.MAPPA;\r
             linkID.Text = Resources.KERESES;\r
-            bindingRundown.Add(Resources.VALASSZON_ELEMET);\r
-            bindingStoryFolder.Add(Resources.VALASSZON_ELEMET);\r
+            //bindingRundown.Add(Resources.VALASSZON_ELEMET);\r
+            //bindingStoryFolder.Add(Resources.VALASSZON_ELEMET);\r
         }\r
 \r
         private void OctopusIDSelector_Load(object sender, EventArgs e) {\r
diff --git a/server/-configuration/mediacube-dev-user.properties b/server/-configuration/mediacube-dev-user.properties
new file mode 100644 (file)
index 0000000..bb284ab
--- /dev/null
@@ -0,0 +1,23 @@
+#A user.dir mindig a test projekt mappaja, a relativ hivatkozasok ehhez kepest ertendok. \r
+#JobEngine\r
+jobengine.loglevel=INFO\r
+jobengine.jobsteps.root=../user.jobengine.osgi.server/resources/executors\r
+jobengine.jobtemplates.root=../user.jobengine.osgi.server/resources/templates\r
+jobengine.jobsteps.alternate.root=../user.jobengine.executors/bin/user/jobengine/server/steps\r
+jobengine.db.url=jdbc:db2://10.228.198.1:50000/mediaarc:retrieveMessagesFromServerOnGetMessage=true;\r
+jobengine.db.user=db2admin\r
+jobengine.db.password=password\r
+jobengine.octopus.api.address=http://10.10.1.11/api/v1\r
+jobengine.octopus.api.user=mam\r
+jobengine.octopus.api.password=napocska\r
+jobengine.nosql.db.url=jdbc:db2://10.228.198.1:50000/mccache:retrieveMessagesFromServerOnGetMessage=true;\r
+jobengine.nosql.db.user=db2admin\r
+jobengine.nosql.db.password=password\r
+jobengine.nexio.db.url=jdbc:sqlserver://10.10.1.59:1433;databaseName=NXDB;\r
+jobengine.nexio.db.user=sa\r
+jobengine.nexio.db.password=resolve\r
+#System\r
+jetty.home=../user.jobengine.osgi.rest/\r
+jetty.etc.config.urls=etc/user-jetty.xml,etc/user-jetty-ssl.xml,etc/user-jetty-ssl-context.xml,etc/user-jetty-http.xml,etc/user-jetty-https.xml\r
+log4j.configuration=../-configuration/log4j.properties\r
+log4j.configurationFile=../-configuration/log4j2.xml
\ No newline at end of file
index ebb1c1b2c89f6e30064901dcddde37352dcbdcc5..14710599144a06e9363caf5f417c755bde5497a1 100644 (file)
@@ -26,8 +26,6 @@ import user.commons.octopus.OctopusDataMiner;
 \r
 public class OctopusDataMinerTest {\r
 \r
-       private OctopusDataMiner sut;\r
-\r
        @BeforeClass\r
        public static void initialize() throws Exception {\r
                // System.setProperty("jobengine.nosql.db.url",\r
@@ -43,34 +41,19 @@ public class OctopusDataMinerTest {
 \r
                Properties properties = new Properties();\r
                URL srcLocation = MethodHandles.lookup().lookupClass().getProtectionDomain().getCodeSource().getLocation();\r
-               URL location = new URL(srcLocation, "../../-configuration/mediacube-dev.properties");\r
+               //URL location = new URL(srcLocation, "../../-configuration/mediacube-dev.properties");\r
+               URL location = new URL(srcLocation, "../../-configuration/mediacube-dev-user.properties");\r
                properties.load(new FileInputStream(location.toURI().getPath().toString()));\r
                System.getProperties().putAll(properties);\r
 \r
        }\r
 \r
-       @Test\r
-       public void run() {\r
-               sut = new OctopusDataMiner();\r
-               sut.run();\r
-       }\r
-\r
-       @Test\r
-       public void integrationTestWithClear() {\r
-               // fixture\r
-               sut = new OctopusDataMiner();\r
-               sut.clear();\r
-\r
-               // Exercise\r
-               sut.run();\r
-       }\r
+       private OctopusDataMiner sut;\r
 \r
        @Test\r
        public void deleteOrphanStories() {\r
                try {\r
-                       DB db = NoSQLClient.getDB(\r
-                                       "jdbc:db2://10.228.198.1:50000/mccache:retrieveMessagesFromServerOnGetMessage=true;", "db2admin",\r
-                                       "password", "test");\r
+                       DB db = NoSQLClient.getDB("jdbc:db2://10.228.198.1:50000/mccache:retrieveMessagesFromServerOnGetMessage=true;", "db2admin", "password", "test");\r
                        DBCollection collection = db.getCollection("testCollection");\r
 \r
                        long id1 = 1, id2 = 2, id3 = 3, id4 = 4, id5 = 5;\r
@@ -111,15 +94,31 @@ public class OctopusDataMinerTest {
                }\r
        }\r
 \r
+       @Test\r
+       public void integrationTestWithClear() {\r
+               // fixture\r
+               sut = new OctopusDataMiner();\r
+               sut.clear();\r
+\r
+               // Exercise\r
+               sut.run();\r
+       }\r
+\r
+       @Test\r
+       public void run() {\r
+               sut = new OctopusDataMiner();\r
+               sut.run();\r
+       }\r
+\r
        @Test\r
        public void test() throws SQLException {\r
                IOctopusAPI api = new OctopusAPI();\r
                List<DBObject> stories = api.getStories();\r
                for (DBObject actual : stories) {\r
                        if (actual.containsField("rundown")) {\r
-                               BasicDBList rundowns = (BasicDBList)actual.get("rundown");\r
+                               BasicDBList rundowns = (BasicDBList) actual.get("rundown");\r
                                BasicDBList objs = (BasicDBList) actual.get("mosObjects");\r
-                               if(objs.size() > 0)\r
+                               if (objs.size() > 0)\r
                                        System.out.println(rundowns);\r
                        }\r
                }\r
index 24ba00c4d81cecca820cd8f94dc10d150018d2ab..59a905aa6778337ddf4a1f7c64ae24adbc000c72 100644 (file)
@@ -18,6 +18,7 @@ db2ts "create index media_desc for text on media(description) UPDATE FREQUENCY D
 db2ts "create index media_houseid for text on media(houseid) UPDATE FREQUENCY D(*) H(*) M(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59) UPDATE MINIMUM 1 connect to mc"\r
 db2ts "create index mediafile_houseid for text on mediafile(houseid) UPDATE FREQUENCY D(*) H(*) M(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59) UPDATE MINIMUM 1 connect to mc"\r
 \r
+\r
 db2ts "update index item_title for text connect to mc"\r
 db2ts "update index item_desc for text connect to mc"\r
 db2ts "update index item_houseid for text connect to mc"\r