Changeset 5266
- Timestamp:
- 01/10/11 14:35:08 (14 years ago)
- 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 265 265 data.PluginId = guid; 266 266 data.Data = File.ReadAllBytes(file.Name); 267 data.FileName = file.Name; 267 268 pluginDatas.Add(data); 268 269 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/PluginCache.cs
r5156 r5266 179 179 } 180 180 } 181 File.WriteAllBytes(Path.Combine(PluginCacheDir, Path.GetFileName( pluginDescription.Name)), updateablePlugin.Data);181 File.WriteAllBytes(Path.Combine(PluginCacheDir, Path.GetFileName(updateablePlugin.FileName)), updateablePlugin.Data); 182 182 } 183 183 //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 32 32 [DataMember] 33 33 public byte[] Data { get; set; } 34 34 [DataMember] 35 public String FileName { get; set; } 36 37 35 38 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; 38 45 } 39 46 public override IDeepCloneable Clone(Cloner cloner) { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Convert.cs
r5106 r5266 20 20 #endregion 21 21 22 using System .Collections.Generic;22 using System; 23 23 using System.Data.Linq; 24 24 using System.Linq; 25 25 using DT = HeuristicLab.Services.Hive.Common.DataTransfer; 26 using System;27 26 28 27 namespace HeuristicLab.Services.Hive.DataAccess { … … 127 126 public static DT.PluginData ToDto(PluginData source) { 128 127 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 }; 130 129 } 131 130 public static PluginData ToEntity(DT.PluginData source) { … … 137 136 if ((source != null) && (target != null)) { 138 137 target.PluginId = source.PluginId; target.Data = new Binary(source.Data); 138 target.FileName = target.FileName; 139 139 } 140 140 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDataContext.dbml
r5106 r5266 34 34 <Column Name="ParentResourceId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" /> 35 35 <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" /> 36 37 <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" />38 38 <Association Name="Resource_Resource" Member="ParentResource" ThisKey="ParentResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" /> 39 39 <Type Name="Slave" InheritanceCode="Slave" IsInheritanceDefault="true"> … … 111 111 <Column Name="PluginId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" /> 112 112 <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" /> 113 114 <Association Name="Plugin_PluginData" Member="Plugin" ThisKey="PluginId" OtherKey="PluginId" Type="Plugin" IsForeignKey="true" /> 114 115 </Type> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDataContext.dbml.layout
r5155 r5266 57 57 </nestedChildShapes> 58 58 </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"> 60 60 <nodes> 61 61 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" /> … … 63 63 </nodes> 64 64 </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"> 66 66 <nodes> 67 67 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" /> … … 69 69 </nodes> 70 70 </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"> 72 72 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedResource" /> 73 73 <nodes> … … 76 76 </nodes> 77 77 </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"> 79 79 <AssociationMoniker Name="/HiveDataContext/Job/Job_AssignedResource" /> 80 80 <nodes> … … 83 83 </nodes> 84 84 </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"> 86 86 <AssociationMoniker Name="/HiveDataContext/Job/Job_RequiredPlugin" /> 87 87 <nodes> … … 97 97 </nodes> 98 98 </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"> 100 100 <AssociationMoniker Name="/HiveDataContext/Slave/Slave_Job" /> 101 101 <nodes> … … 104 104 </nodes> 105 105 </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"> 107 107 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_UptimeCalendar" /> 108 108 <nodes> … … 111 111 </nodes> 112 112 </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"> 114 114 <AssociationMoniker Name="/HiveDataContext/Job/Job_HiveExperiment" /> 115 115 <nodes> … … 118 118 </nodes> 119 119 </associationConnector> 120 <classShape Id="6bc13f26-f9a8-4597-b054-35be34190d12" absoluteBounds="4.125, 1, 2, 1.386293945312 4996">120 <classShape Id="6bc13f26-f9a8-4597-b054-35be34190d12" absoluteBounds="4.125, 1, 2, 1.3862939453125"> 121 121 <DataClassMoniker Name="/HiveDataContext/JobData" /> 122 122 <nestedChildShapes> … … 124 124 </nestedChildShapes> 125 125 </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"> 127 127 <DataClassMoniker Name="/HiveDataContext/PluginData" /> 128 128 <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" /> 130 130 </nestedChildShapes> 131 131 </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"> 133 133 <AssociationMoniker Name="/HiveDataContext/Plugin/Plugin_PluginData" /> 134 134 <nodes> … … 144 144 </nodes> 145 145 </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"> 147 147 <AssociationMoniker Name="/HiveDataContext/Plugin/Plugin_RequiredPlugin" /> 148 148 <nodes> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDataContext.designer.cs
r5264 r5266 2393 2393 private System.Data.Linq.Binary _Data; 2394 2394 2395 private string _FileName; 2396 2395 2397 public PluginData() 2396 2398 { … … 2425 2427 { 2426 2428 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; 2427 2445 } 2428 2446 }
Note: See TracChangeset
for help on using the changeset viewer.