Changeset 4133 for branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3
- Timestamp:
- 08/02/10 17:27:24 (14 years ago)
- Location:
- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3
- Files:
-
- 1 added
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/AppointmentDto.cs
r3022 r4133 5 5 using System.Runtime.Serialization; 6 6 using HeuristicLab.DataAccess; 7 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 7 8 8 9 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 9 10 11 [StorableClass] 10 12 [DataContract] 11 13 public class AppointmentDto: PersistableObject { 14 [Storable] 12 15 [DataMember] 13 16 public DateTime StartDate { get; set; } 17 [Storable] 14 18 [DataMember] 15 19 public DateTime EndDate { get; set; } 20 [Storable] 16 21 [DataMember] 17 22 public bool AllDayEvent { get; set; } 23 [Storable] 18 24 [DataMember] 19 25 public bool Recurring { get; set; } 26 [Storable] 20 27 [DataMember] 21 28 public Guid RecurringId { get; set; } 29 [Storable] 22 30 [DataMember] 23 31 public Guid ResourceId { get; set; } 32 33 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 34 AppointmentDto clone = (AppointmentDto)base.Clone(cloner); 35 clone.AllDayEvent = this.AllDayEvent; 36 clone.EndDate = this.EndDate; 37 clone.Recurring = this.Recurring; 38 clone.RecurringId = this.RecurringId; 39 clone.ResourceId = this.ResourceId; 40 clone.StartDate = this.StartDate; 41 return clone; 42 } 24 43 } 25 44 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/CachedHivePluginInfoDto.cs
r4042 r4133 23 23 using System.Collections.Generic; 24 24 using System.Text; 25 using System.Linq; 25 26 using HeuristicLab.Hive.Contracts.BusinessObjects; 26 27 using System.Runtime.Serialization; 27 28 using HeuristicLab.PluginInfrastructure.Manager; 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 30 29 31 namespace HeuristicLab.PluginInfrastructure { 32 [StorableClass] 30 33 [DataContract] 31 34 [Serializable] … … 35 38 /// stores the plugin files in a list of byte arrays 36 39 /// </summary> 40 [Storable] 37 41 [DataMember] 38 42 public List<HivePluginFile> PluginFiles { get; set; } … … 41 45 PluginFiles = new List<HivePluginFile>(); 42 46 } 47 48 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 49 CachedHivePluginInfoDto clone = (CachedHivePluginInfoDto) base.Clone(cloner); 50 clone.PluginFiles = (from p in this.PluginFiles 51 select (HivePluginFile)cloner.Clone(p)).ToList(); 52 return clone; 53 } 43 54 } 44 55 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ClientConfigDto.cs
r3011 r4133 26 26 using System.Runtime.Serialization; 27 27 using HeuristicLab.DataAccess; 28 using HeuristicLab.Common; 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 30 29 31 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 30 32 [StorableClass] 31 33 [DataContract] 32 34 [Serializable] 33 public class ClientConfigDto : PersistableObject { 35 public class ClientConfigDto : PersistableObject, IDeepCloneable { 36 [Storable] 34 37 [DataMember] 35 38 public String UpDownTimeCalendar { get; set; } 39 [Storable] 36 40 [DataMember] 37 41 public int? HeartBeatIntervall { get; set; } 42 43 public override IDeepCloneable Clone(Cloner cloner) { 44 ClientConfigDto clone = (ClientConfigDto)base.Clone(cloner); 45 clone.UpDownTimeCalendar = this.UpDownTimeCalendar; 46 clone.HeartBeatIntervall = this.HeartBeatIntervall; 47 return clone; 48 } 38 49 } 39 50 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ClientDto.cs
r4116 r4133 25 25 using System.Text; 26 26 using System.Runtime.Serialization; 27 using HeuristicLab.Common; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 29 28 30 namespace HeuristicLab.Hive.Contracts.BusinessObjects { … … 31 33 public enum CalendarState { Fetch, ForceFetch, Fetching, Fetched, NotAllowedToFetch }; 32 34 35 [StorableClass] 33 36 [DataContract] 34 37 [Serializable] 35 38 public class ClientDto : ResourceDto { 39 [Storable] 36 40 [DataMember] 37 41 public int NrOfCores { get; set; } 42 [Storable] 38 43 [DataMember] 39 44 public int NrOfFreeCores { get; set; } 45 [Storable] 40 46 [DataMember] 41 47 public int? CpuSpeedPerCore { get; set; } 48 [Storable] 42 49 [DataMember] 43 50 public int Memory { get; set; } 51 [Storable] 44 52 [DataMember] 45 53 public int FreeMemory { get; set; } 54 [Storable] 46 55 [DataMember] 47 56 public DateTime? Login { get; set; } 57 [Storable] 48 58 [DataMember] 49 59 public State State { get; set; } 60 [Storable] 50 61 [DataMember] 51 62 public CalendarState CalendarSyncStatus { get; set; } 63 [Storable] 52 64 [DataMember] 53 65 public ClientConfigDto Config { get; set; } … … 56 68 return base.ToString() + ", NrOfCores: " + NrOfCores + ", NrOfFreeCores " + NrOfFreeCores + ", Login: " + Login + ", State: " + State; 57 69 } 70 71 public override IDeepCloneable Clone(Cloner cloner) { 72 ClientDto clone = (ClientDto)base.Clone(cloner); 73 clone.CalendarSyncStatus = this.CalendarSyncStatus; 74 clone.Config = (ClientConfigDto)cloner.Clone(this.Config); 75 clone.CpuSpeedPerCore = this.CpuSpeedPerCore; 76 clone.FreeMemory = this.FreeMemory; 77 clone.Login = this.Login; 78 clone.Memory = this.Memory; 79 clone.NrOfCores = this.NrOfCores; 80 clone.NrOfFreeCores = this.NrOfFreeCores; 81 clone.State = this.State; 82 return clone; 83 } 58 84 } 59 85 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ClientGroupDto.cs
r3011 r4133 25 25 using System.Text; 26 26 using System.Runtime.Serialization; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 28 28 29 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 29 30 31 [StorableClass] 30 32 [DataContract] 31 33 public class ClientGroupDto : ResourceDto { 34 [Storable] 32 35 [DataMember] 33 36 public List<ResourceDto> Resources { get; set; } … … 36 39 Resources = new List<ResourceDto>(); 37 40 } 41 42 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 43 ClientGroupDto clone = (ClientGroupDto) base.Clone(cloner); 44 clone.Resources = (from r in this.Resources 45 select (ResourceDto)cloner.Clone(r)).ToList(); 46 return clone; 47 } 38 48 } 39 49 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/HivePluginFile.cs
r4042 r4133 4 4 using System.Text; 5 5 using System.Runtime.Serialization; 6 using HeuristicLab.Common; 7 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 6 8 7 9 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 10 [StorableClass] 8 11 [Serializable] 9 12 [DataContract] 10 public class HivePluginFile { 13 public class HivePluginFile : IDeepCloneable { 14 [Storable] 11 15 [DataMember] 12 16 public byte[] BinaryFile { get; set; } 17 [Storable] 13 18 [DataMember] 14 19 public String Name { get; set; } … … 18 23 Name = name; 19 24 } 25 26 public virtual IDeepCloneable Clone(Cloner cloner) { 27 HivePluginFile clone = (HivePluginFile)Activator.CreateInstance(this.GetType(), true); 28 cloner.RegisterClonedObject(this, clone); 29 clone.Name = this.Name; 30 if (this.BinaryFile != null) { 31 clone.BinaryFile = new byte[this.BinaryFile.Length]; 32 Array.Copy(this.BinaryFile, clone.BinaryFile, this.BinaryFile.Length); 33 } 34 return clone; 35 } 36 37 public object Clone() { 38 return Clone(new Cloner()); 39 } 20 40 } 21 41 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/HivePluginInfoDto.cs
r4119 r4133 27 27 using HeuristicLab.DataAccess; 28 28 using HeuristicLab.PluginInfrastructure; 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 30 30 31 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 31 32 [StorableClass] 32 33 [DataContract] 33 34 [Serializable] 34 35 public class HivePluginInfoDto : PersistableObject { 36 [Storable] 35 37 [DataMember] 36 38 public String Name { get; set; } … … 39 41 public Version Version { get; set; } 40 42 43 // helper-variable to be able to persist version 44 [Storable] 45 private string storableVersion; 46 47 public HivePluginInfoDto() { } 48 49 public HivePluginInfoDto(bool deserializing) : base(deserializing) { } 50 51 [StorableHook(HookType.BeforeSerialization)] 52 private void BeforeSerialization() { 53 this.storableVersion = Version.ToString(); 54 } 55 56 [StorableHook(HookType.AfterDeserialization)] 57 private void AfterDeserialization() { 58 int[] parts = this.storableVersion.Split('.').Select(s => int.Parse(s)).ToArray(); 59 this.Version = new Version(parts[0], parts[1], parts[2], parts[3]); 60 } 61 62 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 63 HivePluginInfoDto clone = (HivePluginInfoDto) base.Clone(cloner); 64 clone.Name = this.Name; 65 clone.Version = (Version)this.Version.Clone(); 66 return clone; 67 } 41 68 } 42 69 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobDto.cs
r3578 r4133 25 25 using System.Text; 26 26 using System.Runtime.Serialization; 27 using HeuristicLab.Common; 27 28 using HeuristicLab.DataAccess; 28 29 using HeuristicLab.PluginInfrastructure; 30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 31 30 32 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 31 33 34 [StorableClass] 32 35 [DataContract] 33 36 [Serializable] 34 37 public class JobDto : PersistableObject { 38 [Storable] 35 39 [DataMember] 36 40 public State State { get; set; } 41 [Storable] 37 42 [DataMember] 38 43 public Guid UserId { get; set; } 44 [Storable] 39 45 [DataMember] 40 46 public ClientDto Client { get; set; } 47 [Storable] 41 48 [DataMember] 42 49 public JobDto ParentJob { get; set; } 50 [Storable] 43 51 [DataMember] 44 52 public double? Percentage { get; set; } 53 [Storable] 45 54 [DataMember] 46 55 public DateTime? DateCreated { get; set; } 56 [Storable] 47 57 [DataMember] 48 58 public DateTime? DateCalculated { get; set; } 59 [Storable] 49 60 [DataMember] 50 61 public DateTime? DateFinished { get; set; } 62 [Storable] 51 63 [DataMember] 52 64 public int Priority { get; set; } 65 [Storable] 53 66 [DataMember] 54 67 public int CoresNeeded { get; set; } 68 [Storable] 55 69 [DataMember] 56 70 public int MemoryNeeded { get; set; } 71 [Storable] 57 72 [DataMember] 58 73 public List<HivePluginInfoDto> PluginsNeeded { get; set; } 74 [Storable] 59 75 [DataMember] 60 76 public List<Guid> AssignedResourceIds { get; set; } 77 [Storable] 61 78 [DataMember] 62 79 public ProjectDto Project { get; set; } … … 71 88 AssignedResourceIds = new List<Guid>(); 72 89 } 90 91 public override IDeepCloneable Clone(Cloner cloner) { 92 JobDto clone = (JobDto)base.Clone(cloner); 93 clone.Id = this.Id; 94 clone.AssignedResourceIds = new List<Guid>(this.AssignedResourceIds); 95 clone.Client = (ClientDto)cloner.Clone(this.Client); 96 clone.CoresNeeded = this.CoresNeeded; 97 clone.DateCalculated = this.DateCalculated; 98 clone.DateCreated = this.DateCreated; 99 clone.DateFinished = this.DateFinished; 100 clone.Id = this.Id; 101 clone.MemoryNeeded = this.MemoryNeeded; 102 clone.ParentJob = (JobDto)cloner.Clone(this.ParentJob); 103 clone.Percentage = this.Percentage; 104 clone.PluginsNeeded = (from p in this.PluginsNeeded 105 select (HivePluginInfoDto)cloner.Clone(p)).ToList(); 106 clone.Priority = this.Priority; 107 clone.Project = (ProjectDto)cloner.Clone(this.Project); 108 clone.State = this.State; 109 clone.UserId = this.UserId; 110 return clone; 111 } 73 112 } 74 113 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobResult.cs
r2099 r4133 26 26 using System.Runtime.Serialization; 27 27 using HeuristicLab.DataAccess; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 29 30 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 30 31 32 // [chn] Where are those JobResults used? would it make sense to use it instead of JobDto for querying Job-Status? Probably yes 33 // ask gradinger 34 [StorableClass] 31 35 [DataContract] 32 36 [Serializable] 33 37 public class JobResult : PersistableObject { 38 [Storable] 34 39 [DataMember] 35 40 public Guid JobId { get; set; } 41 [Storable] 36 42 [DataMember] 37 43 public double Percentage { get; set; } 44 [Storable] 38 45 [DataMember] 39 46 public DateTime Timestamp { get; set; } 47 [Storable] 40 48 [DataMember] 41 49 public Guid ClientId { get; set; } 50 [Storable] 42 51 [DataMember] 43 52 public Exception Exception { get; set; } 53 [Storable] 44 54 [DataMember] 45 55 public DateTime DateFinished { get; set; } 56 57 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 58 JobResult clone = (JobResult) base.Clone(cloner); 59 clone.ClientId = this.ClientId; 60 clone.DateFinished = this.DateFinished; 61 throw new NotImplementedException("Exception kann nicht serialisiert werden, deshalb irgendwie wrappen... oder nur message (+stacktrace, ...?) speichern"); 62 clone.Exception = this.Exception; 63 clone.JobId = this.JobId; 64 clone.Percentage = this.Percentage; 65 clone.Timestamp = this.Timestamp; 66 return clone; 67 } 46 68 } 47 69 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ProjectDto.cs
r3011 r4133 27 27 using HeuristicLab.DataAccess; 28 28 using HeuristicLab.PluginInfrastructure; 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 30 30 31 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 31 32 [StorableClass] 32 33 [DataContract] 33 34 [Serializable] 34 35 public class ProjectDto : PersistableObject { 36 [Storable] 35 37 [DataMember] 36 38 public String Name { get; set; } 39 40 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 41 ProjectDto clone = (ProjectDto) base.Clone(cloner); 42 clone.Name = this.Name; 43 return clone; 44 } 37 45 } 38 46 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ResourceDto.cs
r3011 r4133 26 26 using System.Runtime.Serialization; 27 27 using HeuristicLab.DataAccess; 28 using HeuristicLab.Common; 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 30 29 31 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 30 32 [StorableClass] 31 33 [DataContract] 32 34 [Serializable] 33 public class ResourceDto : PersistableObject { 35 public class ResourceDto : PersistableObject, IDeepCloneable { 36 [Storable] 34 37 [DataMember] 35 38 public string Name { get; set; } … … 38 41 return Id + " " + Name; 39 42 } 43 44 public virtual IDeepCloneable Clone(Cloner cloner) { 45 ResourceDto clone = (ResourceDto)base.Clone(cloner); 46 clone.Name = this.Name; 47 return clone; 48 } 40 49 } 41 50 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/SerializedJob.cs
r3011 r4133 25 25 using System.Text; 26 26 using System.Runtime.Serialization; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Common; 27 29 28 30 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 31 [StorableClass] 29 32 [DataContract] 30 33 [Serializable] 31 public class SerializedJob { 34 public class SerializedJob : IDeepCloneable { 35 [Storable] 32 36 [DataMember] 33 37 public JobDto JobInfo { get; set; } 34 38 [Storable] 35 39 [DataMember] 36 40 public byte[] SerializedJobData { get; set; } 41 42 public virtual IDeepCloneable Clone(Cloner cloner) { 43 SerializedJob clone = (SerializedJob)Activator.CreateInstance(this.GetType(), true); 44 cloner.RegisterClonedObject(this, clone); 45 clone.JobInfo = (JobDto)cloner.Clone(this.JobInfo); 46 clone.SerializedJobData = new byte[this.SerializedJobData.Length]; 47 Array.Copy(this.SerializedJobData, clone.SerializedJobData, this.SerializedJobData.Length); 48 return clone; 49 } 50 51 public object Clone() { 52 return Clone(new Cloner()); 53 } 37 54 } 38 55 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/SerializedJobResult.cs
r2099 r4133 25 25 using System.Text; 26 26 using System.Runtime.Serialization; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Common; 27 29 28 30 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 31 [StorableClass] 29 32 [DataContract] 30 33 [Serializable] 31 public class SerializedJobResult { 34 public class SerializedJobResult : IDeepCloneable { 35 [Storable] 32 36 [DataMember] 33 37 public JobResult JobResult { get; set; } 34 38 [Storable] 35 39 [DataMember] 36 40 public byte[] SerializedJobResultData { get; set; } 41 42 public virtual IDeepCloneable Clone(Cloner cloner) { 43 SerializedJobResult clone = (SerializedJobResult)Activator.CreateInstance(this.GetType(), true); 44 cloner.RegisterClonedObject(this, clone); 45 clone.JobResult = (JobResult)cloner.Clone(this.JobResult); 46 clone.SerializedJobResultData = new byte[this.SerializedJobResultData.Length]; 47 Array.Copy(this.SerializedJobResultData, clone.SerializedJobResultData, this.SerializedJobResultData.Length); 48 return clone; 49 } 50 51 public object Clone() { 52 return Clone(new Cloner()); 53 } 37 54 } 38 55 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/UpTimeStatisticsDto.cs
r3011 r4133 26 26 using System.Runtime.Serialization; 27 27 using HeuristicLab.DataAccess; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 29 30 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 30 31 32 [StorableClass] 31 33 [DataContract] 32 34 public class UpTimeStatisticsDto : PersistableObject { 35 [Storable] 33 36 [DataMember] 34 37 public ClientDto Client { get; set; } 38 [Storable] 35 39 [DataMember] 36 40 public DateTime Login { get; set; } 41 [Storable] 37 42 [DataMember] 38 43 public DateTime Logout { get; set; } 39 44 45 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 46 UpTimeStatisticsDto clone = (UpTimeStatisticsDto) base.Clone(cloner); 47 clone.Client = (ClientDto)cloner.Clone(this.Client); 48 clone.Login = this.Login; 49 clone.Logout = this.Logout; 50 return clone; 51 } 40 52 } 41 53 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/HeuristicLab.Hive.Contracts-3.3.csproj
r4121 r4133 76 76 </PropertyGroup> 77 77 <ItemGroup> 78 <Reference Include="HeuristicLab.Collections-3.3"> 79 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Collections-3.3.dll</HintPath> 80 </Reference> 81 <Reference Include="HeuristicLab.Common-3.3"> 82 <HintPath>..\..\HeuristicLab.Hive.JobBase\3.3\bin\Debug\HeuristicLab.Common-3.3.dll</HintPath> 83 </Reference> 84 <Reference Include="HeuristicLab.Core-3.3"> 85 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath> 86 </Reference> 87 <Reference Include="HeuristicLab.Persistence-3.3"> 88 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Persistence-3.3.dll</HintPath> 89 </Reference> 78 90 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 79 91 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> … … 119 131 <Compile Include="BusinessObjects\ClientDto.cs" /> 120 132 <Compile Include="BusinessObjects\ClientConfigDto.cs" /> 133 <Compile Include="BusinessObjects\ClientGroupDtoList.cs" /> 121 134 <Compile Include="RecurrentEvent.cs" /> 122 135 <Compile Include="ResponseCalendar.cs" /> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Interfaces/IClientManager.cs
r3203 r4133 41 41 ResponseList<ClientGroupDto> GetAllClientGroups(); 42 42 [OperationContract] 43 ResponseObject< List<ClientGroupDto>> GetAllGroupsOfResource(Guid resourceId);43 ResponseObject<ClientGroupDtoList> GetAllGroupsOfResource(Guid resourceId); 44 44 [OperationContract] 45 45 ResponseObject<ClientGroupDto> AddClientGroup(ClientGroupDto clientGroup); -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/MessageContainer.cs
r3203 r4133 24 24 using System.Linq; 25 25 using System.Text; 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.Common; 26 28 27 29 namespace HeuristicLab.Hive.Contracts { … … 30 32 /// the actual message itself and the JobId, refered by the message 31 33 /// </summary> 34 [StorableClass] 32 35 [Serializable] 33 public class MessageContainer {36 public class MessageContainer : IDeepCloneable { 34 37 35 38 public enum MessageType { FetchJob, AbortJob, JobAborted, RequestSnapshot, FinishedJob, NoMessage, SnapshotReady, Shutdown, JobFailed, UptimeLimitDisconnect, … … 37 40 }; 38 41 42 [Storable] 39 43 public MessageType Message { get; set; } 44 [Storable] 40 45 public Guid JobId { get; set; } 41 46 … … 44 49 JobId = Guid.Empty; 45 50 } 51 46 52 public MessageContainer(MessageType message, Guid jobId) { 47 53 Message = message; … … 49 55 } 50 56 57 public virtual IDeepCloneable Clone(Cloner cloner) { 58 MessageContainer clone = (MessageContainer)Activator.CreateInstance(this.GetType(), true); 59 cloner.RegisterClonedObject(this, clone); 60 //clone.StatusMessage = this.StatusMessage; 61 //clone.Success = this.Success; 62 return clone; 63 } 64 65 public object Clone() { 66 return Clone(new Cloner()); 67 } 51 68 } 52 69 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Response.cs
r1939 r4133 25 25 using System.Text; 26 26 using System.Runtime.Serialization; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Common; 27 29 28 30 namespace HeuristicLab.Hive.Contracts { … … 30 32 /// Server response class 31 33 /// </summary> 34 [StorableClass] 32 35 [DataContract] 33 36 [Serializable] 34 public class Response { 37 public class Response : IDeepCloneable { 38 [Storable] 35 39 [DataMember] 36 40 public bool Success { get; set; } 41 [Storable] 37 42 [DataMember] 38 public string StatusMessage { get; set; } 43 public string StatusMessage { get; set; } 44 45 public virtual IDeepCloneable Clone(Cloner cloner) { 46 Response clone = (Response)Activator.CreateInstance(this.GetType(), true); 47 cloner.RegisterClonedObject(this, clone); 48 clone.StatusMessage = this.StatusMessage; 49 clone.Success = this.Success; 50 return clone; 51 } 52 53 public object Clone() { 54 return Clone(new Cloner()); 55 } 39 56 } 40 57 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseCalendar.cs
r3203 r4133 5 5 using System.Runtime.Serialization; 6 6 using HeuristicLab.Hive.Contracts.BusinessObjects; 7 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 7 8 8 9 namespace HeuristicLab.Hive.Contracts { 9 public class ResponseCalendar: Response { 10 [StorableClass] 11 public class ResponseCalendar : Response { 12 [Storable] 10 13 [DataMember] 11 14 public bool ForceFetch { get; set; } 15 [Storable] 12 16 [DataMember] 13 17 public IEnumerable<AppointmentDto> Appointments { get; set; } 18 19 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 20 ResponseCalendar clone = (ResponseCalendar) base.Clone(cloner); 21 clone.Appointments = (from a in this.Appointments 22 select (AppointmentDto)cloner.Clone(a)).ToList(); 23 clone.ForceFetch = this.ForceFetch; 24 return clone; 25 } 14 26 } 15 27 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseHB.cs
r1530 r4133 25 25 using System.Text; 26 26 using System.Runtime.Serialization; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 28 28 29 namespace HeuristicLab.Hive.Contracts { … … 33 34 /// Return value to hearbeats sent by the client 34 35 /// </summary> 36 [StorableClass] 35 37 [DataContract] 36 38 public class ResponseHB : Response { 39 [Storable] 37 40 [DataMember] 38 41 public List<MessageContainer> ActionRequest { get; set; } 42 43 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 44 ResponseHB clone = (ResponseHB) base.Clone(cloner); 45 clone.ActionRequest = (from ar in this.ActionRequest 46 select (MessageContainer) cloner.Clone(ar)).ToList(); 47 return clone; 48 } 39 49 } 40 50 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseJob.cs
r3011 r4133 26 26 using HeuristicLab.Hive.Contracts.BusinessObjects; 27 27 using System.Runtime.Serialization; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 29 30 namespace HeuristicLab.Hive.Contracts { … … 33 34 /// If a client pulls a Job from the server he gets a ResponseJob as answer 34 35 /// </summary> 36 [StorableClass] 35 37 [DataContract] 36 38 [Serializable] 37 39 public class ResponseJob : Response { 40 [Storable] 38 41 [DataMember] 39 42 public JobDto Job { get; set; } 43 44 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 45 ResponseJob clone = (ResponseJob) base.Clone(cloner); 46 clone.Job = (JobDto)cloner.Clone(this.Job); 47 return clone; 48 } 40 49 } 41 50 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseList.cs
r1530 r4133 27 27 using System.ServiceModel; 28 28 using HeuristicLab.Hive.Contracts.BusinessObjects; 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 using HeuristicLab.Common; 29 31 30 32 namespace HeuristicLab.Hive.Contracts { 31 33 [StorableClass] 32 34 [DataContract] 33 public class ResponseList<T> : Response { 35 public class ResponseList<T> : Response 36 where T : IDeepCloneable { 37 [Storable] 34 38 [DataMember] 35 39 public IList<T> List { get; set; } 36 40 41 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 42 ResponseList<T> clone = (ResponseList<T>)base.Clone(cloner); 43 clone.List = (from elem in List 44 select (T)cloner.Clone(elem)).ToList(); 45 return clone; 46 } 37 47 } 38 48 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseObject.cs
r1530 r4133 25 25 using System.Text; 26 26 using System.Runtime.Serialization; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Common; 27 29 28 30 namespace HeuristicLab.Hive.Contracts { 29 31 [StorableClass] 30 32 [DataContract] 31 public class ResponseObject<T> : Response { 33 public class ResponseObject<T> : Response 34 where T : IDeepCloneable { 35 [Storable] 32 36 [DataMember] 33 37 public T Obj { get; set; } 34 38 39 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 40 ResponseObject<T> clone = (ResponseObject<T>)base.Clone(cloner); 41 clone.Obj = (T)cloner.Clone(this.Obj); 42 return clone; 43 } 35 44 } 36 45 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponsePlugin.cs
r3011 r4133 5 5 using System.Runtime.Serialization; 6 6 using HeuristicLab.PluginInfrastructure; 7 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 7 8 8 9 namespace HeuristicLab.Hive.Contracts { 9 10 [StorableClass] 10 11 [DataContract] 11 12 [Serializable] 12 13 public class ResponsePlugin : Response { 14 [Storable] 15 [DataMember] 16 public List<CachedHivePluginInfoDto> Plugins { get; set; } 17 13 18 public ResponsePlugin() { 14 19 Plugins = new List<CachedHivePluginInfoDto>(); 15 20 } 16 21 17 [DataMember] 18 public List<CachedHivePluginInfoDto> Plugins { get; set; } 22 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 23 ResponsePlugin clone = (ResponsePlugin) base.Clone(cloner); 24 clone.Plugins = (from p in Plugins 25 select (CachedHivePluginInfoDto)cloner.Clone(p)).ToList(); 26 return clone; 27 } 19 28 } 20 29 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseResultReceived.cs
r3011 r4133 26 26 using System.Runtime.Serialization; 27 27 using HeuristicLab.Hive.Contracts.BusinessObjects; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 29 30 namespace HeuristicLab.Hive.Contracts { 31 [StorableClass] 30 32 [DataContract] 31 33 public class ResponseResultReceived : Response { 34 [Storable] 32 35 [DataMember] 33 36 public Guid JobId { get; set; } 37 [Storable] 34 38 [DataMember] 35 public bool finished { get; set; } 39 public bool Finished { get; set; } 40 41 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 42 ResponseResultReceived clone = (ResponseResultReceived) base.Clone(cloner); 43 clone.Finished = this.Finished; 44 clone.JobId = this.JobId; 45 return clone; 46 } 36 47 } 37 48 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseSerializedJob.cs
r2117 r4133 26 26 using HeuristicLab.Hive.Contracts.BusinessObjects; 27 27 using System.Runtime.Serialization; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 29 30 namespace HeuristicLab.Hive.Contracts { … … 33 34 /// If a client pulls a Job from the server he gets a ResponseJob as answer 34 35 /// </summary> 36 [StorableClass] 35 37 [DataContract] 36 38 [Serializable] 37 39 public class ResponseSerializedJob : Response { 40 [Storable] 38 41 [DataMember] 39 42 public SerializedJob Job { get; set; } 43 44 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 45 ResponseSerializedJob clone = (ResponseSerializedJob) base.Clone(cloner); 46 clone.Job = (SerializedJob)cloner.Clone(this.Job); 47 return clone; 48 } 40 49 } 41 50 }
Note: See TracChangeset
for help on using the changeset viewer.