Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4755


Ignore:
Timestamp:
11/09/10 15:18:53 (14 years ago)
Author:
cneumuel
Message:

#1260

  • applied new cloning mechanism
  • changed role names
Location:
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive
Files:
46 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Properties/AssemblyInfo.cs

    r4751 r4755  
    5858// [assembly: AssemblyVersion("1.0.*")]
    5959[assembly: AssemblyVersion("3.3.0.0")]
    60 [assembly: AssemblyFileVersion("3.3.0.4750")]
     60[assembly: AssemblyFileVersion("3.3.0.4751")]
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.DataAccess/3.3/PersistableObject.cs

    r4424 r4755  
    3030  [DataContract]
    3131  [Serializable]
    32   public class PersistableObject: IPersistableObject, IDeepCloneable {
    33 
    34     public PersistableObject() { }
    35 
    36     public PersistableObject(bool deserializing) { }
    37 
     32  public class PersistableObject : IDeepCloneable, IPersistableObject {
    3833    [Storable]
    3934    [DataMember]
    4035    public Guid Id { get; set; }
     36
     37    public PersistableObject() { }
     38    [StorableConstructor]
     39    public PersistableObject(bool deserializing) { }
     40    protected PersistableObject(PersistableObject original, Cloner cloner) {
     41      cloner.RegisterClonedObject(original, this);
     42      this.Id = original.Id;
     43    }
     44    public virtual IDeepCloneable Clone(Cloner cloner) {
     45      return new PersistableObject(this, cloner);
     46    }
     47    public object Clone() {
     48      return Clone(new Cloner());
     49    }
    4150
    4251    public override bool Equals(object obj) {
     
    5564      return this.Id.GetHashCode();
    5665    }
    57 
    58     public virtual IDeepCloneable Clone(Cloner cloner) {
    59       PersistableObject clone = (PersistableObject)Activator.CreateInstance(this.GetType(), true);
    60       cloner.RegisterClonedObject(this, clone);
    61       clone.Id = this.Id;
    62       return clone;
    63     }
    64 
    65     public object Clone() {
    66       return Clone(new Cloner());
    67     }
    6866  }
    6967}
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/AppointmentDto.cs

    r4424 r4755  
    2424using HeuristicLab.DataAccess;
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HeuristicLab.Common;
    2627
    2728namespace HeuristicLab.Hive.Contracts.BusinessObjects {
    28  
     29
    2930  [StorableClass]
    3031  [DataContract]
    31   public class AppointmentDto: PersistableObject {
     32  public class AppointmentDto : PersistableObject {
    3233    [Storable]
    3334    [DataMember]
     
    4950    public Guid ResourceId { get; set; }
    5051
    51     public override Common.IDeepCloneable Clone(Common.Cloner cloner) {
    52       AppointmentDto clone = (AppointmentDto)base.Clone(cloner);
    53       clone.AllDayEvent = this.AllDayEvent;
    54       clone.EndDate = this.EndDate;
    55       clone.Recurring = this.Recurring;
    56       clone.RecurringId = this.RecurringId;
    57       clone.ResourceId = this.ResourceId;
    58       clone.StartDate = this.StartDate;
    59       return clone;
     52    public AppointmentDto() { }
     53    [StorableConstructor]
     54    protected AppointmentDto(bool deserializing) : base(deserializing) { }
     55    protected AppointmentDto(AppointmentDto original, Cloner cloner)
     56      : base(original, cloner) {
     57      this.AllDayEvent = original.AllDayEvent;
     58      this.EndDate = original.EndDate;
     59      this.Recurring = original.Recurring;
     60      this.RecurringId = original.RecurringId;
     61      this.ResourceId = original.ResourceId;
     62      this.StartDate = original.StartDate;
     63    }
     64    public override IDeepCloneable Clone(Cloner cloner) {
     65      return new AppointmentDto(this, cloner);
    6066    }
    6167  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/CachedHivePluginInfoDto.cs

    r4424 r4755  
    2626using HeuristicLab.Hive.Contracts.BusinessObjects;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HeuristicLab.Common;
    2829
    2930namespace HeuristicLab.PluginInfrastructure {
     
    3233  [Serializable]
    3334  public class CachedHivePluginInfoDto : HivePluginInfoDto {
    34    
     35
    3536    /// <summary>
    3637    /// stores the plugin files in a list of byte arrays
     
    4344      PluginFiles = new List<HivePluginFile>();
    4445    }
    45 
    46     public override Common.IDeepCloneable Clone(Common.Cloner cloner) {
    47       CachedHivePluginInfoDto clone = (CachedHivePluginInfoDto) base.Clone(cloner);
    48       clone.PluginFiles = (from p in this.PluginFiles
    49                           select (HivePluginFile)cloner.Clone(p)).ToList();
    50       return clone;
     46    [StorableConstructor]
     47    protected CachedHivePluginInfoDto(bool deserializing) : base(deserializing) { }
     48    protected CachedHivePluginInfoDto(CachedHivePluginInfoDto original, Cloner cloner)
     49      : base(original, cloner) {
     50      this.PluginFiles = (original.PluginFiles.Select(x => cloner.Clone(x))).ToList();
     51    }
     52    public override IDeepCloneable Clone(Cloner cloner) {
     53      return new CachedHivePluginInfoDto(this, cloner);
    5154    }
    5255  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/HiveExperimentDto.cs

    r4424 r4755  
    4848    public Guid? RootJobId { get; set; }
    4949
     50    public HiveExperimentDto() { }
     51    [StorableConstructor]
     52    protected HiveExperimentDto(bool deserializing) : base(deserializing) { }
     53    protected HiveExperimentDto(HiveExperimentDto original, Cloner cloner)
     54      : base(original, cloner) {
     55        this.Name = original.Name;
     56        this.Description = original.Description;
     57        this.ResourceIds = original.ResourceIds;
     58        this.RootJobId = original.RootJobId;
     59        this.UserId = original.UserId;
     60    }
     61    public override IDeepCloneable Clone(Cloner cloner) {
     62      return new HiveExperimentDto(this, cloner);
     63    }
     64
    5065    public override string ToString() {
    5166      return base.ToString() + "Name: " + Name + ", Description: " + Description + ", ResourceIds: " + ResourceIds;
    5267    }
    53 
    54     public HiveExperimentDto() {
    55     }
    56 
    57     public override IDeepCloneable Clone(Cloner cloner) {
    58       HiveExperimentDto clone = (HiveExperimentDto)base.Clone(cloner);
    59       clone.Name = this.Name;
    60       clone.Description = this.Description;
    61       clone.ResourceIds = this.ResourceIds;
    62       clone.RootJobId = this.RootJobId;
    63       clone.UserId = this.UserId;
    64       return clone;
    65     }
    6668  }
    6769}
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/HiveExperimentDtoList.cs

    r4424 r4755  
    3333      this.list = new List<HiveExperimentDto>(collection);
    3434    }
    35 
    3635    [StorableConstructor]
    3736    protected HiveExperimentDtoList(bool deserializing) : base(deserializing) { }
    38 
     37    protected HiveExperimentDtoList(HiveExperimentDtoList original, Cloner cloner) {
     38      cloner.RegisterClonedObject(original, this);
     39      this.list = (original.Select(x => (HiveExperimentDto)cloner.Clone(x))).ToList();
     40    }
     41    public virtual IDeepCloneable Clone(Cloner cloner) {
     42      return new HiveExperimentDtoList(this, cloner);
     43    }
    3944    public object Clone() {
    4045      return Clone(new Cloner());
    4146    }
    42 
    43     public virtual IDeepCloneable Clone(Cloner cloner) {
    44       HiveExperimentDtoList clone = (HiveExperimentDtoList)Activator.CreateInstance(this.GetType());
    45       cloner.RegisterClonedObject(this, clone);
    46       clone.list = (this.Select(x => (HiveExperimentDto)cloner.Clone(x))).ToList();
    47       return clone;
    48     }
    4947  }
    5048}
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/HivePluginFile.cs

    r4424 r4755  
    3535    [Storable]
    3636    [DataMember]
    37     public String Name { get; set; } 
     37    public String Name { get; set; }
    3838
     39    public HivePluginFile() { }
    3940    public HivePluginFile(byte[] binaryFile, String name) {
    4041      BinaryFile = binaryFile;
    4142      Name = name;
    4243    }
    43 
     44    [StorableConstructor]
     45    protected HivePluginFile(bool deserializing) { }
     46    protected HivePluginFile(HivePluginFile original, Cloner cloner) {
     47      cloner.RegisterClonedObject(original, this);
     48      this.Name = original.Name;
     49      if (original.BinaryFile != null) {
     50        this.BinaryFile = new byte[original.BinaryFile.Length];
     51        Array.Copy(original.BinaryFile, this.BinaryFile, original.BinaryFile.Length);
     52      }
     53    }
    4454    public virtual IDeepCloneable Clone(Cloner cloner) {
    45       HivePluginFile clone = (HivePluginFile)Activator.CreateInstance(this.GetType(), true);
    46       cloner.RegisterClonedObject(this, clone);
    47       clone.Name = this.Name;
    48       if (this.BinaryFile != null) {
    49         clone.BinaryFile = new byte[this.BinaryFile.Length];
    50         Array.Copy(this.BinaryFile, clone.BinaryFile, this.BinaryFile.Length);
    51       }
    52       return clone;
     55      return new HivePluginFile(this, cloner);
    5356    }
    54 
    5557    public object Clone() {
    5658      return Clone(new Cloner());
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/HivePluginInfoDto.cs

    r4424 r4755  
    2727using HeuristicLab.Hive.JobBase;
    2828using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     29using HeuristicLab.Common;
    2930
    3031namespace HeuristicLab.Hive.Contracts.BusinessObjects {
     
    4950
    5051    public HivePluginInfoDto() { }
    51 
     52    [StorableConstructor]
    5253    public HivePluginInfoDto(bool deserializing) : base(deserializing) { }
     54    protected HivePluginInfoDto(HivePluginInfoDto original, Cloner cloner)
     55      : base(original, cloner) {
     56      this.Name = original.Name;
     57      this.Version = (Version)original.Version.Clone();
     58      this.Update = original.Update;
     59    }
     60    public override IDeepCloneable Clone(Cloner cloner) {
     61      return new HivePluginInfoDto(this, cloner);
     62    }
    5363
    5464    [StorableHook(HookType.BeforeSerialization)]
     
    6070    private void AfterDeserialization() {
    6171      this.Version = new Version(storableVersion);
    62     }
    63 
    64     public override Common.IDeepCloneable Clone(Common.Cloner cloner) {
    65       HivePluginInfoDto clone = (HivePluginInfoDto) base.Clone(cloner);
    66       clone.Name = this.Name;
    67       clone.Version = (Version)this.Version.Clone();
    68       clone.Update = this.Update;
    69       return clone;
    7072    }
    7173
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobDto.cs

    r4424 r4755  
    8989      AssignedResourceIds = new List<Guid>();
    9090    }
    91 
     91    [StorableConstructor]
     92    protected JobDto(bool deserializing) : base(deserializing) { }
     93    protected JobDto(JobDto original, Cloner cloner)
     94      : base(original, cloner) {
     95      this.Id = original.Id;
     96      this.AssignedResourceIds = new List<Guid>(original.AssignedResourceIds);
     97      this.Slave = cloner.Clone(original.Slave);
     98      this.CoresNeeded = original.CoresNeeded;
     99      this.DateCalculated = original.DateCalculated;
     100      this.DateCreated = original.DateCreated;
     101      this.DateFinished = original.DateFinished;
     102      this.Exception = original.Exception;
     103      this.Id = original.Id;
     104      this.MemoryNeeded = original.MemoryNeeded;
     105      this.ParentJobId = original.ParentJobId;
     106      this.ExecutionTime = original.ExecutionTime;
     107      this.PluginsNeeded = (original.PluginsNeeded.Select(x => cloner.Clone(x))).ToList();
     108      this.Priority = original.Priority;
     109      this.Project = cloner.Clone(original.Project);
     110      this.State = original.State;
     111      this.UserId = original.UserId;
     112    }
    92113    public override IDeepCloneable Clone(Cloner cloner) {
    93       JobDto clone = (JobDto)base.Clone(cloner);
    94       clone.Id = this.Id;
    95       clone.AssignedResourceIds = new List<Guid>(this.AssignedResourceIds);
    96       clone.Slave = (SlaveDto)cloner.Clone(this.Slave);
    97       clone.CoresNeeded = this.CoresNeeded;
    98       clone.DateCalculated = this.DateCalculated;
    99       clone.DateCreated = this.DateCreated;
    100       clone.DateFinished = this.DateFinished;
    101       clone.Exception = this.Exception;
    102       clone.Id = this.Id;
    103       clone.MemoryNeeded = this.MemoryNeeded;
    104       clone.ParentJobId = this.ParentJobId;
    105       clone.ExecutionTime = this.ExecutionTime;
    106       clone.PluginsNeeded = (from p in this.PluginsNeeded
    107                              select (HivePluginInfoDto)cloner.Clone(p)).ToList();
    108       clone.Priority = this.Priority;
    109       clone.Project = (ProjectDto)cloner.Clone(this.Project);
    110       clone.State = this.State;
    111       clone.UserId = this.UserId;
    112       return clone;
     114      return new JobDto(this, cloner);
    113115    }
    114116  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobResult.cs

    r4557 r4755  
    2424using HeuristicLab.DataAccess;
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HeuristicLab.Common;
    2627
    2728namespace HeuristicLab.Hive.Contracts.BusinessObjects {
     
    5657    public Guid? ParentJobId { get; set; }
    5758
    58     public override Common.IDeepCloneable Clone(Common.Cloner cloner) {
    59       JobResult clone = (JobResult) base.Clone(cloner);
    60       clone.SlaveId = this.SlaveId;
    61       clone.DateCreated = this.DateCreated;
    62       clone.DateCalculated = this.DateCalculated;
    63       clone.DateFinished = this.DateFinished;
    64       clone.Exception = this.Exception;
    65       clone.ExecutionTime = this.ExecutionTime;
    66       clone.State = this.State;
    67       clone.ParentJobId = this.ParentJobId;
    68       return clone;
     59    public JobResult() { }
     60    [StorableConstructor]
     61    protected JobResult(bool deserializing) : base(deserializing) { }
     62    protected JobResult(JobResult original, Cloner cloner)
     63      : base(original, cloner) {
     64      this.SlaveId = original.SlaveId;
     65      this.DateCreated = original.DateCreated;
     66      this.DateCalculated = original.DateCalculated;
     67      this.DateFinished = original.DateFinished;
     68      this.Exception = original.Exception;
     69      this.ExecutionTime = original.ExecutionTime;
     70      this.State = original.State;
     71      this.ParentJobId = original.ParentJobId;
    6972    }
     73    public override IDeepCloneable Clone(Cloner cloner) {
     74      return new JobResult(this, cloner);
     75    }
     76
    7077  }
    7178}
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobResultList.cs

    r4424 r4755  
    3333      this.list = new List<JobResult>(collection);
    3434    }
    35 
    3635    [StorableConstructor]
    3736    protected JobResultList(bool deserializing) : base(deserializing) { }
    38 
     37    protected JobResultList(JobResultList original, Cloner cloner) {
     38      cloner.RegisterClonedObject(original, this);
     39      this.list = (original.Select(x => cloner.Clone(x))).ToList();
     40    }
     41    public virtual IDeepCloneable Clone(Cloner cloner) {
     42      return new JobResultList(this, cloner);
     43    }
    3944    public object Clone() {
    4045      return Clone(new Cloner());
    4146    }
    4247
    43     public virtual IDeepCloneable Clone(Cloner cloner) {
    44       JobResultList clone = (JobResultList)Activator.CreateInstance(this.GetType());
    45       cloner.RegisterClonedObject(this, clone);
    46       clone.list = (this.Select(x => (JobResult)cloner.Clone(x))).ToList();
    47       return clone;
    48     }
     48
    4949  }
    5050}
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ProjectDto.cs

    r4424 r4755  
    2424using HeuristicLab.DataAccess;
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HeuristicLab.Common;
    2627
    2728namespace HeuristicLab.Hive.Contracts.BusinessObjects {
     
    3435    public String Name { get; set; }
    3536
    36     public override Common.IDeepCloneable Clone(Common.Cloner cloner) {
    37       ProjectDto clone = (ProjectDto) base.Clone(cloner);
    38       clone.Name = this.Name;
    39       return clone;
     37    public ProjectDto() { }
     38    [StorableConstructor]
     39    protected ProjectDto(bool deserializing) : base(deserializing) { }
     40    protected ProjectDto(ProjectDto original, Cloner cloner)
     41      : base(original, cloner) {
     42      this.Name = original.Name;
     43    }
     44    public override IDeepCloneable Clone(Cloner cloner) {
     45      return new ProjectDto(this, cloner);
    4046    }
    4147  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ResourceDto.cs

    r4424 r4755  
    3535    public string Name { get; set; }
    3636
     37    public ResourceDto() { }
     38    [StorableConstructor]
     39    protected ResourceDto(bool deserializing) : base(deserializing) { }
     40    protected ResourceDto(ResourceDto original, Cloner cloner)
     41      : base(original, cloner) {
     42      this.Name = original.Name;
     43    }
     44    public override IDeepCloneable Clone(Cloner cloner) {
     45      return new ResourceDto(this, cloner);
     46    }
     47
    3748    public override string ToString() {
    3849      return Id + " " + Name;
    3950    }
    40 
    41     public virtual IDeepCloneable Clone(Cloner cloner) {
    42       ResourceDto clone = (ResourceDto)base.Clone(cloner);
    43       clone.Name = this.Name;
    44       return clone;
    45     }
    4651  }
    4752}
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/SerializedJob.cs

    r4557 r4755  
    3939    public byte[] SerializedJobData { get; set; }
    4040
     41    public SerializedJob() { }
     42    [StorableConstructor]
     43    protected SerializedJob(bool deserializing) { }
     44    protected SerializedJob(SerializedJob original, Cloner cloner) {
     45      cloner.RegisterClonedObject(original, this);
     46      this.JobInfo = cloner.Clone(original.JobInfo);
     47      this.SerializedJobData = new byte[this.SerializedJobData.Length];
     48      Array.Copy(original.SerializedJobData, this.SerializedJobData, original.SerializedJobData.Length);
     49    }
    4150    public virtual IDeepCloneable Clone(Cloner cloner) {
    42       SerializedJob clone = (SerializedJob)Activator.CreateInstance(this.GetType(), true);
    43       cloner.RegisterClonedObject(this, clone);
    44       clone.JobInfo = (JobDto)cloner.Clone(this.JobInfo);
    45       clone.SerializedJobData = new byte[this.SerializedJobData.Length];
    46       Array.Copy(this.SerializedJobData, clone.SerializedJobData, this.SerializedJobData.Length);
    47       return clone;
     51      return new SerializedJob(this, cloner);
    4852    }
    49 
    5053    public object Clone() {
    5154      return Clone(new Cloner());
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/SerializedJobList.cs

    r4424 r4755  
    3535      this.list = new List<SerializedJob>(collection);
    3636    }
    37 
    3837    [StorableConstructor]
    3938    protected SerializedJobList(bool deserializing) : base(deserializing) { }
    40 
     39    protected SerializedJobList(SerializedJobList original, Cloner cloner) {
     40      cloner.RegisterClonedObject(original, this);
     41      this.list = (original.Select(x => cloner.Clone(x))).ToList();
     42    }
     43    public virtual IDeepCloneable Clone(Cloner cloner) {
     44      return new SerializedJobList(this, cloner);
     45    }
    4146    public object Clone() {
    4247      return Clone(new Cloner());
    4348    }
    44 
    45     public virtual IDeepCloneable Clone(Cloner cloner) {
    46       SerializedJobList clone = (SerializedJobList)Activator.CreateInstance(this.GetType());
    47       cloner.RegisterClonedObject(this, clone);
    48       clone.list = (this.Select(x => (SerializedJob)cloner.Clone(x))).ToList();
    49       return clone;
    50     }
    5149  }
    5250}
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/SlaveConfigDto.cs

    r4424 r4755  
    3030  [DataContract]
    3131  [Serializable]
    32   public class SlaveConfigDto : PersistableObject, IDeepCloneable {
     32  public class SlaveConfigDto : PersistableObject {
    3333    [Storable]
    3434    [DataMember]
     
    3838    public int? HeartBeatIntervall { get; set; }
    3939
     40    public SlaveConfigDto() { }
     41    [StorableConstructor]
     42    protected SlaveConfigDto(bool deserializing) : base(deserializing) { }
     43    protected SlaveConfigDto(SlaveConfigDto original, Cloner cloner)
     44      : base(original, cloner) {
     45      this.UpDownTimeCalendar = original.UpDownTimeCalendar;
     46      this.HeartBeatIntervall = original.HeartBeatIntervall;
     47    }
    4048    public override IDeepCloneable Clone(Cloner cloner) {
    41       SlaveConfigDto clone = (SlaveConfigDto)base.Clone(cloner);
    42       clone.UpDownTimeCalendar = this.UpDownTimeCalendar;
    43       clone.HeartBeatIntervall = this.HeartBeatIntervall;
    44       return clone;
     49      return new SlaveConfigDto(this, cloner);
    4550    }
    4651  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/SlaveDto.cs

    r4424 r4755  
    6161    public bool IsAllowedToCalculate { get; set; }
    6262
     63    public SlaveDto() { }
     64    [StorableConstructor]
     65    protected SlaveDto(bool deserializing) : base(deserializing) { }
     66    protected SlaveDto(SlaveDto original, Cloner cloner)
     67      : base(original, cloner) {
     68      this.CalendarSyncStatus = original.CalendarSyncStatus;
     69      this.Config = cloner.Clone(original.Config);
     70      this.CpuSpeedPerCore = original.CpuSpeedPerCore;
     71      this.FreeMemory = original.FreeMemory;
     72      this.Login = original.Login;
     73      this.Memory = original.Memory;
     74      this.NrOfCores = original.NrOfCores;
     75      this.NrOfFreeCores = original.NrOfFreeCores;
     76      this.State = original.State;
     77      this.IsAllowedToCalculate = original.IsAllowedToCalculate;
     78    }
     79    public override IDeepCloneable Clone(Cloner cloner) {
     80      return new SlaveDto(this, cloner);
     81    }
     82
    6383    public override string ToString() {
    6484      return base.ToString() + ", NrOfCores: " + NrOfCores + ", NrOfFreeCores " + NrOfFreeCores + ", Login: " + Login + ", State: " + State;
    6585    }
    66 
    67     public override IDeepCloneable Clone(Cloner cloner) {
    68       SlaveDto clone = (SlaveDto)base.Clone(cloner);
    69       clone.CalendarSyncStatus = this.CalendarSyncStatus;
    70       clone.Config = (SlaveConfigDto)cloner.Clone(this.Config);
    71       clone.CpuSpeedPerCore = this.CpuSpeedPerCore;
    72       clone.FreeMemory = this.FreeMemory;
    73       clone.Login = this.Login;
    74       clone.Memory = this.Memory;
    75       clone.NrOfCores = this.NrOfCores;
    76       clone.NrOfFreeCores = this.NrOfFreeCores;
    77       clone.State = this.State;
    78       clone.IsAllowedToCalculate = this.IsAllowedToCalculate;
    79       return clone;
    80     }
    8186  }
    8287}
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/SlaveGroupDto.cs

    r4424 r4755  
    2424using System.Runtime.Serialization;
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HeuristicLab.Common;
    2627
    2728namespace HeuristicLab.Hive.Contracts.BusinessObjects {
     
    3738      Resources = new List<ResourceDto>();
    3839    }
    39 
    40     public override Common.IDeepCloneable Clone(Common.Cloner cloner) {
    41       SlaveGroupDto clone = (SlaveGroupDto) base.Clone(cloner);
    42       clone.Resources = (from r in this.Resources
    43                         select (ResourceDto)cloner.Clone(r)).ToList();
    44       return clone;
     40    [StorableConstructor]
     41    protected SlaveGroupDto(bool deserializing) : base(deserializing) { }
     42    protected SlaveGroupDto(SlaveGroupDto original, Cloner cloner)
     43      : base(original, cloner) {
     44      this.Resources = (original.Resources.Select(x => cloner.Clone(x))).ToList();
     45    }
     46    public override IDeepCloneable Clone(Cloner cloner) {
     47      return new SlaveGroupDto(this, cloner);
    4548    }
    4649  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/SlaveGroupDtoList.cs

    r4424 r4755  
    3636      this.list = new List<SlaveGroupDto>(collection);
    3737    }
    38 
    3938    [StorableConstructor]
    4039    protected SlaveGroupDtoList(bool deserializing) : base(deserializing) { }
    41 
     40    protected SlaveGroupDtoList(SlaveGroupDtoList original, Cloner cloner) {
     41      cloner.RegisterClonedObject(original, this);
     42      this.list = (this.Select(x => cloner.Clone(x))).ToList();
     43    }
     44    public virtual IDeepCloneable Clone(Cloner cloner) {
     45      return new SlaveGroupDtoList(this, cloner);
     46    }
    4247    public object Clone() {
    4348      return Clone(new Cloner());
    4449    }
    45 
    46     public virtual IDeepCloneable Clone(Cloner cloner) {
    47       SlaveGroupDtoList clone = (SlaveGroupDtoList)Activator.CreateInstance(this.GetType());
    48       cloner.RegisterClonedObject(this, clone);
    49       clone.list = (this.Select(x => (SlaveGroupDto)cloner.Clone(x))).ToList();
    50       return clone;
    51     }
    5250  }
    5351}
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/UpTimeStatisticsDto.cs

    r4424 r4755  
    2424using HeuristicLab.DataAccess;
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HeuristicLab.Common;
    2627
    2728namespace HeuristicLab.Hive.Contracts.BusinessObjects {
     
    4041    public DateTime Logout { get; set; }
    4142
    42     public override Common.IDeepCloneable Clone(Common.Cloner cloner) {
    43       UpTimeStatisticsDto clone = (UpTimeStatisticsDto) base.Clone(cloner);
    44       clone.Slave = (SlaveDto)cloner.Clone(this.Slave);
    45       clone.Login = this.Login;
    46       clone.Logout = this.Logout;
    47       return clone;
     43    public UpTimeStatisticsDto() { }
     44    [StorableConstructor]
     45    protected UpTimeStatisticsDto(bool deserializing) : base(deserializing) { }
     46    protected UpTimeStatisticsDto(UpTimeStatisticsDto original, Cloner cloner)
     47      : base(original, cloner) {
     48      this.Slave = cloner.Clone(original.Slave);
     49      this.Login = original.Login;
     50      this.Logout = original.Logout;
     51    }
     52    public override IDeepCloneable Clone(Cloner cloner) {
     53      return new UpTimeStatisticsDto(this, cloner);
    4854    }
    4955  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/HiveRoles.cs

    r4424 r4755  
    2323namespace HeuristicLab.Hive.Contracts {
    2424  public static class HiveRoles {
    25     public const string Administrator = "Hive.Administrator";
    26     public const string Slave = "Hive.Slave";
    27     public const string Client = "Hive.Client";
     25    public const string Administrator = "Hive Administrator";
     26    public const string Slave = "Hive Slave";
     27    public const string User = "Hive User";
    2828  }
    2929}
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/MessageContainer.cs

    r4424 r4755  
    3232  [Serializable]
    3333  public class MessageContainer : IDeepCloneable {
    34 
    3534    public enum MessageType {
    3635      FetchJob, AbortJob, JobAborted, RequestSnapshot, FinishedJob, NoMessage, SnapshotReady, Shutdown, JobFailed, UptimeLimitDisconnect,
     
    4645    public Guid JobId { get; set; }
    4746
     47    public MessageContainer() { }
    4848    public MessageContainer(MessageType message) {
    4949      Message = message;
    5050      JobId = Guid.Empty;
    5151    }
    52 
    5352    public MessageContainer(MessageType message, Guid jobId) {
    5453      Message = message;
    5554      JobId = jobId;
    5655    }
    57 
     56    [StorableConstructor]
     57    protected MessageContainer(bool deserializing) { }
     58    protected MessageContainer(MessageContainer original, Cloner cloner) {
     59      cloner.RegisterClonedObject(original, this);
     60      this.Message = original.Message;
     61      this.JobId = original.JobId;
     62    }
    5863    public virtual IDeepCloneable Clone(Cloner cloner) {
    59       MessageContainer clone = (MessageContainer)Activator.CreateInstance(this.GetType(), true);
    60       cloner.RegisterClonedObject(this, clone);
    61       clone.Message = this.Message;
    62       clone.JobId = this.JobId;
    63       return clone;
     64      return new MessageContainer(this, cloner);
    6465    }
    65 
    6666    public object Clone() {
    6767      return Clone(new Cloner());
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/MessageContainerWithCallback.cs

    r4424 r4755  
    2828  [Serializable]
    2929  public class MessageContainerWithCallback<CallbackParameterType> : MessageContainer {
    30 
    3130    [Storable]
    3231    public Action<CallbackParameterType> Callback;
    3332
     33    public MessageContainerWithCallback() { }
    3434    public MessageContainerWithCallback(MessageType message, Guid parentJobId, Action<CallbackParameterType> callback)
    3535      : base(message, parentJobId) {
    36         this.Callback = callback;
     36      this.Callback = callback;
    3737    }
    38 
     38    [StorableConstructor]
     39    protected MessageContainerWithCallback(bool deserializing) : base(deserializing) { }
     40    protected MessageContainerWithCallback(MessageContainerWithCallback<CallbackParameterType> original, Cloner cloner)
     41      : base(original, cloner) {
     42      this.Callback = original.Callback;
     43    }
    3944    public override IDeepCloneable Clone(Cloner cloner) {
    40       MessageContainerWithJob clone = (MessageContainerWithJob)base.Clone(cloner);
    41 
    42       return clone;
     45      return new MessageContainerWithCallback<CallbackParameterType>(this, cloner);
    4346    }
    4447  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/MessageContainerWithJob.cs

    r4424 r4755  
    2929  [Serializable]
    3030  public class MessageContainerWithJob : MessageContainer {
    31 
    3231    [Storable]
    3332    public SerializedJob SerializedJob { get; set; }
    34    
     33
     34    public MessageContainerWithJob() { }
    3535    public MessageContainerWithJob(MessageType message, Guid parentJobId, SerializedJob serializedJob)
    3636      : base(message, parentJobId) {
    3737        this.SerializedJob = serializedJob;
    3838    }
    39 
     39    [StorableConstructor]
     40    protected MessageContainerWithJob(bool deserializing) : base(deserializing) { }
     41    protected MessageContainerWithJob(MessageContainerWithJob original, Cloner cloner)
     42      : base(original, cloner) {
     43      this.SerializedJob = cloner.Clone(original.SerializedJob);
     44    }
    4045    public override IDeepCloneable Clone(Cloner cloner) {
    41       MessageContainerWithJob clone = (MessageContainerWithJob)base.Clone(cloner);
    42       clone.SerializedJob = (SerializedJob)cloner.Clone(this.SerializedJob);
    43       return clone;
     46      return new MessageContainerWithJob(this, cloner);
    4447    }
    4548  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseObjects/Response.cs

    r4424 r4755  
    4040      StatusMessage = ResponseStatus.Ok;
    4141    }
    42 
    4342    [StorableConstructor]
    4443    protected Response(bool deserializing) { }
    45 
     44    protected Response(Response original, Cloner cloner) {
     45      cloner.RegisterClonedObject(original, this);
     46      this.StatusMessage = original.StatusMessage;
     47    }
    4648    public virtual IDeepCloneable Clone(Cloner cloner) {
    47       Response clone = (Response)Activator.CreateInstance(this.GetType(), true);
    48       cloner.RegisterClonedObject(this, clone);
    49       clone.StatusMessage = this.StatusMessage;
    50       return clone;
     49      return new Response(this, cloner);
    5150    }
    52 
    5351    public object Clone() {
    5452      return Clone(new Cloner());
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseObjects/ResponseCalendar.cs

    r4424 r4755  
    2626using HeuristicLab.Hive.Contracts.BusinessObjects;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HeuristicLab.Common;
    2829
    2930namespace HeuristicLab.Hive.Contracts.ResponseObjects {
     
    3940    public IEnumerable<AppointmentDto> Appointments { get; set; }
    4041
    41     public override Common.IDeepCloneable Clone(Common.Cloner cloner) {
    42       ResponseCalendar clone = (ResponseCalendar) base.Clone(cloner);
    43       clone.Appointments = (from a in this.Appointments
    44                            select (AppointmentDto)cloner.Clone(a)).ToList();
    45       clone.ForceFetch = this.ForceFetch;
    46       return clone;
     42    public ResponseCalendar() {
     43      this.Appointments = new List<AppointmentDto>();
     44    }
     45    [StorableConstructor]
     46    protected ResponseCalendar(bool deserializing) : base(deserializing) { }
     47    protected ResponseCalendar(ResponseCalendar original, Cloner cloner)
     48      : base(original, cloner) {
     49      this.Appointments = (original.Appointments.Select(x => cloner.Clone(x))).ToList();
     50      this.ForceFetch = original.ForceFetch;
     51    }
     52    public override IDeepCloneable Clone(Cloner cloner) {
     53      return new ResponseCalendar(this, cloner);
    4754    }
    4855  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseObjects/ResponseHeartBeat.cs

    r4424 r4755  
    2525using System.Runtime.Serialization;
    2626using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Hive.Contracts.ResponseObjects {
    29 
    30 
    3130  /// <summary>
    3231  /// Response Heartbeat class
     
    4140    public List<MessageContainer> ActionRequest { get; set; }
    4241
    43     public override Common.IDeepCloneable Clone(Common.Cloner cloner) {
    44       ResponseHeartBeat clone = (ResponseHeartBeat) base.Clone(cloner);
    45       clone.ActionRequest = (from ar in this.ActionRequest
    46                             select (MessageContainer) cloner.Clone(ar)).ToList();
    47       return clone;
     42    public ResponseHeartBeat() {
     43      this.ActionRequest = new List<MessageContainer>();
     44    }
     45    [StorableConstructor]
     46    protected ResponseHeartBeat(bool deserializing) : base(deserializing) { }
     47    protected ResponseHeartBeat(ResponseHeartBeat original, Cloner cloner)
     48      : base(original, cloner) {
     49      this.ActionRequest = (original.ActionRequest.Select(x => cloner.Clone(x))).ToList();
     50    }
     51    public override IDeepCloneable Clone(Cloner cloner) {
     52      return new ResponseHeartBeat(this, cloner);
    4853    }
    4954  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseObjects/ResponseList.cs

    r4424 r4755  
    3131  [DataContract]
    3232  [Serializable]
    33   public class ResponseList<T> : Response
    34     where T : IDeepCloneable {
     33  public class ResponseList<T> : Response where T : class, IDeepCloneable {
    3534    [Storable]
    3635    [DataMember]
    3736    public IList<T> List { get; set; }
    3837
    39     public override Common.IDeepCloneable Clone(Common.Cloner cloner) {
    40       ResponseList<T> clone = (ResponseList<T>)base.Clone(cloner);
    41       clone.List = (from elem in List
    42                    select (T)cloner.Clone(elem)).ToList();
    43       return clone;
     38    public ResponseList() {
     39      this.List = new List<T>();
     40    }
     41    [StorableConstructor]
     42    protected ResponseList(bool deserializing) : base(deserializing) { }
     43    protected ResponseList(ResponseList<T> original, Cloner cloner)
     44      : base(original, cloner) {
     45      this.List = (original.List.Select(x => cloner.Clone(x))).ToList();
     46    }
     47    public override IDeepCloneable Clone(Cloner cloner) {
     48      return new ResponseList<T>(this, cloner);
    4449    }
    4550  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseObjects/ResponseObject.cs

    r4424 r4755  
    2929  [DataContract]
    3030  [Serializable]
    31   public class ResponseObject<T> : Response
    32     where T : IDeepCloneable {
     31  public class ResponseObject<T> : Response where T : class, IDeepCloneable {
    3332    [Storable]
    3433    [DataMember]
    3534    public T Obj { get; set; }
    3635
    37     public override Common.IDeepCloneable Clone(Common.Cloner cloner) {
    38       ResponseObject<T> clone = (ResponseObject<T>)base.Clone(cloner);
    39       clone.Obj = (T)cloner.Clone(this.Obj);
    40       return clone;
     36    public ResponseObject() { }
     37    [StorableConstructor]
     38    protected ResponseObject(bool deserializing) : base(deserializing) { }
     39    protected ResponseObject(ResponseObject<T> original, Cloner cloner)
     40      : base(original, cloner) {
     41        this.Obj = cloner.Clone(original.Obj);
     42    }
     43    public override IDeepCloneable Clone(Cloner cloner) {
     44      return new ResponseObject<T>(this, cloner);
    4145    }
    4246  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseObjects/ResponseResultReceived.cs

    r4424 r4755  
    2323using System.Runtime.Serialization;
    2424using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Common;
    2526
    2627namespace HeuristicLab.Hive.Contracts.ResponseObjects {
     
    3637    public bool Finished { get; set; }
    3738
    38     public override Common.IDeepCloneable Clone(Common.Cloner cloner) {
    39       ResponseResultReceived clone = (ResponseResultReceived) base.Clone(cloner);
    40       clone.Finished = this.Finished;
    41       clone.JobId = this.JobId;
    42       return clone;
     39    public ResponseResultReceived() { }
     40    [StorableConstructor]
     41    protected ResponseResultReceived(bool deserializing) : base(deserializing) { }
     42    protected ResponseResultReceived(ResponseResultReceived original, Cloner cloner)
     43      : base(original, cloner) {
     44      this.Finished = original.Finished;
     45      this.JobId = original.JobId;
     46    }
     47    public override IDeepCloneable Clone(Cloner cloner) {
     48      return new ResponseResultReceived(this, cloner);
    4349    }
    4450  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/WcfServicePool.cs

    r4710 r4755  
    6767    private int requestCount = 0;
    6868
    69     public WcfServicePool(string hostAddress, string username, string password, string endpointName) {
    70       this.hostAddress = hostAddress;
     69    public WcfServicePool(string username, string password, string endpointName) {
    7170      this.username = username;
    7271      this.password = password;
    7372      this.endpointName = endpointName;
     73    }
     74    public WcfServicePool(string hostAddress, string username, string password, string endpointName) : this(username, password, endpointName) {
     75      this.hostAddress = hostAddress;
    7476    }
    7577
     
    8991      if (factory == null) {
    9092        factory = new ChannelFactory<T>(endpointName);
    91         WcfSettings.SetEndpointAddress(factory.Endpoint, hostAddress);
     93        if (!string.IsNullOrEmpty(hostAddress)) {
     94          WcfSettings.SetEndpointAddress(factory.Endpoint, hostAddress);
     95        }
    9296
    9397        factory.Credentials.UserName.UserName = username;
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/ConnectionSetupView.Designer.cs

    r4342 r4755  
    4646      this.components = new System.ComponentModel.Container();
    4747      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConnectionSetupView));
    48       this.urlTextBox = new System.Windows.Forms.TextBox();
    49       this.urlLabel = new System.Windows.Forms.Label();
    5048      this.userLabel = new System.Windows.Forms.Label();
    5149      this.userTextBox = new System.Windows.Forms.TextBox();
     
    5553      this.savePasswordCheckbox = new System.Windows.Forms.CheckBox();
    5654      this.cancelButton = new System.Windows.Forms.Button();
    57       this.groupBox1 = new System.Windows.Forms.GroupBox();
    5855      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
    59       this.groupBox1.SuspendLayout();
    6056      this.SuspendLayout();
    61       //
    62       // urlTextBox
    63       //
    64       this.urlTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    65                   | System.Windows.Forms.AnchorStyles.Right)));
    66       this.urlTextBox.Location = new System.Drawing.Point(125, 15);
    67       this.urlTextBox.Name = "urlTextBox";
    68       this.urlTextBox.Size = new System.Drawing.Size(351, 20);
    69       this.urlTextBox.TabIndex = 0;
    70       this.toolTip.SetToolTip(this.urlTextBox, "URL of HeuristicLab Plugin Deployment Service");
    71       //
    72       // urlLabel
    73       //
    74       this.urlLabel.AutoSize = true;
    75       this.urlLabel.Location = new System.Drawing.Point(12, 18);
    76       this.urlLabel.Name = "urlLabel";
    77       this.urlLabel.Size = new System.Drawing.Size(107, 13);
    78       this.urlLabel.TabIndex = 1;
    79       this.urlLabel.Text = "&Hive Server Address:";
    8057      //
    8158      // userLabel
    8259      //
    8360      this.userLabel.AutoSize = true;
    84       this.userLabel.Location = new System.Drawing.Point(6, 22);
     61      this.userLabel.Location = new System.Drawing.Point(3, 6);
    8562      this.userLabel.Name = "userLabel";
    8663      this.userLabel.Size = new System.Drawing.Size(58, 13);
     
    9269      this.userTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    9370                  | System.Windows.Forms.AnchorStyles.Right)));
    94       this.userTextBox.Location = new System.Drawing.Point(94, 19);
     71      this.userTextBox.Location = new System.Drawing.Point(91, 3);
    9572      this.userTextBox.Name = "userTextBox";
    96       this.userTextBox.Size = new System.Drawing.Size(155, 20);
     73      this.userTextBox.Size = new System.Drawing.Size(189, 20);
    9774      this.userTextBox.TabIndex = 0;
    9875      this.toolTip.SetToolTip(this.userTextBox, "Username used to connect to the HeuristicLab plugin deployment service");
     
    10178      //
    10279      this.passwordLabel.AutoSize = true;
    103       this.passwordLabel.Location = new System.Drawing.Point(6, 48);
     80      this.passwordLabel.Location = new System.Drawing.Point(3, 32);
    10481      this.passwordLabel.Name = "passwordLabel";
    10582      this.passwordLabel.Size = new System.Drawing.Size(56, 13);
     
    11188      this.passwordTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    11289                  | System.Windows.Forms.AnchorStyles.Right)));
    113       this.passwordTextBox.Location = new System.Drawing.Point(94, 45);
     90      this.passwordTextBox.Location = new System.Drawing.Point(91, 29);
    11491      this.passwordTextBox.Name = "passwordTextBox";
    115       this.passwordTextBox.Size = new System.Drawing.Size(155, 20);
     92      this.passwordTextBox.Size = new System.Drawing.Size(189, 20);
    11693      this.passwordTextBox.TabIndex = 1;
    11794      this.toolTip.SetToolTip(this.passwordTextBox, "Passwort used to connect to the HeuristicLab plugin deployment service");
     
    12198      //
    12299      this.applyButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    123       this.applyButton.Location = new System.Drawing.Point(320, 148);
     100      this.applyButton.Location = new System.Drawing.Point(124, 79);
    124101      this.applyButton.Name = "applyButton";
    125102      this.applyButton.Size = new System.Drawing.Size(75, 23);
     
    134111      this.savePasswordCheckbox.AutoSize = true;
    135112      this.savePasswordCheckbox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
    136       this.savePasswordCheckbox.Location = new System.Drawing.Point(6, 71);
     113      this.savePasswordCheckbox.Location = new System.Drawing.Point(3, 55);
    137114      this.savePasswordCheckbox.Name = "savePasswordCheckbox";
    138115      this.savePasswordCheckbox.Size = new System.Drawing.Size(103, 17);
     
    146123      this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    147124      this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
    148       this.cancelButton.Location = new System.Drawing.Point(401, 148);
     125      this.cancelButton.Location = new System.Drawing.Point(205, 79);
    149126      this.cancelButton.Name = "cancelButton";
    150127      this.cancelButton.Size = new System.Drawing.Size(75, 23);
     
    155132      this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
    156133      //
    157       // groupBox1
    158       //
    159       this.groupBox1.Controls.Add(this.userTextBox);
    160       this.groupBox1.Controls.Add(this.userLabel);
    161       this.groupBox1.Controls.Add(this.savePasswordCheckbox);
    162       this.groupBox1.Controls.Add(this.passwordTextBox);
    163       this.groupBox1.Controls.Add(this.passwordLabel);
    164       this.groupBox1.Location = new System.Drawing.Point(12, 41);
    165       this.groupBox1.Name = "groupBox1";
    166       this.groupBox1.Size = new System.Drawing.Size(255, 96);
    167       this.groupBox1.TabIndex = 1;
    168       this.groupBox1.TabStop = false;
    169       this.groupBox1.Text = "User Credentials";
    170       //
    171134      // ConnectionSetupView
    172135      //
     
    175138      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    176139      this.CancelButton = this.cancelButton;
    177       this.ClientSize = new System.Drawing.Size(488, 183);
    178       this.Controls.Add(this.groupBox1);
     140      this.ClientSize = new System.Drawing.Size(292, 114);
     141      this.Controls.Add(this.userTextBox);
     142      this.Controls.Add(this.userLabel);
    179143      this.Controls.Add(this.cancelButton);
     144      this.Controls.Add(this.savePasswordCheckbox);
     145      this.Controls.Add(this.passwordTextBox);
    180146      this.Controls.Add(this.applyButton);
    181       this.Controls.Add(this.urlLabel);
    182       this.Controls.Add(this.urlTextBox);
     147      this.Controls.Add(this.passwordLabel);
    183148      this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
    184149      this.MaximizeBox = false;
     
    189154      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
    190155      this.Text = "Edit Hive Connection Settings";
    191       this.groupBox1.ResumeLayout(false);
    192       this.groupBox1.PerformLayout();
    193156      this.ResumeLayout(false);
    194157      this.PerformLayout();
     
    198161    #endregion
    199162
    200     private System.Windows.Forms.TextBox urlTextBox;
    201     private System.Windows.Forms.Label urlLabel;
    202163    private System.Windows.Forms.Label userLabel;
    203164    private System.Windows.Forms.TextBox userTextBox;
     
    207168    private System.Windows.Forms.CheckBox savePasswordCheckbox;
    208169    private System.Windows.Forms.Button cancelButton;
    209     private System.Windows.Forms.GroupBox groupBox1;
    210170    private System.Windows.Forms.ToolTip toolTip;
    211171  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/ConnectionSetupView.cs

    r4424 r4755  
    2828      InitializeComponent();
    2929
    30       urlTextBox.Text = HeuristicLab.Hive.Experiment.Properties.Settings.Default.HiveServerIp;
    3130      userTextBox.Text = HeuristicLab.Hive.Experiment.Properties.Settings.Default.HiveUsername;
    3231      passwordTextBox.Text = HeuristicLab.Hive.Experiment.Properties.Settings.Default.HivePassword;
     
    3534
    3635    private void applyButton_Click(object sender, EventArgs e) {
    37       HeuristicLab.Hive.Experiment.Properties.Settings.Default.HiveServerIp = urlTextBox.Text;
    3836      if (!savePasswordCheckbox.Checked) {
    3937        // make sure we don't save username or password
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HiveClient.cs

    r4424 r4755  
    2828using HeuristicLab.Hive.Contracts.Interfaces;
    2929using HeuristicLab.Hive.Contracts.ResponseObjects;
     30using HeuristicLab.Common;
    3031
    3132namespace HeuristicLab.Hive.Experiment {
     
    8586      this.log = new Log();
    8687    }
    87 
    88     public override Common.IDeepCloneable Clone(Common.Cloner cloner) {
    89       HiveClient clone = (HiveClient)base.Clone(cloner);
    90       clone.log = (ILog)cloner.Clone(this.log);
    91       clone.hiveExperiments = (HiveExperimentList)cloner.Clone(this.hiveExperiments);
    92       return clone;
     88    protected HiveClient(HiveClient original, Cloner cloner)
     89      : base(original, cloner) {
     90      this.log = cloner.Clone(original.Log);
     91      this.HiveExperiments = cloner.Clone(original.HiveExperiments);
     92    }
     93    public override IDeepCloneable Clone(Cloner cloner) {
     94      return new HiveClient(this, cloner);
    9395    }
    9496
     
    146148      if (handler != null) handler(this, EventArgs.Empty);
    147149    }
    148    
     150
    149151    void hiveExperiments_ItemsRemoved(object sender, Collections.CollectionItemsChangedEventArgs<Collections.IndexedItem<HiveExperiment>> e) {
    150152      if (!currentlyUpdating) {
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HiveExperiment.cs

    r4750 r4755  
    4444    private System.Timers.Timer timer;
    4545
     46    private JobResultPoller jobResultPoller;
     47    private Guid? rootJobId;
     48    private DateTime lastUpdateTime;
     49
     50    #region Properties
    4651    private Guid hiveExperimentId;
    4752    public Guid HiveExperimentId {
     
    6772      get { return log; }
    6873    }
    69 
    70     private DateTime lastUpdateTime;
    71 
     74   
    7275    private string resourceIds;
    7376    public string ResourceIds {
     
    8083      }
    8184    }
    82 
    83     private Guid? rootJobId;
    84 
     85   
    8586    private bool isPollingResults;
    8687    public bool IsPollingResults {
     
    109110      get { return progress; }
    110111    }
    111    
    112     private JobResultPoller jobResultPoller;
     112    #endregion
    113113
    114114    public HiveExperiment()
     
    118118      InitTimer();
    119119    }
    120 
    121120    public HiveExperiment(HiveExperimentDto hiveExperimentDto)
    122121      : this() {
    123122      UpdateFromDto(hiveExperimentDto);
     123    }
     124    protected HiveExperiment(HiveExperiment original, Cloner cloner)
     125      : base(original, cloner) {
     126      this.ResourceIds = original.resourceIds;
     127      this.ExecutionState = original.executionState;
     128      this.ExecutionTime = original.executionTime;
     129      this.log = cloner.Clone(log);
     130      this.lastUpdateTime = original.lastUpdateTime;
     131      this.rootJobId = original.rootJobId;
     132    }
     133    public override IDeepCloneable Clone(Cloner cloner) {
     134      return new HiveExperiment(this, cloner);
    124135    }
    125136
     
    140151        RootJobId = this.rootJobId
    141152      };
    142     }
    143 
    144     public override IDeepCloneable Clone(Cloner cloner) {
    145       LogMessage("I am beeing cloned");
    146       HiveExperiment clone = (HiveExperiment)base.Clone(cloner);
    147       clone.resourceIds = this.resourceIds;
    148       clone.executionState = this.executionState;
    149       clone.executionTime = this.executionTime;
    150       clone.log = (ILog)cloner.Clone(log);
    151       clone.lastUpdateTime = this.lastUpdateTime;
    152       clone.rootJobId = this.rootJobId;
    153       return clone;
    154153    }
    155154
     
    310309    public void Stop() {
    311310      using (Disposable<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
    312         foreach(HiveJob hj in HiveJob.GetAllHiveJobs()) {
     311        foreach (HiveJob hj in HiveJob.GetAllHiveJobs()) {
    313312          service.Obj.AbortJob(hj.JobDto.Id);
    314313        }
     
    591590        childHiveJob.JobDto = allSerializedJobs[jobResult.Id].JobInfo;
    592591        allSerializedJobs.Remove(jobResult.Id); // reduce memory footprint
    593         if(jobCount % 10 == 0) GC.Collect(); // this is needed or otherwise HL takes over the system when the number of jobs is high
     592        if (jobCount % 10 == 0) GC.Collect(); // this is needed or otherwise HL takes over the system when the number of jobs is high
    594593        LoadChildResults(service, childHiveJob, allResults, allSerializedJobs, progress, totalJobCount, ref jobCount);
    595594      }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HiveExperimentList.cs

    r4424 r4755  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Common;
    2526
    2627namespace HeuristicLab.Hive.Experiment {
     
    3233    public HiveExperimentList(IEnumerable<HiveExperiment> collection) : base(collection) { }
    3334
    34     public override Common.IDeepCloneable Clone(Common.Cloner cloner) {
    35       HiveExperiment clone = (HiveExperiment)base.Clone(cloner);
    36       return clone;
     35    [StorableConstructor]
     36    protected HiveExperimentList(bool deserializing) : base(deserializing) { }
     37    protected HiveExperimentList(HiveExperimentList original, Cloner cloner)
     38      : base(original, cloner) {
     39    }
     40    public override IDeepCloneable Clone(Cloner cloner) {
     41      return new HiveExperimentList(this, cloner);
    3742    }
    3843  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HiveJob.cs

    r4750 r4755  
    119119      syncJobsWithOptimizers = true;
    120120    }
    121 
    122121    public HiveJob(JobDto jobDto)
    123122      : this() {
    124123      this.JobDto = jobDto;
    125124    }
    126 
    127125    public HiveJob(JobResult jobResult)
    128126      : this() {
    129127      UpdateFromJobResult(jobResult);
    130128    }
    131 
    132129    public HiveJob(OptimizerJob optimizerJob, bool autoCreateChildHiveJobs)
    133130      : this() {
     
    136133      this.syncJobsWithOptimizers = true;
    137134    }
    138 
    139135    public HiveJob(IOptimizer optimizer)
    140136      : this() {
    141137      this.Job = new OptimizerJob(optimizer);
    142138    }
    143 
    144139    public HiveJob(SerializedJob serializedJob, bool autoCreateChildHiveJobs)
    145140      : this() {
     
    148143      this.Job = SerializedJob.Deserialize<OptimizerJob>(serializedJob.SerializedJobData);
    149144      this.syncJobsWithOptimizers = true;
     145    }
     146    [StorableConstructor]
     147    protected HiveJob(bool deserializing) : base(deserializing) { }
     148    protected HiveJob(HiveJob original, Cloner cloner)
     149      : base(original, cloner) {
     150      this.JobDto = cloner.Clone(original.jobDto);
     151      this.Job = cloner.Clone(original.job);
     152    }
     153    public override IDeepCloneable Clone(Cloner cloner) {
     154      return new HiveJob(this, cloner);
    150155    }
    151156
     
    213218      }
    214219    }
    215        
     220
    216221    void batchRun_AlgorithmChanged(object sender, EventArgs e) {
    217222      if (syncJobsWithOptimizers) {
     
    226231      }
    227232    }
    228    
     233
    229234    void Job_ToStringChanged(object sender, EventArgs e) {
    230235      this.OnToStringChanged();
     
    484489    }
    485490
    486     public override IDeepCloneable Clone(Cloner cloner) {
    487       LogMessage("I am beeing cloned");
    488       HiveJob clone = (HiveJob)base.Clone(cloner);
    489       clone.jobDto = (JobDto)cloner.Clone(this.jobDto);
    490       clone.job = (OptimizerJob)cloner.Clone(this.job);
    491       return clone;
    492     }
    493 
    494491    /// <summary>
    495492    /// Returns a list of HiveJobs including this and all its child-jobs recursively
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HiveJobList.cs

    r4750 r4755  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Common;
    2526
    2627namespace HeuristicLab.Hive.Experiment {
     
    3233    public HiveJobList(IEnumerable<HiveJob> collection) : base(collection) { }
    3334
    34     public override Common.IDeepCloneable Clone(Common.Cloner cloner) {
    35       HiveJobList clone = (HiveJobList)base.Clone(cloner);
    36       return clone;
     35    [StorableConstructor]
     36    protected HiveJobList(bool deserializing) : base(deserializing) { }
     37    protected HiveJobList(HiveJobList original, Cloner cloner)
     38      : base(original, cloner) {
     39    }
     40    public override IDeepCloneable Clone(Cloner cloner) {
     41      return new HiveJobList(this, cloner);
    3742    }
    3843  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/Jobs/JobList.cs

    r4424 r4755  
    2424using HeuristicLab.Hive.JobBase;
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HeuristicLab.Common;
    2627
    2728namespace HeuristicLab.Hive.Experiment.Jobs {
     
    3334    public JobList(IEnumerable<IJob> collection) : base(collection) { }
    3435
    35     public override Common.IDeepCloneable Clone(Common.Cloner cloner) {
    36       HiveJobList clone = (HiveJobList)base.Clone(cloner);
    37       return clone;
     36    [StorableConstructor]
     37    protected JobList(bool deserializing) : base(deserializing) { }
     38    protected JobList(JobList original, Cloner cloner)
     39      : base(original, cloner) {
     40    }
     41    public override IDeepCloneable Clone(Cloner cloner) {
     42      return new JobList(this, cloner);
    3843    }
    3944  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/Jobs/OptimizerJob.cs

    r4750 r4755  
    3131  [Item("Optimizer Job", "Represents Job which executes a IOptimizer object.")]
    3232  [StorableClass]
    33   public class OptimizerJob : IJob {
     33  public class OptimizerJob : DeepCloneable, IJob {
    3434    [Storable]
    3535    protected IOptimizer optimizer;
     
    8282      this.log = new Log();
    8383    }
    84 
    8584    public OptimizerJob(IOptimizer optimizer)
    8685      : this() {
     
    9594      }
    9695    }
    97 
     96    [StorableConstructor]
     97    protected OptimizerJob(bool deserializing) { }
     98    protected OptimizerJob(OptimizerJob original, Cloner cloner)
     99      : base(original, cloner) {
     100      this.Optimizer = cloner.Clone(original.Optimizer);
     101      this.log = cloner.Clone(original.Log);
     102      this.ComputeInParallel = original.ComputeInParallel;
     103      this.IndexInParentOptimizerList = original.IndexInParentOptimizerList;
     104      this.CollectChildJobs = original.CollectChildJobs;
     105      this.RegisterEvents();
     106    }
     107    public override IDeepCloneable Clone(Cloner cloner) {
     108      return new OptimizerJob(this, cloner);
     109    }
     110    public object Clone() {
     111      return Clone(new Cloner());
     112    }
    98113    [StorableHook(HookType.AfterDeserialization)]
    99114    protected virtual void AfterDeserialization() {
     
    267282    protected virtual void OnDescriptionChanged() {
    268283      var handler = DescriptionChanged;
    269       if(handler != null) handler(this, EventArgs.Empty);
     284      if (handler != null) handler(this, EventArgs.Empty);
    270285    }
    271286    public event EventHandler ItemImageChanged;
     
    307322    public Version ItemVersion {
    308323      get { return optimizer.ItemVersion; }
    309     }
    310 
    311     #endregion
    312 
    313     #region IDeepCloneable Members
    314 
    315     public Common.IDeepCloneable Clone(Cloner cloner) {
    316       OptimizerJob clone = (OptimizerJob)Activator.CreateInstance(this.GetType());
    317       cloner.RegisterClonedObject(this, clone);
    318       clone.Optimizer = (IOptimizer)cloner.Clone(this.Optimizer);
    319       clone.log = (ILog)cloner.Clone(this.Log);
    320       clone.ComputeInParallel = this.ComputeInParallel;
    321       clone.IndexInParentOptimizerList = this.IndexInParentOptimizerList;
    322       clone.CollectChildJobs = this.CollectChildJobs;
    323       clone.RegisterEvents();
    324       return clone;
    325     }
    326 
    327     #endregion
    328 
    329     #region ICloneable Members
    330 
    331     public object Clone() {
    332       return Clone(new Cloner());
    333324    }
    334325
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/Properties/Settings.Designer.cs

    r4305 r4755  
    2626        [global::System.Configuration.UserScopedSettingAttribute()]
    2727        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    28         [global::System.Configuration.DefaultSettingValueAttribute("MyGroup")]
     28        [global::System.Configuration.DefaultSettingValueAttribute("HEAL")]
    2929        public string ResourceIds {
    3030            get {
     
    3838        [global::System.Configuration.UserScopedSettingAttribute()]
    3939        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    40         [global::System.Configuration.DefaultSettingValueAttribute("localhost")]
    41         public string HiveServerIp {
    42             get {
    43                 return ((string)(this["HiveServerIp"]));
    44             }
    45             set {
    46                 this["HiveServerIp"] = value;
    47             }
    48         }
    49        
    50         [global::System.Configuration.UserScopedSettingAttribute()]
    51         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    52         [global::System.Configuration.DefaultSettingValueAttribute("cneumueller")]
     40        [global::System.Configuration.DefaultSettingValueAttribute("cneumuel")]
    5341        public string HiveUsername {
    5442            get {
     
    6250        [global::System.Configuration.UserScopedSettingAttribute()]
    6351        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    64         [global::System.Configuration.DefaultSettingValueAttribute("cneumueller")]
     52        [global::System.Configuration.DefaultSettingValueAttribute("")]
    6553        public string HivePassword {
    6654            get {
     
    7159            }
    7260        }
    73        
    74         [global::System.Configuration.UserScopedSettingAttribute()]
    75         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    76         [global::System.Configuration.DefaultSettingValueAttribute("9000")]
    77         public string HiveServerPort {
    78             get {
    79                 return ((string)(this["HiveServerPort"]));
    80             }
    81             set {
    82                 this["HiveServerPort"] = value;
    83             }
    84         }
    8561    }
    8662}
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/Properties/Settings.settings

    r4305 r4755  
    44  <Settings>
    55    <Setting Name="ResourceIds" Type="System.String" Scope="User">
    6       <Value Profile="(Default)">MyGroup</Value>
    7     </Setting>
    8     <Setting Name="HiveServerIp" Type="System.String" Scope="User">
    9       <Value Profile="(Default)">localhost</Value>
     6      <Value Profile="(Default)">HEAL</Value>
    107    </Setting>
    118    <Setting Name="HiveUsername" Type="System.String" Scope="User">
    12       <Value Profile="(Default)">cneumueller</Value>
     9      <Value Profile="(Default)">cneumuel</Value>
    1310    </Setting>
    1411    <Setting Name="HivePassword" Type="System.String" Scope="User">
    15       <Value Profile="(Default)">cneumueller</Value>
    16     </Setting>
    17     <Setting Name="HiveServerPort" Type="System.String" Scope="User">
    18       <Value Profile="(Default)">9000</Value>
     12      <Value Profile="(Default)" />
    1913    </Setting>
    2014  </Settings>
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/ServiceLocator.cs

    r4750 r4755  
    4545    internal void Default_SettingChanging(object sender, System.Configuration.SettingChangingEventArgs e) {
    4646      if (clientFacadePool != null) {
    47         clientFacadePool.HostAddress = Settings.Default.HiveServerIp;
    4847        clientFacadePool.Username = Settings.Default.HiveUsername;
    4948        clientFacadePool.Password = Settings.Default.HivePassword;
    5049      }
    5150      if (streamedClientFacadePool != null) {
    52         streamedClientFacadePool.HostAddress = Settings.Default.HiveServerIp;
    5351        streamedClientFacadePool.Username = Settings.Default.HiveUsername;
    5452        streamedClientFacadePool.Password = Settings.Default.HivePassword;
     
    5957      get {
    6058        if (clientFacadePool == null) {
    61           clientFacadePool = new WcfServicePool<IClientFacade>(Settings.Default.HiveServerIp, Settings.Default.HiveUsername, Settings.Default.HivePassword, "ClientHttpEndpoint");
     59          clientFacadePool = new WcfServicePool<IClientFacade>(Settings.Default.HiveUsername, Settings.Default.HivePassword, "ClientHttpEndpoint");
    6260        }
    6361        return clientFacadePool;
     
    6866      get {
    6967        if (streamedClientFacadePool == null) {
    70           streamedClientFacadePool = new WcfServicePool<IClientFacade>(Settings.Default.HiveServerIp, Settings.Default.HiveUsername, Settings.Default.HivePassword, "ClientTcpStreamedEndpoint");
     68          streamedClientFacadePool = new WcfServicePool<IClientFacade>(Settings.Default.HiveUsername, Settings.Default.HivePassword, "ClientTcpStreamedEndpoint");
    7169        }
    7270        return streamedClientFacadePool;
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/app.config

    r4710 r4755  
    99    <HeuristicLab.Hive.Experiment.Properties.Settings>
    1010      <setting name="ResourceIds" serializeAs="String">
    11         <value>MyGroup</value>
    12       </setting>
    13       <setting name="HiveServerIp" serializeAs="String">
    14         <value>localhost</value>
     11        <value>HEAL</value>
    1512      </setting>
    1613      <setting name="HiveUsername" serializeAs="String">
    17         <value>cneumueller</value>
     14        <value>cneumuel</value>
    1815      </setting>
    1916      <setting name="HivePassword" serializeAs="String">
    20         <value>cneumueller</value>
    21       </setting>
    22       <setting name="HiveServerPort" serializeAs="String">
    23         <value>9000</value>
     17        <value />
    2418      </setting>
    2519    </HeuristicLab.Hive.Experiment.Properties.Settings>
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ClientFacade.cs

    r4424 r4755  
    4242
    4343    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    44     [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     44    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.User)]
    4545    public ResponseObject<JobDto> AddJob(SerializedJob job) {
    4646      using (contextFactory.GetContext()) {
     
    5050
    5151    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    52     [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     52    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.User)]
    5353    public ResponseObject<JobDto> AddJobWithGroupStrings(SerializedJob job, IEnumerable<string> resources) {
    5454      using (contextFactory.GetContext()) {
     
    5858
    5959    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    60     [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     60    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.User)]
    6161    public Response RequestSnapshot(Guid jobId) {
    6262      using (contextFactory.GetContext()) {
     
    6767
    6868    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    69     [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     69    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.User)]
    7070    public ResponseObject<SerializedJob> GetLastSerializedResult(Guid jobId) {
    7171      using (contextFactory.GetContext(false)) {
     
    7676
    7777    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    78     [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     78    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.User)]
    7979    public ResponseObject<SerializedJob> GetSnapshotResult(Guid jobId) {
    8080      using (contextFactory.GetContext(false)) {
     
    8585
    8686    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    87     [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     87    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.User)]
    8888    public ResponseObject<JobDto> GetJobById(Guid jobId) {
    8989      using (contextFactory.GetContext(false)) {
     
    9494
    9595    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    96     [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     96    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.User)]
    9797    public Response AbortJob(Guid jobId) {
    9898      using (contextFactory.GetContext()) {
     
    103103
    104104    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    105     [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     105    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.User)]
    106106    public ResponseObject<JobResultList> GetJobResults(IEnumerable<Guid> jobIds) {
    107107      using (contextFactory.GetContext(false)) {
     
    112112
    113113    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    114     [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     114    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.User)]
    115115    public ResponseObject<JobResultList> GetChildJobResults(Guid? parentJobId, bool recursive, bool includeParent) {
    116116      using (contextFactory.GetContext(false)) {
     
    124124
    125125    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    126     [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     126    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.User)]
    127127    public ResponseObject<HiveExperimentDtoList> GetHiveExperiments() {
    128128      using (contextFactory.GetContext(false)) {
     
    132132
    133133    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    134     [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     134    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.User)]
    135135    public ResponseObject<HiveExperimentDto> UpdateHiveExperiment(HiveExperimentDto hiveExperimentDto) {
    136136      using (contextFactory.GetContext()) {
     
    145145
    146146    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    147     [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     147    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.User)]
    148148    public Response DeleteHiveExperiment(Guid hiveExperimentId) {
    149149      using (contextFactory.GetContext()) {
     
    157157
    158158    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    159     [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     159    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.User)]
    160160    public ResponseObject<JobDto> AddChildJob(Guid parentJobId, SerializedJob serializedJob) {
    161161      using (contextFactory.GetContext()) {
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HiveWeb/App_Code/HiveServerModule.cs

    r4751 r4755  
    2424    public void Dispose() {
    2525      lock (locker) {
    26         lifecycleManager.Stop();
     26        if(lifecycleManager != null) lifecycleManager.Stop();
    2727      }
    2828    }
Note: See TracChangeset for help on using the changeset viewer.