Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2816 for branches


Ignore:
Timestamp:
02/16/10 18:44:45 (14 years ago)
Author:
gkronber
Message:

Worked on plugin deployment GUI.
Added contact info and license text to DB schema.
#860

Location:
branches/DeploymentServer Prototype/HeuristicLab.Services
Files:
12 added
1 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/HeuristicLab.DeploymentService.AdminClient.csproj

    r2804 r2816  
    4848  </PropertyGroup>
    4949  <ItemGroup>
     50    <Reference Include="ICSharpCode.SharpZipLib, Version=0.85.4.369, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
     51      <SpecificVersion>False</SpecificVersion>
     52      <HintPath>..\HeuristicLab.PluginInfrastructure\ICSharpCode.SharpZipLib.dll</HintPath>
     53    </Reference>
    5054    <Reference Include="System" />
    5155    <Reference Include="System.Core">
     
    7074  </ItemGroup>
    7175  <ItemGroup>
     76    <Compile Include="ServerPluginView.cs">
     77      <SubType>UserControl</SubType>
     78    </Compile>
     79    <Compile Include="ServerPluginView.Designer.cs">
     80      <DependentUpon>ServerPluginView.cs</DependentUpon>
     81    </Compile>
     82    <Compile Include="PluginView.cs">
     83      <SubType>UserControl</SubType>
     84    </Compile>
     85    <Compile Include="PluginView.Designer.cs">
     86      <DependentUpon>PluginView.cs</DependentUpon>
     87    </Compile>
     88    <Compile Include="LicenseView.cs">
     89      <SubType>UserControl</SubType>
     90    </Compile>
     91    <Compile Include="LicenseView.Designer.cs">
     92      <DependentUpon>LicenseView.cs</DependentUpon>
     93    </Compile>
     94    <Compile Include="LocalPluginView.cs">
     95      <SubType>UserControl</SubType>
     96    </Compile>
     97    <Compile Include="LocalPluginView.Designer.cs">
     98      <DependentUpon>LocalPluginView.cs</DependentUpon>
     99    </Compile>
    72100    <Compile Include="ProductEditor.cs">
    73101      <SubType>UserControl</SubType>
     
    91119    </Compile>
    92120    <Compile Include="Properties\AssemblyInfo.cs" />
    93     <Compile Include="Service References\AdminService\Reference.cs">
    94       <AutoGen>True</AutoGen>
    95       <DesignTime>True</DesignTime>
    96       <DependentUpon>Reference.svcmap</DependentUpon>
    97     </Compile>
    98     <Compile Include="UpdateAction.cs" />
    99     <Compile Include="UpdateServerPluginsButtonItem.cs" />
    100     <Compile Include="UpdateServerPluginsMenuItem.cs" />
    101121  </ItemGroup>
    102122  <ItemGroup>
     
    115135  </ItemGroup>
    116136  <ItemGroup>
    117     <WCFMetadata Include="Service References\" />
    118   </ItemGroup>
    119   <ItemGroup>
    120137    <None Include="app.config" />
    121138    <None Include="HeuristicLabDeploymentServiceAdminClientPlugin.cs.frame" />
    122139    <None Include="Properties\AssemblyInfo.frame" />
    123     <None Include="Service References\AdminService\service.wsdl" />
    124     <None Include="Service References\AdminService\service.xsd" />
    125     <None Include="Service References\AdminService\service1.xsd" />
    126140  </ItemGroup>
    127141  <ItemGroup>
     142    <EmbeddedResource Include="ServerPluginView.resx">
     143      <DependentUpon>ServerPluginView.cs</DependentUpon>
     144    </EmbeddedResource>
     145    <EmbeddedResource Include="PluginView.resx">
     146      <DependentUpon>PluginView.cs</DependentUpon>
     147    </EmbeddedResource>
     148    <EmbeddedResource Include="LicenseView.resx">
     149      <DependentUpon>LicenseView.cs</DependentUpon>
     150    </EmbeddedResource>
     151    <EmbeddedResource Include="LocalPluginView.resx">
     152      <DependentUpon>LocalPluginView.cs</DependentUpon>
     153    </EmbeddedResource>
    128154    <EmbeddedResource Include="ProductEditor.resx">
    129155      <DependentUpon>ProductEditor.cs</DependentUpon>
     
    132158      <DependentUpon>PluginListView.cs</DependentUpon>
    133159    </EmbeddedResource>
    134   </ItemGroup>
    135   <ItemGroup>
    136     <WCFMetadataStorage Include="Service References\AdminService\" />
    137   </ItemGroup>
    138   <ItemGroup>
    139     <None Include="Service References\AdminService\configuration91.svcinfo" />
    140   </ItemGroup>
    141   <ItemGroup>
    142     <None Include="Service References\AdminService\configuration.svcinfo" />
    143   </ItemGroup>
    144   <ItemGroup>
    145     <None Include="Service References\AdminService\Reference.svcmap">
    146       <Generator>WCF Proxy Generator</Generator>
    147       <LastGenOutput>Reference.cs</LastGenOutput>
    148     </None>
    149160  </ItemGroup>
    150161  <ItemGroup>
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/PluginListView.Designer.cs

    r2802 r2816  
    2424    /// </summary>
    2525    private void InitializeComponent() {
    26       System.Windows.Forms.ListViewGroup listViewGroup1 = new System.Windows.Forms.ListViewGroup("Local plugins", System.Windows.Forms.HorizontalAlignment.Left);
    27       System.Windows.Forms.ListViewGroup listViewGroup2 = new System.Windows.Forms.ListViewGroup("All plugins", System.Windows.Forms.HorizontalAlignment.Left);
    28       System.Windows.Forms.ListViewGroup listViewGroup3 = new System.Windows.Forms.ListViewGroup("Disabled plugins", System.Windows.Forms.HorizontalAlignment.Left);
    29       this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
    3026      this.listView = new System.Windows.Forms.ListView();
    3127      this.nameHeader = new System.Windows.Forms.ColumnHeader();
    32       this.Version = new System.Windows.Forms.ColumnHeader();
    33       this.detailsTextBox = new System.Windows.Forms.TextBox();
     28      this.localVersion = new System.Windows.Forms.ColumnHeader();
    3429      this.uploadButton = new System.Windows.Forms.Button();
     30      this.splitContainer = new System.Windows.Forms.SplitContainer();
     31      this.label1 = new System.Windows.Forms.Label();
     32      this.serverUrlTextBox = new System.Windows.Forms.TextBox();
     33      this.connectButton = new System.Windows.Forms.Button();
     34      this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
     35      this.serverPluginDetailsGroupBox = new System.Windows.Forms.GroupBox();
     36      this.localPluginDetailsGroupBox = new System.Windows.Forms.GroupBox();
     37      this.localPluginDetailsPanel = new System.Windows.Forms.Panel();
     38      this.serverVersion = new System.Windows.Forms.ColumnHeader();
     39      this.splitContainer.Panel1.SuspendLayout();
     40      this.splitContainer.Panel2.SuspendLayout();
     41      this.splitContainer.SuspendLayout();
    3542      this.tableLayoutPanel.SuspendLayout();
     43      this.localPluginDetailsGroupBox.SuspendLayout();
    3644      this.SuspendLayout();
    3745      //
    38       // tableLayoutPanel
    39       //
    40       this.tableLayoutPanel.ColumnCount = 1;
    41       this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
    42       this.tableLayoutPanel.Controls.Add(this.listView, 0, 0);
    43       this.tableLayoutPanel.Controls.Add(this.detailsTextBox, 0, 1);
    44       this.tableLayoutPanel.Controls.Add(this.uploadButton, 0, 2);
    45       this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
    46       this.tableLayoutPanel.Location = new System.Drawing.Point(0, 0);
    47       this.tableLayoutPanel.Name = "tableLayoutPanel";
    48       this.tableLayoutPanel.RowCount = 3;
    49       this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 63.42105F));
    50       this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 36.57895F));
    51       this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 123F));
    52       this.tableLayoutPanel.Size = new System.Drawing.Size(400, 380);
    53       this.tableLayoutPanel.TabIndex = 0;
    54       //
    5546      // listView
    5647      //
     48      this.listView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     49                  | System.Windows.Forms.AnchorStyles.Left)
     50                  | System.Windows.Forms.AnchorStyles.Right)));
    5751      this.listView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
    5852            this.nameHeader,
    59             this.Version});
    60       this.listView.Dock = System.Windows.Forms.DockStyle.Fill;
    61       listViewGroup1.Header = "Local plugins";
    62       listViewGroup1.Name = "Local plugins";
    63       listViewGroup2.Header = "All plugins";
    64       listViewGroup2.Name = "All plugins";
    65       listViewGroup3.Header = "Disabled plugins";
    66       listViewGroup3.Name = "Disabled plugins";
    67       this.listView.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] {
    68             listViewGroup1,
    69             listViewGroup2,
    70             listViewGroup3});
    71       this.listView.Location = new System.Drawing.Point(3, 3);
     53            this.localVersion,
     54            this.serverVersion});
     55      this.listView.Enabled = false;
     56      this.listView.Location = new System.Drawing.Point(3, 32);
     57      this.listView.MultiSelect = false;
    7258      this.listView.Name = "listView";
    73       this.listView.Size = new System.Drawing.Size(394, 156);
     59      this.listView.ShowGroups = false;
     60      this.listView.Size = new System.Drawing.Size(392, 459);
    7461      this.listView.TabIndex = 0;
    7562      this.listView.UseCompatibleStateImageBehavior = false;
     
    8067      //
    8168      this.nameHeader.Text = "Name";
    82       this.nameHeader.Width = 300;
    83       //
    84       // Version
    85       //
    86       this.Version.Text = "Version";
    87       this.Version.Width = 100;
    88       //
    89       // detailsTextBox
    90       //
    91       this.detailsTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
    92       this.detailsTextBox.Location = new System.Drawing.Point(3, 165);
    93       this.detailsTextBox.Multiline = true;
    94       this.detailsTextBox.Name = "detailsTextBox";
    95       this.detailsTextBox.ReadOnly = true;
    96       this.detailsTextBox.Size = new System.Drawing.Size(394, 88);
    97       this.detailsTextBox.TabIndex = 1;
     69      this.nameHeader.Width = 188;
     70      //
     71      // localVersion
     72      //
     73      this.localVersion.Text = "Local version";
     74      this.localVersion.Width = 100;
    9875      //
    9976      // uploadButton
    10077      //
    101       this.uploadButton.Location = new System.Drawing.Point(3, 259);
     78      this.uploadButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     79      this.uploadButton.Enabled = false;
     80      this.uploadButton.Location = new System.Drawing.Point(6, 459);
    10281      this.uploadButton.Name = "uploadButton";
    103       this.uploadButton.Size = new System.Drawing.Size(75, 23);
     82      this.uploadButton.Size = new System.Drawing.Size(110, 23);
    10483      this.uploadButton.TabIndex = 2;
    105       this.uploadButton.Text = "Upload";
     84      this.uploadButton.Text = "Upload plugin";
    10685      this.uploadButton.UseVisualStyleBackColor = true;
    10786      this.uploadButton.Click += new System.EventHandler(this.uploadButton_Click);
    10887      //
     88      // splitContainer
     89      //
     90      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
     91      this.splitContainer.Location = new System.Drawing.Point(0, 0);
     92      this.splitContainer.Name = "splitContainer";
     93      //
     94      // splitContainer.Panel1
     95      //
     96      this.splitContainer.Panel1.Controls.Add(this.label1);
     97      this.splitContainer.Panel1.Controls.Add(this.serverUrlTextBox);
     98      this.splitContainer.Panel1.Controls.Add(this.connectButton);
     99      this.splitContainer.Panel1.Controls.Add(this.listView);
     100      //
     101      // splitContainer.Panel2
     102      //
     103      this.splitContainer.Panel2.Controls.Add(this.tableLayoutPanel);
     104      this.splitContainer.Size = new System.Drawing.Size(852, 494);
     105      this.splitContainer.SplitterDistance = 398;
     106      this.splitContainer.TabIndex = 3;
     107      //
     108      // label1
     109      //
     110      this.label1.AutoSize = true;
     111      this.label1.Location = new System.Drawing.Point(3, 8);
     112      this.label1.Name = "label1";
     113      this.label1.Size = new System.Drawing.Size(98, 13);
     114      this.label1.TabIndex = 5;
     115      this.label1.Text = "Deployment server:";
     116      //
     117      // serverUrlTextBox
     118      //
     119      this.serverUrlTextBox.Location = new System.Drawing.Point(107, 5);
     120      this.serverUrlTextBox.Name = "serverUrlTextBox";
     121      this.serverUrlTextBox.Size = new System.Drawing.Size(107, 20);
     122      this.serverUrlTextBox.TabIndex = 4;
     123      //
     124      // connectButton
     125      //
     126      this.connectButton.Location = new System.Drawing.Point(220, 3);
     127      this.connectButton.Name = "connectButton";
     128      this.connectButton.Size = new System.Drawing.Size(75, 23);
     129      this.connectButton.TabIndex = 3;
     130      this.connectButton.Text = "Connect";
     131      this.connectButton.UseVisualStyleBackColor = true;
     132      this.connectButton.Click += new System.EventHandler(this.connectButton_Click);
     133      //
     134      // tableLayoutPanel
     135      //
     136      this.tableLayoutPanel.ColumnCount = 2;
     137      this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
     138      this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
     139      this.tableLayoutPanel.Controls.Add(this.serverPluginDetailsGroupBox, 1, 0);
     140      this.tableLayoutPanel.Controls.Add(this.localPluginDetailsGroupBox, 0, 0);
     141      this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
     142      this.tableLayoutPanel.Location = new System.Drawing.Point(0, 0);
     143      this.tableLayoutPanel.Name = "tableLayoutPanel";
     144      this.tableLayoutPanel.RowCount = 1;
     145      this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
     146      this.tableLayoutPanel.Size = new System.Drawing.Size(450, 494);
     147      this.tableLayoutPanel.TabIndex = 3;
     148      //
     149      // serverPluginDetailsGroupBox
     150      //
     151      this.serverPluginDetailsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
     152      this.serverPluginDetailsGroupBox.Location = new System.Drawing.Point(228, 3);
     153      this.serverPluginDetailsGroupBox.Name = "serverPluginDetailsGroupBox";
     154      this.serverPluginDetailsGroupBox.Size = new System.Drawing.Size(219, 488);
     155      this.serverPluginDetailsGroupBox.TabIndex = 3;
     156      this.serverPluginDetailsGroupBox.TabStop = false;
     157      this.serverPluginDetailsGroupBox.Text = "Server plugin information";
     158      //
     159      // localPluginDetailsGroupBox
     160      //
     161      this.localPluginDetailsGroupBox.Controls.Add(this.localPluginDetailsPanel);
     162      this.localPluginDetailsGroupBox.Controls.Add(this.uploadButton);
     163      this.localPluginDetailsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
     164      this.localPluginDetailsGroupBox.Location = new System.Drawing.Point(3, 3);
     165      this.localPluginDetailsGroupBox.Name = "localPluginDetailsGroupBox";
     166      this.localPluginDetailsGroupBox.Size = new System.Drawing.Size(219, 488);
     167      this.localPluginDetailsGroupBox.TabIndex = 4;
     168      this.localPluginDetailsGroupBox.TabStop = false;
     169      this.localPluginDetailsGroupBox.Text = "Local plugin information";
     170      //
     171      // localPluginDetailsPanel
     172      //
     173      this.localPluginDetailsPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     174                  | System.Windows.Forms.AnchorStyles.Left)
     175                  | System.Windows.Forms.AnchorStyles.Right)));
     176      this.localPluginDetailsPanel.Location = new System.Drawing.Point(6, 19);
     177      this.localPluginDetailsPanel.Name = "localPluginDetailsPanel";
     178      this.localPluginDetailsPanel.Size = new System.Drawing.Size(207, 434);
     179      this.localPluginDetailsPanel.TabIndex = 3;
     180      //
     181      // serverVersion
     182      //
     183      this.serverVersion.Text = "Server version";
     184      this.serverVersion.Width = 100;
     185      //
    109186      // PluginListView
    110187      //
    111188      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    112189      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    113       this.Controls.Add(this.tableLayoutPanel);
     190      this.Controls.Add(this.splitContainer);
    114191      this.Name = "PluginListView";
    115       this.Size = new System.Drawing.Size(400, 380);
     192      this.Size = new System.Drawing.Size(852, 494);
     193      this.splitContainer.Panel1.ResumeLayout(false);
     194      this.splitContainer.Panel1.PerformLayout();
     195      this.splitContainer.Panel2.ResumeLayout(false);
     196      this.splitContainer.ResumeLayout(false);
    116197      this.tableLayoutPanel.ResumeLayout(false);
    117       this.tableLayoutPanel.PerformLayout();
     198      this.localPluginDetailsGroupBox.ResumeLayout(false);
    118199      this.ResumeLayout(false);
    119200
     
    122203    #endregion
    123204
     205    private System.Windows.Forms.ListView listView;
     206    private System.Windows.Forms.ColumnHeader nameHeader;
     207    private System.Windows.Forms.ColumnHeader localVersion;
     208    private System.Windows.Forms.Button uploadButton;
     209    private System.Windows.Forms.SplitContainer splitContainer;
     210    private System.Windows.Forms.Button connectButton;
     211    private System.Windows.Forms.Label label1;
     212    private System.Windows.Forms.TextBox serverUrlTextBox;
    124213    private System.Windows.Forms.TableLayoutPanel tableLayoutPanel;
    125     private System.Windows.Forms.ListView listView;
    126     private System.Windows.Forms.TextBox detailsTextBox;
    127     private System.Windows.Forms.ColumnHeader nameHeader;
    128     private System.Windows.Forms.ColumnHeader Version;
    129     private System.Windows.Forms.Button uploadButton;
     214    private System.Windows.Forms.GroupBox serverPluginDetailsGroupBox;
     215    private System.Windows.Forms.GroupBox localPluginDetailsGroupBox;
     216    private System.Windows.Forms.Panel localPluginDetailsPanel;
     217    private System.Windows.Forms.ColumnHeader serverVersion;
    130218  }
    131219}
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/PluginListView.cs

    r2804 r2816  
    99using HeuristicLab.MainForm;
    1010using HeuristicLab.PluginInfrastructure;
     11using PluginDeploymentService = HeuristicLab.PluginInfrastructure.Advanced.DeploymentService;
     12using HeuristicLab.PluginInfrastructure.Manager;
     13using System.ServiceModel;
     14using ICSharpCode.SharpZipLib.Zip;
     15using System.IO;
    1116
    1217namespace HeuristicLab.DeploymentService.AdminClient {
    1318  public partial class PluginListView : HeuristicLab.MainForm.WindowsForms.View {
    14     private List<ListViewItem> localPlugins;
    15     private List<ListViewItem> serverPlugins;
     19    private Dictionary<IPluginDescription, PluginDeploymentService.PluginDescription> localAndServerPlugins;
    1620    private BackgroundWorker pluginUploadWorker;
     21    private BackgroundWorker updateServerPluginsWorker;
    1722
    1823    public PluginListView() {
     
    2025      Caption = "Plugins";
    2126
    22       localPlugins = new List<ListViewItem>();
    23       serverPlugins = new List<ListViewItem>();
     27      using (var client = new PluginDeploymentService.UpdateClient()) {
     28        serverUrlTextBox.Text = client.Endpoint.Address.ToString();
     29      }
     30
     31      localAndServerPlugins = new Dictionary<IPluginDescription, PluginDeploymentService.PluginDescription>();
    2432
    2533      pluginUploadWorker = new BackgroundWorker();
     
    2735      pluginUploadWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(pluginUploadWorker_RunWorkerCompleted);
    2836
    29       UpdateLocalPlugins();
     37      updateServerPluginsWorker = new BackgroundWorker();
     38      updateServerPluginsWorker.DoWork += new DoWorkEventHandler(updateServerPluginsWorker_DoWork);
     39      updateServerPluginsWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(updateServerPluginsWorker_RunWorkerCompleted);
     40    }
     41
     42    void updateServerPluginsWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
     43      if (!e.Cancelled && e.Result != null) {
     44        UpdateLocalPlugins();
     45        var plugins = (PluginDeploymentService.PluginDescription[])e.Result;
     46        foreach (var plugin in plugins) {
     47          var matchingLocalPlugin = (from localPlugin in localAndServerPlugins.Keys
     48                                     where localPlugin.Name == plugin.Name
     49                                     where localPlugin.Version == localPlugin.Version
     50                                     select localPlugin).SingleOrDefault();
     51          if (matchingLocalPlugin != null) {
     52            localAndServerPlugins[matchingLocalPlugin] = plugin;
     53          }
     54        }
     55        UpdatePluginList();
     56        OnConnected();
     57      } else {
     58        OnDisconnected();
     59      }
     60      Cursor = Cursors.Default;
     61    }
     62
     63    private void UpdatePluginList() {
     64      listView.Items.Clear();
     65      foreach (var pair in localAndServerPlugins) {
     66        var item = MakeListViewItem(pair.Key);
     67        listView.Items.Add(item);
     68      }
     69    }
     70
     71    void updateServerPluginsWorker_DoWork(object sender, DoWorkEventArgs e) {
     72      try {
     73        using (var client = new PluginDeploymentService.UpdateClient()) {
     74          e.Result = client.GetPlugins();
     75          e.Cancel = false;
     76        }
     77      }
     78      catch (EndpointNotFoundException ex) {
     79        e.Result = null;
     80        e.Cancel = true;
     81      }
     82      catch (FaultException ex) {
     83        e.Result = null;
     84        e.Cancel = true;
     85      }
    3086    }
    3187
     
    3692    void pluginUploadWorker_DoWork(object sender, DoWorkEventArgs e) {
    3793      var selectedPlugins = (IEnumerable<IPluginDescription>)e.Argument;
    38       AdminService.AdminClient adminClient = new HeuristicLab.DeploymentService.AdminClient.AdminService.AdminClient();
    39 
    40       foreach (var plugin in IteratePlugins(selectedPlugins)) {
    41         adminClient.DeployPlugin(MakePluginDescription(plugin), new byte[0]);
    42       }
    43     }
    44 
    45     private HeuristicLab.PluginInfrastructure.PluginUpdateService.PluginDescription MakePluginDescription(IPluginDescription plugin) {
     94      using (PluginDeploymentService.AdminClient adminClient = new PluginDeploymentService.AdminClient()) {
     95
     96        foreach (var plugin in IteratePlugins(selectedPlugins)) {
     97          adminClient.DeployPlugin(MakePluginDescription(plugin), CreateZipPackage(plugin));
     98        }
     99      }
     100    }
     101
     102    private byte[] CreateZipPackage(IPluginDescription plugin) {
     103      using (MemoryStream stream = new MemoryStream()) {
     104        ZipFile zipFile = new ZipFile(stream);
     105        zipFile.BeginUpdate();
     106        foreach (var file in plugin.Files) {
     107          zipFile.Add(file.Name);
     108        }
     109        zipFile.CommitUpdate();
     110        stream.Seek(0, SeekOrigin.Begin);
     111        return stream.GetBuffer();
     112      }
     113    }
     114
     115    private PluginDeploymentService.PluginDescription MakePluginDescription(IPluginDescription plugin) {
    46116      var dependencies = from dep in plugin.Dependencies
    47117                         select MakePluginDescription(dep);
    48       return new HeuristicLab.PluginInfrastructure.PluginUpdateService.PluginDescription(plugin.Name, plugin.Version, dependencies);
     118      if (string.IsNullOrEmpty(plugin.ContactName) || string.IsNullOrEmpty(plugin.ContactEmail)) {
     119        return new PluginDeploymentService.PluginDescription(plugin.Name, plugin.Version, dependencies);
     120      } else return new PluginDeploymentService.PluginDescription(plugin.Name, plugin.Version, dependencies, plugin.ContactName + ", " + plugin.ContactEmail, plugin.LicenseText);
    49121    }
    50122
     
    59131
    60132    public void UpdateLocalPlugins() {
    61       localPlugins.ForEach(x => listView.Items.Remove(x));
    62       localPlugins.Clear();
     133      localAndServerPlugins.Clear();
     134
    63135      foreach (var plugin in ApplicationManager.Manager.Plugins) {
    64         var item = MakeListViewItem(plugin);
    65         item.Group = listView.Groups["Local plugins"];
    66         listView.Items.Add(item);
    67         localPlugins.Add(item);
    68       }
    69     }
    70 
    71     public void UpdateServerPlugins() {
    72       serverPlugins.ForEach(x => listView.Items.Remove(x));
    73       serverPlugins.Clear();
    74       var client = new HeuristicLab.PluginInfrastructure.PluginUpdateService.UpdateClient();
    75       foreach (var plugin in client.GetPlugins()) {
    76         var item = MakeListViewItem(plugin);
    77         item.Group = listView.Groups["Server plugins"];
    78         listView.Items.Add(item);
    79         localPlugins.Add(item);
    80       }
    81     }
    82 
    83     private static ListViewItem MakeListViewItem(HeuristicLab.PluginInfrastructure.PluginUpdateService.PluginDescription plugin) {
    84       ListViewItem item = new ListViewItem(new string[] { plugin.Name, plugin.Version.ToString() });
     136        localAndServerPlugins.Add(plugin, null);
     137      }
     138    }
     139
     140
     141    private ListViewItem MakeListViewItem(IPluginDescription plugin) {
     142      ListViewItem item;
     143      if (localAndServerPlugins[plugin] != null) {
     144        item = new ListViewItem(new string[] { plugin.Name, plugin.Version.ToString(), localAndServerPlugins[plugin].Version.ToString() });
     145      } else {
     146        item = new ListViewItem(new string[] { plugin.Name, plugin.Version.ToString(), string.Empty });
     147      }
    85148      item.Tag = plugin;
    86149      return item;
    87150    }
    88151
    89     private static ListViewItem MakeListViewItem(IPluginDescription plugin) {
    90       ListViewItem item = new ListViewItem(new string[] { plugin.Name, plugin.Version.ToString() });
    91       item.Tag = plugin;
    92       return item;
    93     }
    94 
    95152    private void listView_SelectedIndexChanged(object sender, EventArgs e) {
     153      localPluginDetailsPanel.Controls.Clear();
     154      serverPluginDetailsGroupBox.Controls.Clear();
     155
    96156      if (listView.SelectedItems.Count > 0) {
    97         if (listView.SelectedItems[0].Tag is IPluginDescription) {
    98           var plugin = (IPluginDescription)listView.SelectedItems[0].Tag;
    99           StringBuilder strBuilder = new StringBuilder();
    100 
    101           strBuilder.Append("Name: ").AppendLine(plugin.Name);
    102           strBuilder.Append("Version: ").AppendLine(plugin.Version.ToString());
    103           strBuilder.AppendLine("Files:");
    104           foreach (var file in plugin.Files) {
    105             strBuilder.Append(file.Name + " " + file.Type);
    106           }
    107           strBuilder.AppendLine("Dependencies:");
    108           foreach (var dep in plugin.Dependencies) {
    109             strBuilder.Append(dep.Name + " " + dep.Version);
    110           }
    111           detailsTextBox.Text = strBuilder.ToString();
    112         } else if (listView.SelectedItems[0].Tag is HeuristicLab.PluginInfrastructure.PluginUpdateService.PluginDescription) {
    113           var plugin = (HeuristicLab.PluginInfrastructure.PluginUpdateService.PluginDescription)listView.SelectedItems[0].Tag;
    114           StringBuilder strBuilder = new StringBuilder();
    115 
    116           strBuilder.Append("Name: ").AppendLine(plugin.Name);
    117           strBuilder.Append("Version: ").AppendLine(plugin.Version.ToString());
    118           strBuilder.AppendLine("Dependencies:");
    119           foreach (var dep in plugin.Dependencies) {
    120             strBuilder.Append(dep.Name + " " + dep.Version);
    121           }
    122           detailsTextBox.Text = strBuilder.ToString();
    123         }
    124       } else {
    125         detailsTextBox.Text = string.Empty;
    126       }
     157        var plugin = (IPluginDescription)listView.SelectedItems[0].Tag;
     158        ShowPluginDetails(plugin);
     159      }
     160    }
     161
     162    private void ShowPluginDetails(IPluginDescription plugin) {
     163      var localView = new LocalPluginView(plugin);
     164      var serverView = new ServerPluginView(localAndServerPlugins[plugin]);
     165      localView.Dock = DockStyle.Fill;
     166      serverView.Dock = DockStyle.Fill;
     167      localPluginDetailsPanel.Controls.Add(localView);
     168      serverPluginDetailsGroupBox.Controls.Add(serverView);
    127169    }
    128170
     
    136178      }
    137179    }
     180
     181    private void connectButton_Click(object sender, EventArgs e) {
     182      OnDisconnected();
     183      Cursor = Cursors.AppStarting;
     184      updateServerPluginsWorker.RunWorkerAsync();
     185    }
     186
     187    private void OnConnected() {
     188      connectButton.Enabled = false;
     189      serverUrlTextBox.Enabled = false;
     190      label1.Enabled = false;
     191
     192      listView.Enabled = true;
     193      uploadButton.Enabled = true;
     194    }
     195
     196    private void OnDisconnected() {
     197      connectButton.Enabled = true;
     198      serverUrlTextBox.Enabled = true;
     199      label1.Enabled = true;
     200
     201      localAndServerPlugins.Clear();
     202      listView.Items.Clear();
     203      localPluginDetailsPanel.Controls.Clear();
     204      serverPluginDetailsGroupBox.Controls.Clear();
     205      listView.Enabled = false;
     206      uploadButton.Enabled = false;
     207    }
    138208  }
    139209}
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/ProductEditor.cs

    r2804 r2816  
    88using System.Windows.Forms;
    99using HeuristicLab.MainForm;
    10 using HeuristicLab.PluginInfrastructure;
    11 using UpdateService = HeuristicLab.PluginInfrastructure.PluginUpdateService;
     10using PluginDeploymentService = HeuristicLab.PluginInfrastructure.Advanced.DeploymentService;
    1211
    1312namespace HeuristicLab.DeploymentService.AdminClient {
     
    1514    private BackgroundWorker refreshProductsWorker;
    1615    private BackgroundWorker uploadChangedProductsWorker;
    17     private List<UpdateService.ProductDescription> products;
    18     private List<UpdateService.PluginDescription> plugins;
    19     private HashSet<UpdateService.ProductDescription> dirtyProducts;
     16    private List<PluginDeploymentService.ProductDescription> products;
     17    private List<PluginDeploymentService.PluginDescription> plugins;
     18    private HashSet<PluginDeploymentService.ProductDescription> dirtyProducts;
    2019
    2120    public ProductEditor() {
     
    2322      Caption = "Products";
    2423
    25       dirtyProducts = new HashSet<UpdateService.ProductDescription>();
     24      dirtyProducts = new HashSet<PluginDeploymentService.ProductDescription>();
    2625      refreshProductsWorker = new BackgroundWorker();
    2726      refreshProductsWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(refreshProductsWorker_RunWorkerCompleted);
     
    3433
    3534    void uploadChangedProductsWorker_DoWork(object sender, DoWorkEventArgs e) {
    36       var products = (IEnumerable<UpdateService.ProductDescription>)e.Argument;
    37       using (var adminClient = new AdminService.AdminClient()) {
     35      var products = (IEnumerable<PluginDeploymentService.ProductDescription>)e.Argument;
     36      using (var adminClient = new PluginDeploymentService.AdminClient()) {
    3837        foreach (var product in products) {
    3938          adminClient.DeployProduct(product);
     
    4847
    4948    void refreshProductsWorker_DoWork(object sender, DoWorkEventArgs e) {
    50       var updateClient = new UpdateService.UpdateClient();
     49      var updateClient = new PluginDeploymentService.UpdateClient();
    5150      e.Result = new object[] { updateClient.GetProducts(), updateClient.GetPlugins() };
    5251    }
    5352
    5453    void refreshProductsWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
    55       this.products = new List<UpdateService.ProductDescription>(
    56         (UpdateService.ProductDescription[])((object[])e.Result)[0]);
    57       this.plugins = new List<UpdateService.PluginDescription>(
    58         (UpdateService.PluginDescription[])((object[])e.Result)[1]);
     54      this.products = new List<PluginDeploymentService.ProductDescription>(
     55        (PluginDeploymentService.ProductDescription[])((object[])e.Result)[0]);
     56      this.plugins = new List<PluginDeploymentService.PluginDescription>(
     57        (PluginDeploymentService.PluginDescription[])((object[])e.Result)[1]);
    5958
    6059      UpdateProductsList();
     
    7372    private void productsListBox_SelectedIndexChanged(object sender, EventArgs e) {
    7473      if (productsListBox.SelectedItems.Count == 0) return;
    75       UpdateService.ProductDescription activeProduct = (UpdateService.ProductDescription)((ListViewItem)productsListBox.SelectedItem).Tag;
     74      PluginDeploymentService.ProductDescription activeProduct = (PluginDeploymentService.ProductDescription)((ListViewItem)productsListBox.SelectedItem).Tag;
    7675      UpdateProductDetails(activeProduct);
    7776    }
    7877
    79     private void UpdateProductDetails(UpdateService.ProductDescription activeProduct) {
     78    private void UpdateProductDetails(PluginDeploymentService.ProductDescription activeProduct) {
    8079      nameTextBox.Text = activeProduct.Name;
    8180      versionTextBox.Text = activeProduct.Version.ToString();
    8281
    8382      pluginsList.Items.Clear();
    84       foreach (UpdateService.PluginDescription pluginDesc in plugins) {
     83      foreach (PluginDeploymentService.PluginDescription pluginDesc in plugins) {
    8584        var matching = from p in activeProduct.Plugins
    8685                       where p.Name == pluginDesc.Name
     
    106105
    107106    private void newProductButton_Click(object sender, EventArgs e) {
    108       var newProduct = new UpdateService.ProductDescription("New product", new Version("0.0.0.0"));
     107      var newProduct = new PluginDeploymentService.ProductDescription("New product", new Version("0.0.0.0"));
    109108      ListViewItem item = CreateListViewItem(newProduct);
    110109      productsListBox.Items.Add(item);
     
    112111    }
    113112
    114     private ListViewItem CreateListViewItem(UpdateService.ProductDescription productDescription) {
     113    private ListViewItem CreateListViewItem(PluginDeploymentService.ProductDescription productDescription) {
    115114      ListViewItem item = new ListViewItem();
    116115      item.Text = productDescription.Name + " " + productDescription.Version;
     
    127126    private void nameTextBox_TextChanged(object sender, EventArgs e) {
    128127      ListViewItem activeItem = (ListViewItem)productsListBox.SelectedItem;
    129       UpdateService.ProductDescription activeProduct = (UpdateService.ProductDescription)activeItem.Tag;
     128      PluginDeploymentService.ProductDescription activeProduct = (PluginDeploymentService.ProductDescription)activeItem.Tag;
    130129      if (string.IsNullOrEmpty(nameTextBox.Name)) {
    131130        errorProvider.SetError(nameTextBox, "Invalid value");
     
    140139    private void versionTextBox_TextChanged(object sender, EventArgs e) {
    141140      ListViewItem activeItem = (ListViewItem)productsListBox.SelectedItem;
    142       UpdateService.ProductDescription activeProduct = (UpdateService.ProductDescription)activeItem.Tag;
     141      PluginDeploymentService.ProductDescription activeProduct = (PluginDeploymentService.ProductDescription)activeItem.Tag;
    143142      try {
    144143        activeProduct.Version = new Version(versionTextBox.Text);
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.DeploymentService.AdminClient/app.config

    r2802 r2816  
    22<configuration>
    33    <system.serviceModel>
    4         <bindings>
    5             <wsHttpBinding>
    6                 <binding name="WSHttpBinding_IAdmin" closeTimeout="00:01:00"
    7                     openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
    8                     bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
    9                     maxBufferPoolSize="524288" maxReceivedMessageSize="10000000"
    10                     messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
    11                     allowCookies="false">
    12                     <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="10000000"
    13                         maxBytesPerRead="10000000" maxNameTableCharCount="16384" />
    14                     <reliableSession ordered="true" inactivityTimeout="00:10:00"
    15                         enabled="false" />
    16                     <security mode="Message">
    17                         <transport clientCredentialType="Windows" proxyCredentialType="None"
    18                             realm="" />
    19                         <message clientCredentialType="Windows" negotiateServiceCredential="true"
    20                             algorithmSuite="Default" establishSecurityContext="true" />
    21                     </security>
    22                 </binding>
    23             </wsHttpBinding>
    24         </bindings>
    25         <client>
    26             <endpoint address="http://localhost:8731/Design_Time_Addresses/HeuristicLab.Services.Deployment/Admin/"
    27                 binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IAdmin"
    28                 contract="AdminService.IAdmin" name="WSHttpBinding_IAdmin">
    29                 <identity>
    30                     <dns value="localhost" />
    31                 </identity>
    32             </endpoint>
    33         </client>
     4        <bindings />
     5        <client />
    346    </system.serviceModel>
    357</configuration>
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStoreClasses.dbml

    r2766 r2816  
    1919      <Column Name="Name" Type="System.String" DbType="NVarChar(300) NOT NULL" CanBeNull="false" />
    2020      <Column Name="Version" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
     21      <Column Name="ContactInformation" Type="System.String" DbType="Text" CanBeNull="true" UpdateCheck="Never" />
     22      <Column Name="License" Type="System.String" DbType="Text" CanBeNull="true" UpdateCheck="Never" />
    2123      <Association Name="Plugin_PluginPackage" Member="PluginPackage" ThisKey="Id" OtherKey="PluginId" Type="PluginPackage" Cardinality="One" />
    2224    </Type>
     
    2527    <Type Name="PluginPackage">
    2628      <Column Name="PluginId" Type="System.Int64" DbType="BigInt NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
    27       <Column Name="FileName" Type="System.String" DbType="Text NOT NULL" CanBeNull="false" UpdateCheck="Never" />
    2829      <Column Name="Data" Type="System.Data.Linq.Binary" DbType="Image NOT NULL" CanBeNull="false" UpdateCheck="Never" />
    2930      <Association Name="Plugin_PluginPackage" Member="Plugin" ThisKey="PluginId" OtherKey="Id" Type="Plugin" IsForeignKey="true" />
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStoreClasses.dbml.layout

    r2766 r2816  
    33  <DataContextMoniker Name="/PluginStoreClassesDataContext" />
    44  <nestedChildShapes>
    5     <classShape Id="8eaeae9c-08a1-4be4-b58a-e3bf24f1961b" absoluteBounds="3.5, 2.625, 2, 1.1939925130208335">
     5    <classShape Id="5aa5ddda-9296-44d2-a516-238be9f4719d" absoluteBounds="3.5, 2, 2, 1.1939925130208335">
    66      <DataClassMoniker Name="/PluginStoreClassesDataContext/Dependency" />
    77      <nestedChildShapes>
    8         <elementListCompartment Id="c05168fe-dac9-499f-bf93-2ba4d92d3a81" absoluteBounds="3.515, 3.085, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     8        <elementListCompartment Id="5ca38ac5-5a7e-4c47-a480-0536fec82dcc" absoluteBounds="3.515, 2.46, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    99      </nestedChildShapes>
    1010    </classShape>
    11     <classShape Id="5f1b7d3a-0078-4834-a616-5cf8b1894803" absoluteBounds="3.5, 0.75, 2, 1.1939925130208335">
     11    <classShape Id="a5892850-02a5-4f0c-8b4d-cdc887c495b6" absoluteBounds="3.5, 4, 2, 1.1939925130208344">
    1212      <DataClassMoniker Name="/PluginStoreClassesDataContext/ProductPlugin" />
    1313      <nestedChildShapes>
    14         <elementListCompartment Id="66444473-2d73-4b22-9e6b-c440e2654f3f" absoluteBounds="3.515, 1.21, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     14        <elementListCompartment Id="07b98569-9ca9-4b3f-8829-d57557588cba" absoluteBounds="3.515, 4.46, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    1515      </nestedChildShapes>
    1616    </classShape>
    17     <classShape Id="37f2647d-7364-4f13-a869-2c8ebbc23260" absoluteBounds="0.75, 3.625, 2, 1.3862939453125">
     17    <classShape Id="7c7e406d-95e8-4f00-ab8e-634b7fbbbea5" absoluteBounds="0.75, 2.75, 2, 1.7708968098958335">
    1818      <DataClassMoniker Name="/PluginStoreClassesDataContext/Plugin" />
    1919      <nestedChildShapes>
    20         <elementListCompartment Id="70f53f38-ca24-4ef6-8b0a-f3be78ad76c7" absoluteBounds="0.765, 4.085, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     20        <elementListCompartment Id="25134a80-4bf5-4672-bd9e-6449a7935427" absoluteBounds="0.765, 3.21, 1.9700000000000002, 1.2108968098958333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    2121      </nestedChildShapes>
    2222    </classShape>
    23     <classShape Id="6d0553e8-405a-4315-bc54-7af25f2a415d" absoluteBounds="3.5, 6.625, 2, 1.3862939453125005">
     23    <classShape Id="855904b1-2043-4ccc-951d-2f35df8b6190" absoluteBounds="3.5, 6, 2, 1.1939925130208344">
    2424      <DataClassMoniker Name="/PluginStoreClassesDataContext/PluginPackage" />
    2525      <nestedChildShapes>
    26         <elementListCompartment Id="4bc7352f-2d30-4f49-897e-c741d0a60123" absoluteBounds="3.515, 7.085, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     26        <elementListCompartment Id="25003445-42f3-4db9-8945-6609772da5ec" absoluteBounds="3.515, 6.46, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    2727      </nestedChildShapes>
    2828    </classShape>
    29     <classShape Id="c36a4ae4-62d6-4891-9389-afdef8241ad1" absoluteBounds="0.75, 1.5, 2, 1.3862939453125003">
     29    <classShape Id="cc5365b1-2536-41e1-b69d-c3ab09f01086" absoluteBounds="0.75, 5.875, 2, 1.3862939453125005">
    3030      <DataClassMoniker Name="/PluginStoreClassesDataContext/Product" />
    3131      <nestedChildShapes>
    32         <elementListCompartment Id="ec5480b9-acee-4912-8ea6-a67dbb78a523" absoluteBounds="0.765, 1.96, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     32        <elementListCompartment Id="875bde79-6306-48eb-bcea-c8653ef81ec2" absoluteBounds="0.765, 6.335, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    3333      </nestedChildShapes>
    3434    </classShape>
    35     <associationConnector edgePoints="[(1.75 : 5.0112939453125); (1.75 : 7.31814697265625); (3.5 : 7.31814697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     35    <associationConnector edgePoints="[(2.75 : 4.52089680989583); (3.125 : 4.89589680989583); (3.125 : 6.59699625651042); (3.5 : 6.59699625651042)]" fixedFrom="NotFixed" fixedTo="Algorithm">
    3636      <AssociationMoniker Name="/PluginStoreClassesDataContext/Plugin/Plugin_PluginPackage" />
    3737      <nodes>
    38         <classShapeMoniker Id="37f2647d-7364-4f13-a869-2c8ebbc23260" />
    39         <classShapeMoniker Id="6d0553e8-405a-4315-bc54-7af25f2a415d" />
     38        <classShapeMoniker Id="7c7e406d-95e8-4f00-ab8e-634b7fbbbea5" />
     39        <classShapeMoniker Id="855904b1-2043-4ccc-951d-2f35df8b6190" />
    4040      </nodes>
    4141    </associationConnector>
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment.DataAccess/PluginStoreClasses.designer.cs

    r2766 r2816  
    303303    private string _Version;
    304304   
     305    private string _ContactInformation;
     306   
     307    private string _License;
     308   
    305309    private EntityRef<PluginPackage> _PluginPackage;
    306310   
     
    315319    partial void OnVersionChanging(string value);
    316320    partial void OnVersionChanged();
     321    partial void OnContactInformationChanging(string value);
     322    partial void OnContactInformationChanged();
     323    partial void OnLicenseChanging(string value);
     324    partial void OnLicenseChanged();
    317325    #endregion
    318326   
     
    379387          this.SendPropertyChanged("Version");
    380388          this.OnVersionChanged();
     389        }
     390      }
     391    }
     392   
     393    [Column(Storage="_ContactInformation", DbType="Text", UpdateCheck=UpdateCheck.Never)]
     394    public string ContactInformation
     395    {
     396      get
     397      {
     398        return this._ContactInformation;
     399      }
     400      set
     401      {
     402        if ((this._ContactInformation != value))
     403        {
     404          this.OnContactInformationChanging(value);
     405          this.SendPropertyChanging();
     406          this._ContactInformation = value;
     407          this.SendPropertyChanged("ContactInformation");
     408          this.OnContactInformationChanged();
     409        }
     410      }
     411    }
     412   
     413    [Column(Storage="_License", DbType="Text", UpdateCheck=UpdateCheck.Never)]
     414    public string License
     415    {
     416      get
     417      {
     418        return this._License;
     419      }
     420      set
     421      {
     422        if ((this._License != value))
     423        {
     424          this.OnLicenseChanging(value);
     425          this.SendPropertyChanging();
     426          this._License = value;
     427          this.SendPropertyChanged("License");
     428          this.OnLicenseChanged();
    381429        }
    382430      }
     
    441489    private long _PluginId;
    442490   
    443     private string _FileName;
    444    
    445491    private System.Data.Linq.Binary _Data;
    446492   
     
    453499    partial void OnPluginIdChanging(long value);
    454500    partial void OnPluginIdChanged();
    455     partial void OnFileNameChanging(string value);
    456     partial void OnFileNameChanged();
    457501    partial void OnDataChanging(System.Data.Linq.Binary value);
    458502    partial void OnDataChanged();
     
    485529          this.SendPropertyChanged("PluginId");
    486530          this.OnPluginIdChanged();
    487         }
    488       }
    489     }
    490    
    491     [Column(Storage="_FileName", DbType="Text NOT NULL", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
    492     public string FileName
    493     {
    494       get
    495       {
    496         return this._FileName;
    497       }
    498       set
    499       {
    500         if ((this._FileName != value))
    501         {
    502           this.OnFileNameChanging(value);
    503           this.SendPropertyChanging();
    504           this._FileName = value;
    505           this.SendPropertyChanged("FileName");
    506           this.OnFileNameChanged();
    507531        }
    508532      }
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/PluginDescription.cs

    r2804 r2816  
    77namespace HeuristicLab.Services.Deployment {
    88  [DataContract(Name = "PluginDescription")]
    9   public class PluginDescription  {
     9  public class PluginDescription {
    1010
    1111    [DataMember(Name = "Name")]
     
    2121    }
    2222
     23    [DataMember(Name = "ContactInformation")]
     24    private string contactInformation;
     25    public string ContactInformation {
     26      get { return contactInformation; }
     27    }
     28
     29    [DataMember(Name = "LicenseText")]
     30    private string licenseText;
     31    public string LicenseText {
     32      get { return licenseText; }
     33    }
    2334
    2435    [DataMember(Name = "Dependencies")]
     
    2839    }
    2940
    30     public PluginDescription(string name, Version version, IEnumerable<PluginDescription> dependencies) {
     41    public PluginDescription(string name, Version version, IEnumerable<PluginDescription> dependencies, string contactInformation, string license) {
     42      if (string.IsNullOrEmpty(name)) throw new ArgumentException("name is empty");
     43      if (version == null || dependencies == null || contactInformation == null || license == null) throw new ArgumentNullException();
    3144      this.name = name;
    3245      this.version = version;
    33       this.dependencies = new List<PluginDescription>(dependencies); //.AsReadOnly();
     46      this.dependencies = new List<PluginDescription>(dependencies);
     47      this.licenseText = license;
     48      this.contactInformation = contactInformation;
    3449    }
    3550
     
    3752      : this(name, version, Enumerable.Empty<PluginDescription>()) {
    3853    }
     54
     55    public PluginDescription(string name, Version version, IEnumerable<PluginDescription> dependencies)
     56      : this(name, version, dependencies, string.Empty, string.Empty) {
     57    }
    3958  }
    4059}
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/PluginStore.cs

    r2804 r2816  
    142142
    143143    private void UpdatePlugin(PluginStoreClassesDataContext ctx, Plugin pluginEntity, PluginDescription pluginDescription) {
     144      // update plugin data
     145      pluginEntity.License = pluginDescription.LicenseText;
     146      pluginEntity.ContactInformation = pluginDescription.ContactInformation;
     147     
    144148      // delete cached entry
    145149      if (pluginDescriptions.ContainsKey(pluginEntity)) pluginDescriptions.Remove(pluginEntity);
     
    188192      if (!pluginDescriptions.ContainsKey(plugin)) {
    189193        // no cached description -> create new
    190         var desc = new PluginDescription(plugin.Name, new Version(plugin.Version), from dep in GetDependencies(ctx, plugin)
    191                                                                                    select MakePluginDescription(ctx, dep));
     194        var desc = new PluginDescription(plugin.Name,
     195          new Version(plugin.Version),
     196          from dep in GetDependencies(ctx, plugin)
     197          select MakePluginDescription(ctx, dep),
     198          plugin.ContactInformation ?? string.Empty,
     199          plugin.License ?? string.Empty
     200          );
    192201        pluginDescriptions[plugin] = desc;
    193202      }
     
    199208      plugin.Name = pluginDescription.Name;
    200209      plugin.Version = pluginDescription.Version.ToString();
     210      plugin.ContactInformation = pluginDescription.ContactInformation;
     211      plugin.License = pluginDescription.LicenseText;
    201212      return plugin;
    202213    }
     
    206217      package.Data = pluginPackage;
    207218      package.PluginId = plugin.Id;
    208       package.FileName = string.Empty;
    209219      return package;
    210220    }
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.Deployment/ProductDescription.cs

    r2804 r2816  
    2727
    2828    public ProductDescription(string name, Version version, IEnumerable<PluginDescription> plugins) {
     29      if (string.IsNullOrEmpty(name)) throw new ArgumentException("name is empty");
     30      if (version == null || plugins == null) throw new ArgumentNullException();
    2931      this.name = name;
    3032      this.version = version;
  • branches/DeploymentServer Prototype/HeuristicLab.Services/HeuristicLab.Services.sln

    r2802 r2816  
    33# Visual Studio 2008
    44Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services", "HeuristicLab.Services\HeuristicLab.Services.csproj", "{62D88CDA-264B-4798-B17D-9B5D9C841356}"
    5 EndProject
    6 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.PluginInfrastructure", "HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj", "{94186A6A-5176-4402-AE83-886557B53CCA}"
    7   ProjectSection(ProjectDependencies) = postProject
    8     {30D8C5F1-CD3A-4EC1-907F-430177A03FBE} = {30D8C5F1-CD3A-4EC1-907F-430177A03FBE}
    9   EndProjectSection
    105EndProject
    116Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Deployment", "HeuristicLab.Services.Deployment\HeuristicLab.Services.Deployment.csproj", "{30D8C5F1-CD3A-4EC1-907F-430177A03FBE}"
     
    4237    {62D88CDA-264B-4798-B17D-9B5D9C841356}.Release|x64.ActiveCfg = Release|Any CPU
    4338    {62D88CDA-264B-4798-B17D-9B5D9C841356}.Release|x86.ActiveCfg = Release|Any CPU
    44     {94186A6A-5176-4402-AE83-886557B53CCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    45     {94186A6A-5176-4402-AE83-886557B53CCA}.Debug|Any CPU.Build.0 = Debug|Any CPU
    46     {94186A6A-5176-4402-AE83-886557B53CCA}.Debug|x64.ActiveCfg = Debug|x64
    47     {94186A6A-5176-4402-AE83-886557B53CCA}.Debug|x64.Build.0 = Debug|x64
    48     {94186A6A-5176-4402-AE83-886557B53CCA}.Debug|x86.ActiveCfg = Debug|x86
    49     {94186A6A-5176-4402-AE83-886557B53CCA}.Debug|x86.Build.0 = Debug|x86
    50     {94186A6A-5176-4402-AE83-886557B53CCA}.Release|Any CPU.ActiveCfg = Release|Any CPU
    51     {94186A6A-5176-4402-AE83-886557B53CCA}.Release|Any CPU.Build.0 = Release|Any CPU
    52     {94186A6A-5176-4402-AE83-886557B53CCA}.Release|x64.ActiveCfg = Release|x64
    53     {94186A6A-5176-4402-AE83-886557B53CCA}.Release|x64.Build.0 = Release|x64
    54     {94186A6A-5176-4402-AE83-886557B53CCA}.Release|x86.ActiveCfg = Release|x86
    55     {94186A6A-5176-4402-AE83-886557B53CCA}.Release|x86.Build.0 = Release|x86
    5639    {30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    5740    {30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
Note: See TracChangeset for help on using the changeset viewer.