Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/10/11 14:35:08 (13 years ago)
Author:
ascheibe
Message:

#1233 added FileName to PluginData

Location:
branches/HeuristicLab.Hive-3.4/sources
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/Mocks/MockHiveService.cs

    r5157 r5266  
    265265              data.PluginId = guid;
    266266              data.Data = File.ReadAllBytes(file.Name);
     267              data.FileName = file.Name;
    267268              pluginDatas.Add(data);
    268269            }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/PluginCache.cs

    r5156 r5266  
    179179              }
    180180            }
    181             File.WriteAllBytes(Path.Combine(PluginCacheDir, Path.GetFileName(pluginDescription.Name)), updateablePlugin.Data);
     181            File.WriteAllBytes(Path.Combine(PluginCacheDir, Path.GetFileName(updateablePlugin.FileName)), updateablePlugin.Data);
    182182          }
    183183          //TODO: error handling on pluginDescription, should be found
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/PluginData.cs

    r4905 r5266  
    3232    [DataMember]
    3333    public byte[] Data { get; set; }
    34    
     34    [DataMember]
     35    public String FileName { get; set; }
     36
     37
    3538    public PluginData() { }
    36     protected PluginData(PluginData original, Cloner cloner) : base(original, cloner) {
    37       if (original.Data != null) this.Data = new byte[original.Data.Length]; Array.Copy(original.Data, this.Data, original.Data.Length);
     39    protected PluginData(PluginData original, Cloner cloner)
     40      : base(original, cloner) {
     41      if (original.Data != null)
     42        this.Data = new byte[original.Data.Length];
     43      Array.Copy(original.Data, this.Data, original.Data.Length);
     44      this.FileName = original.FileName;
    3845    }
    3946    public override IDeepCloneable Clone(Cloner cloner) {
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Convert.cs

    r5106 r5266  
    2020#endregion
    2121
    22 using System.Collections.Generic;
     22using System;
    2323using System.Data.Linq;
    2424using System.Linq;
    2525using DT = HeuristicLab.Services.Hive.Common.DataTransfer;
    26 using System;
    2726
    2827namespace HeuristicLab.Services.Hive.DataAccess {
     
    127126    public static DT.PluginData ToDto(PluginData source) {
    128127      if (source == null) return null;
    129       return new DT.PluginData { PluginId = source.PluginId, Data = source.Data.ToArray() };
     128      return new DT.PluginData { PluginId = source.PluginId, Data = source.Data.ToArray(), FileName = source.FileName };
    130129    }
    131130    public static PluginData ToEntity(DT.PluginData source) {
     
    137136      if ((source != null) && (target != null)) {
    138137        target.PluginId = source.PluginId; target.Data = new Binary(source.Data);
     138        target.FileName = target.FileName;
    139139      }
    140140    }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDataContext.dbml

    r5106 r5266  
    3434      <Column Name="ParentResourceId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
    3535      <Association Name="Resource_AssignedResource" Member="AssignedResources" ThisKey="ResourceId" OtherKey="ResourceId" Type="AssignedResource" />
     36      <Association Name="Resource_Resource" Member="ChildResources" ThisKey="ResourceId" OtherKey="ParentResourceId" Type="Resource" />
    3637      <Association Name="Resource_UptimeCalendar" Member="UptimeCalendars" ThisKey="ResourceId" OtherKey="ResourceId" Type="UptimeCalendar" />
    37       <Association Name="Resource_Resource" Member="ChildResources" ThisKey="ResourceId" OtherKey="ParentResourceId" Type="Resource" />
    3838      <Association Name="Resource_Resource" Member="ParentResource" ThisKey="ParentResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" />
    3939      <Type Name="Slave" InheritanceCode="Slave" IsInheritanceDefault="true">
     
    111111      <Column Name="PluginId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
    112112      <Column Name="Data" Type="System.Data.Linq.Binary" DbType="VarBinary(MAX) NOT NULL" CanBeNull="false" UpdateCheck="Never" />
     113      <Column Name="FileName" Type="System.String" DbType="VarChar(MAX)" CanBeNull="false" />
    113114      <Association Name="Plugin_PluginData" Member="Plugin" ThisKey="PluginId" OtherKey="PluginId" Type="Plugin" IsForeignKey="true" />
    114115    </Type>
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDataContext.dbml.layout

    r5155 r5266  
    5757      </nestedChildShapes>
    5858    </classShape>
    59     <inheritanceConnector edgePoints="[(11.25 : 1.78929768880208); (10.875 : 1.78929768880208)]" fixedFrom="Algorithm" fixedTo="Algorithm" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
     59    <inheritanceConnector edgePoints="[(11.25 : 1.78929768880208); (10.875 : 1.78929768880208)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
    6060      <nodes>
    6161        <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" />
     
    6363      </nodes>
    6464    </inheritanceConnector>
    65     <inheritanceConnector edgePoints="[(13.25 : 1.40469482421875); (13.5 : 1.40469482421875)]" fixedFrom="Algorithm" fixedTo="Algorithm" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
     65    <inheritanceConnector edgePoints="[(13.25 : 1.40469482421875); (13.5 : 1.40469482421875)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
    6666      <nodes>
    6767        <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" />
     
    6969      </nodes>
    7070    </inheritanceConnector>
    71     <associationConnector edgePoints="[(12.25 : 2.57859537760417); (12.25 : 4.44314697265625); (10.875 : 4.44314697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     71    <associationConnector edgePoints="[(12.25 : 2.57859537760417); (12.25 : 4.44314697265625); (10.875 : 4.44314697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    7272      <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedResource" />
    7373      <nodes>
     
    7676      </nodes>
    7777    </associationConnector>
    78     <associationConnector edgePoints="[(8.5 : 4.12580485026042); (8.875 : 4.12580485026042)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     78    <associationConnector edgePoints="[(8.5 : 4.12580485026042); (8.875 : 4.12580485026042)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    7979      <AssociationMoniker Name="/HiveDataContext/Job/Job_AssignedResource" />
    8080      <nodes>
     
    8383      </nodes>
    8484    </associationConnector>
    85     <associationConnector edgePoints="[(7.1210551923077 : 4.50160970052083); (7.1210551923077 : 5.5)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     85    <associationConnector edgePoints="[(7.1210551923077 : 4.50160970052083); (7.1210551923077 : 5.5)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    8686      <AssociationMoniker Name="/HiveDataContext/Job/Job_RequiredPlugin" />
    8787      <nodes>
     
    9797      </nodes>
    9898    </associationConnector>
    99     <associationConnector edgePoints="[(8.875 : 2.17390055338542); (8.5 : 2.17390055338542)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     99    <associationConnector edgePoints="[(8.875 : 2.17390055338542); (8.5 : 2.17390055338542)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    100100      <AssociationMoniker Name="/HiveDataContext/Slave/Slave_Job" />
    101101      <nodes>
     
    104104      </nodes>
    105105    </associationConnector>
    106     <associationConnector edgePoints="[(12.781252 : 2.57859537760417); (12.781252 : 3.54212367513021); (13.5 : 3.54212367513021)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     106    <associationConnector edgePoints="[(12.781252 : 2.57859537760417); (12.781252 : 3.54212367513021); (13.5 : 3.54212367513021)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    107107      <AssociationMoniker Name="/HiveDataContext/Resource/Resource_UptimeCalendar" />
    108108      <nodes>
     
    111111      </nodes>
    112112    </associationConnector>
    113     <associationConnector edgePoints="[(6.5 : 3.56330485026042); (6.125 : 3.56330485026042)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     113    <associationConnector edgePoints="[(6.5 : 3.56330485026042); (6.125 : 3.56330485026042)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    114114      <AssociationMoniker Name="/HiveDataContext/Job/Job_HiveExperiment" />
    115115      <nodes>
     
    118118      </nodes>
    119119    </associationConnector>
    120     <classShape Id="6bc13f26-f9a8-4597-b054-35be34190d12" absoluteBounds="4.125, 1, 2, 1.3862939453124996">
     120    <classShape Id="6bc13f26-f9a8-4597-b054-35be34190d12" absoluteBounds="4.125, 1, 2, 1.3862939453125">
    121121      <DataClassMoniker Name="/HiveDataContext/JobData" />
    122122      <nestedChildShapes>
     
    124124      </nestedChildShapes>
    125125    </classShape>
    126     <classShape Id="ad25bd0f-80e8-4a06-abd8-190eb678eec7" absoluteBounds="11.375, 5.5, 2, 1.1939925130208344">
     126    <classShape Id="ad25bd0f-80e8-4a06-abd8-190eb678eec7" absoluteBounds="11.375, 5.5, 2, 1.3862939453124996">
    127127      <DataClassMoniker Name="/HiveDataContext/PluginData" />
    128128      <nestedChildShapes>
    129         <elementListCompartment Id="acddb513-7de6-4bb4-8335-d6982fb2ef35" absoluteBounds="11.39, 5.9600000000000009, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     129        <elementListCompartment Id="acddb513-7de6-4bb4-8335-d6982fb2ef35" absoluteBounds="11.39, 5.9600000000000009, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    130130      </nestedChildShapes>
    131131    </classShape>
    132     <associationConnector edgePoints="[(11 : 6.09699625651042); (11.375 : 6.09699625651042)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     132    <associationConnector edgePoints="[(11 : 6.19314697265625); (11.375 : 6.19314697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    133133      <AssociationMoniker Name="/HiveDataContext/Plugin/Plugin_PluginData" />
    134134      <nodes>
     
    144144      </nodes>
    145145    </associationConnector>
    146     <associationConnector edgePoints="[(9 : 6.19314697265625); (8.5 : 6.19314697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     146    <associationConnector edgePoints="[(9 : 6.19314697265625); (8.5 : 6.19314697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    147147      <AssociationMoniker Name="/HiveDataContext/Plugin/Plugin_RequiredPlugin" />
    148148      <nodes>
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDataContext.designer.cs

    r5264 r5266  
    23932393    private System.Data.Linq.Binary _Data;
    23942394   
     2395    private string _FileName;
     2396   
    23952397    public PluginData()
    23962398    {
     
    24252427        {
    24262428          this._Data = value;
     2429        }
     2430      }
     2431    }
     2432   
     2433    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileName", DbType="VarChar(MAX)", CanBeNull=false)]
     2434    public string FileName
     2435    {
     2436      get
     2437      {
     2438        return this._FileName;
     2439      }
     2440      set
     2441      {
     2442        if ((this._FileName != value))
     2443        {
     2444          this._FileName = value;
    24272445        }
    24282446      }
Note: See TracChangeset for help on using the changeset viewer.