Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/08/11 14:37:52 (13 years ago)
Author:
ascheibe
Message:

#1233 Review comments: renamed HiveEperiment to Job

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

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.3/HiveClient.cs

    r6721 r6723  
    8686        var oldExperiments = hiveExperiments ?? new ItemCollection<RefreshableHiveExperiment>();
    8787        hiveExperiments = new HiveItemCollection<RefreshableHiveExperiment>();
    88         var experimentsLoaded = ServiceLocator.Instance.CallHiveService<IEnumerable<HiveExperiment>>(s => s.GetHiveExperiments());
     88        var experimentsLoaded = ServiceLocator.Instance.CallHiveService<IEnumerable<Job>>(s => s.GetHiveExperiments());
    8989
    9090        foreach (var he in experimentsLoaded) {
     
    141141          HiveClient.Instance.UploadExperiment((RefreshableHiveExperiment)item, cancellationToken);
    142142        }
    143         if (item is HiveExperimentPermission) {
    144           var hep = (HiveExperimentPermission)item;
     143        if (item is JobPermission) {
     144          var hep = (JobPermission)item;
    145145          hep.GrantedUserId = ServiceLocator.Instance.CallHiveService((s) => s.GetUserIdByUsername(hep.GrantedUserName));
    146146          if (hep.GrantedUserId == Guid.Empty) {
    147147            throw new ArgumentException(string.Format("The user {0} was not found.", hep.GrantedUserName));
    148148          }
    149           ServiceLocator.Instance.CallHiveService((s) => s.GrantPermission(hep.HiveExperimentId, hep.GrantedUserId, hep.Permission));
     149          ServiceLocator.Instance.CallHiveService((s) => s.GrantPermission(hep.JobId, hep.GrantedUserId, hep.Permission));
    150150        }
    151151      } else {
    152         if (item is HiveExperiment)
    153           ServiceLocator.Instance.CallHiveService(s => s.UpdateHiveExperiment((HiveExperiment)item));
     152        if (item is Job)
     153          ServiceLocator.Instance.CallHiveService(s => s.UpdateHiveExperiment((Job)item));
    154154      }
    155155    }
     
    176176        return;
    177177
    178       if (item is HiveExperiment)
     178      if (item is Job)
    179179        ServiceLocator.Instance.CallHiveService(s => s.DeleteHiveExperiment(item.Id));
    180180      if (item is RefreshableHiveExperiment)
    181181        ServiceLocator.Instance.CallHiveService(s => s.DeleteHiveExperiment(item.Id));
    182       if (item is HiveExperimentPermission) {
    183         var hep = (HiveExperimentPermission)item;
    184         ServiceLocator.Instance.CallHiveService(s => s.RevokePermission(hep.HiveExperimentId, hep.GrantedUserId));
     182      if (item is JobPermission) {
     183        var hep = (JobPermission)item;
     184        ServiceLocator.Instance.CallHiveService(s => s.RevokePermission(hep.JobId, hep.GrantedUserId));
    185185      }
    186186      item.Id = Guid.Empty;
     
    258258        }
    259259
    260         // upload HiveExperiment
    261         refreshableHiveExperiment.Progress.Status = "Uploading HiveExperiment...";
     260        // upload Job
     261        refreshableHiveExperiment.Progress.Status = "Uploading Job...";
    262262        refreshableHiveExperiment.HiveExperiment.Id = ServiceLocator.Instance.CallHiveService((s) => s.AddHiveExperiment(refreshableHiveExperiment.HiveExperiment));
    263263        bool isPrivileged = refreshableHiveExperiment.HiveExperiment.IsPrivileged;
     
    365365        cancellationToken.ThrowIfCancellationRequested();
    366366        hiveJob.Job.PluginsNeededIds.Add(configPluginId);
    367         hiveJob.Job.HiveExperimentId = hiveExperimentId;
     367        hiveJob.Job.JobId = hiveExperimentId;
    368368        hiveJob.Job.IsPrivileged = isPrivileged;
    369369
     
    506506    }
    507507
    508     public static HiveItemCollection<HiveExperimentPermission> GetHiveExperimentPermissions(Guid hiveExperimentId) {
     508    public static HiveItemCollection<JobPermission> GetHiveExperimentPermissions(Guid hiveExperimentId) {
    509509      return ServiceLocator.Instance.CallHiveService((service) => {
    510         IEnumerable<HiveExperimentPermission> heps = service.GetHiveExperimentPermissions(hiveExperimentId);
     510        IEnumerable<JobPermission> heps = service.GetHiveExperimentPermissions(hiveExperimentId);
    511511        foreach (var hep in heps) {
    512512          hep.GrantedUserName = service.GetUsernameByUserId(hep.GrantedUserId);
    513513        }
    514         return new HiveItemCollection<HiveExperimentPermission>(heps);
     514        return new HiveItemCollection<JobPermission>(heps);
    515515      });
    516516    }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.3/RefreshableHiveExperiment.cs

    r6721 r6723  
    3535    private static object locker = new object();
    3636
    37     private HiveExperiment hiveExperiment;
    38     public HiveExperiment HiveExperiment {
     37    private Job hiveExperiment;
     38    public Job HiveExperiment {
    3939      get { return hiveExperiment; }
    4040      set {
     
    192192    public RefreshableHiveExperiment() {
    193193      this.refreshAutomatically = true;
    194       this.HiveExperiment = new HiveExperiment();
     194      this.HiveExperiment = new Job();
    195195      this.log = new ThreadSafeLog(new Log());
    196196      this.jobDownloader = new ConcurrentJobDownloader<ItemJob>(2, 2);
     
    198198      this.HiveJobs = new ItemCollection<HiveJob>();
    199199    }
    200     public RefreshableHiveExperiment(HiveExperiment hiveExperiment) {
     200    public RefreshableHiveExperiment(Job hiveExperiment) {
    201201      this.refreshAutomatically = true;
    202202      this.HiveExperiment = hiveExperiment;
     
    350350    #endregion
    351351
    352     #region HiveExperiment Events
     352    #region Job Events
    353353    private void RegisterHiveExperimentEvents() {
    354354      hiveExperiment.ToStringChanged += new EventHandler(OnToStringChanged);
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.3/ServiceClients/HiveExperiment.cs

    r6479 r6723  
    2525
    2626namespace HeuristicLab.Clients.Hive {
    27   public partial class HiveExperiment : IDeepCloneable, IContent {
     27  public partial class Job : IDeepCloneable, IContent {
    2828
    2929    private bool isPrivileged;
     
    3434
    3535    #region Constructors and Cloning
    36     public HiveExperiment() {
     36    public Job() {
    3737      this.ResourceNames = "HEAL";
    3838      this.DateCreated = DateTime.Now;
     
    4040    }
    4141
    42     protected HiveExperiment(HiveExperiment original, Cloner cloner) {
     42    protected Job(Job original, Cloner cloner) {
    4343      cloner.RegisterClonedObject(original, this);
    4444      this.OwnerUserId = original.OwnerUserId;
     
    5353    }
    5454    public override IDeepCloneable Clone(Cloner cloner) {
    55       return new HiveExperiment(this, cloner);
     55      return new Job(this, cloner);
    5656    }
    5757    #endregion
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.3/ServiceClients/HiveExperimentPermission.cs

    r6479 r6723  
    2424
    2525namespace HeuristicLab.Clients.Hive {
    26   public partial class HiveExperimentPermission : IDeepCloneable, IContent {
     26  public partial class JobPermission : IDeepCloneable, IContent {
    2727
    2828    private string grantedUserName;
     
    3838
    3939    #region Constructors and Cloning
    40     public HiveExperimentPermission() {
     40    public JobPermission() {
    4141      this.Permission = Permission.Read;
    4242      this.PropertyChanged += new PropertyChangedEventHandler(HiveExperimentPermission_PropertyChanged);
    4343    }
    4444
    45     protected HiveExperimentPermission(HiveExperimentPermission original, Cloner cloner)
     45    protected JobPermission(JobPermission original, Cloner cloner)
    4646      : base(original, cloner) {
    4747      this.GrantedByUserId = original.GrantedByUserId;
    4848      this.GrantedUserId = original.GrantedUserId;
    49       this.HiveExperimentId = original.HiveExperimentId;
     49      this.JobId = original.JobId;
    5050      this.Permission = original.Permission;
    5151    }
    5252    public override IDeepCloneable Clone(Cloner cloner) {
    53       return new HiveExperimentPermission(this, cloner);
     53      return new JobPermission(this, cloner);
    5454    }
    5555    #endregion
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.3/ServiceClients/HiveServiceClient.cs

    r6721 r6723  
    2020  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Task))]
    2121  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Downtime))]
    22   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.HiveExperimentPermission))]
     22  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.JobPermission))]
    2323  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.PluginData))]
    2424  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.NamedHiveItem))]
    25   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.HiveExperiment))]
     25  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Job))]
    2626  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Plugin))]
    2727  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Resource))]
     
    281281
    282282    [System.Runtime.Serialization.OptionalFieldAttribute()]
    283     private System.Guid HiveExperimentIdField;
    284 
    285     [System.Runtime.Serialization.OptionalFieldAttribute()]
    286283    private bool IsParentJobField;
    287284
    288285    [System.Runtime.Serialization.OptionalFieldAttribute()]
    289286    private bool IsPrivilegedField;
     287
     288    [System.Runtime.Serialization.OptionalFieldAttribute()]
     289    private System.Guid JobIdField;
    290290
    291291    [System.Runtime.Serialization.OptionalFieldAttribute()]
     
    328328
    329329    [System.Runtime.Serialization.DataMemberAttribute()]
    330     public System.Guid HiveExperimentId {
    331       get {
    332         return this.HiveExperimentIdField;
    333       }
    334       set {
    335         if ((this.HiveExperimentIdField.Equals(value) != true)) {
    336           this.HiveExperimentIdField = value;
    337           this.RaisePropertyChanged("HiveExperimentId");
    338         }
    339       }
    340     }
    341 
    342     [System.Runtime.Serialization.DataMemberAttribute()]
    343330    public bool IsParentJob {
    344331      get {
     
    367354
    368355    [System.Runtime.Serialization.DataMemberAttribute()]
     356    public System.Guid JobId {
     357      get {
     358        return this.JobIdField;
     359      }
     360      set {
     361        if ((this.JobIdField.Equals(value) != true)) {
     362          this.JobIdField = value;
     363          this.RaisePropertyChanged("JobId");
     364        }
     365      }
     366    }
     367
     368    [System.Runtime.Serialization.DataMemberAttribute()]
    369369    public System.Nullable<System.DateTime> LastHeartbeat {
    370370      get {
     
    524524  [System.Diagnostics.DebuggerStepThroughAttribute()]
    525525  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    526   [System.Runtime.Serialization.DataContractAttribute(Name = "HiveExperimentPermission", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.DataTransfer")]
     526  [System.Runtime.Serialization.DataContractAttribute(Name = "JobPermission", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.DataTransfer")]
    527527  [System.SerializableAttribute()]
    528   public partial class HiveExperimentPermission : HeuristicLab.Clients.Hive.HiveItem {
     528  public partial class JobPermission : HeuristicLab.Clients.Hive.HiveItem {
    529529
    530530    [System.Runtime.Serialization.OptionalFieldAttribute()]
     
    535535
    536536    [System.Runtime.Serialization.OptionalFieldAttribute()]
    537     private System.Guid HiveExperimentIdField;
     537    private System.Guid JobIdField;
    538538
    539539    [System.Runtime.Serialization.OptionalFieldAttribute()]
     
    567567
    568568    [System.Runtime.Serialization.DataMemberAttribute()]
    569     public System.Guid HiveExperimentId {
    570       get {
    571         return this.HiveExperimentIdField;
    572       }
    573       set {
    574         if ((this.HiveExperimentIdField.Equals(value) != true)) {
    575           this.HiveExperimentIdField = value;
    576           this.RaisePropertyChanged("HiveExperimentId");
     569    public System.Guid JobId {
     570      get {
     571        return this.JobIdField;
     572      }
     573      set {
     574        if ((this.JobIdField.Equals(value) != true)) {
     575          this.JobIdField = value;
     576          this.RaisePropertyChanged("JobId");
    577577        }
    578578      }
     
    652652  [System.Runtime.Serialization.DataContractAttribute(Name = "NamedHiveItem", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.DataTransfer")]
    653653  [System.SerializableAttribute()]
    654   [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.HiveExperiment))]
     654  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Job))]
    655655  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Plugin))]
    656656  [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Resource))]
     
    694694  [System.Diagnostics.DebuggerStepThroughAttribute()]
    695695  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    696   [System.Runtime.Serialization.DataContractAttribute(Name = "HiveExperiment", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.DataTransfer")]
     696  [System.Runtime.Serialization.DataContractAttribute(Name = "Job", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.DataTransfer")]
    697697  [System.SerializableAttribute()]
    698   public partial class HiveExperiment : HeuristicLab.Clients.Hive.NamedHiveItem {
     698  public partial class Job : HeuristicLab.Clients.Hive.NamedHiveItem {
    699699
    700700    [System.Runtime.Serialization.OptionalFieldAttribute()]
     
    16481648
    16491649    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/GetHiveExperiment", ReplyAction = "http://tempuri.org/IHiveService/GetHiveExperimentResponse")]
    1650     HeuristicLab.Clients.Hive.HiveExperiment GetHiveExperiment(System.Guid id);
     1650    HeuristicLab.Clients.Hive.Job GetHiveExperiment(System.Guid id);
    16511651
    16521652    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/GetHiveExperiments", ReplyAction = "http://tempuri.org/IHiveService/GetHiveExperimentsResponse")]
    1653     System.Collections.Generic.List<HeuristicLab.Clients.Hive.HiveExperiment> GetHiveExperiments();
     1653    System.Collections.Generic.List<HeuristicLab.Clients.Hive.Job> GetHiveExperiments();
    16541654
    16551655    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/GetAllHiveExperiments", ReplyAction = "http://tempuri.org/IHiveService/GetAllHiveExperimentsResponse")]
    1656     System.Collections.Generic.List<HeuristicLab.Clients.Hive.HiveExperiment> GetAllHiveExperiments();
     1656    System.Collections.Generic.List<HeuristicLab.Clients.Hive.Job> GetAllHiveExperiments();
    16571657
    16581658    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/AddHiveExperiment", ReplyAction = "http://tempuri.org/IHiveService/AddHiveExperimentResponse")]
    1659     System.Guid AddHiveExperiment(HeuristicLab.Clients.Hive.HiveExperiment hiveExperimentDto);
     1659    System.Guid AddHiveExperiment(HeuristicLab.Clients.Hive.Job hiveExperimentDto);
    16601660
    16611661    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/UpdateHiveExperiment", ReplyAction = "http://tempuri.org/IHiveService/UpdateHiveExperimentResponse")]
    1662     void UpdateHiveExperiment(HeuristicLab.Clients.Hive.HiveExperiment hiveExperimentDto);
     1662    void UpdateHiveExperiment(HeuristicLab.Clients.Hive.Job hiveExperimentDto);
    16631663
    16641664    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/DeleteHiveExperiment", ReplyAction = "http://tempuri.org/IHiveService/DeleteHiveExperimentResponse")]
     
    16721672
    16731673    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/GetHiveExperimentPermissions", ReplyAction = "http://tempuri.org/IHiveService/GetHiveExperimentPermissionsResponse")]
    1674     System.Collections.Generic.List<HeuristicLab.Clients.Hive.HiveExperimentPermission> GetHiveExperimentPermissions(System.Guid hiveExperimentId);
     1674    System.Collections.Generic.List<HeuristicLab.Clients.Hive.JobPermission> GetHiveExperimentPermissions(System.Guid hiveExperimentId);
    16751675
    16761676    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/IsAllowedPrivileged", ReplyAction = "http://tempuri.org/IHiveService/IsAllowedPrivilegedResponse")]
     
    18741874    }
    18751875
    1876     public HeuristicLab.Clients.Hive.HiveExperiment GetHiveExperiment(System.Guid id) {
     1876    public HeuristicLab.Clients.Hive.Job GetHiveExperiment(System.Guid id) {
    18771877      return base.Channel.GetHiveExperiment(id);
    18781878    }
    18791879
    1880     public System.Collections.Generic.List<HeuristicLab.Clients.Hive.HiveExperiment> GetHiveExperiments() {
     1880    public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Job> GetHiveExperiments() {
    18811881      return base.Channel.GetHiveExperiments();
    18821882    }
    18831883
    1884     public System.Collections.Generic.List<HeuristicLab.Clients.Hive.HiveExperiment> GetAllHiveExperiments() {
     1884    public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Job> GetAllHiveExperiments() {
    18851885      return base.Channel.GetAllHiveExperiments();
    18861886    }
    18871887
    1888     public System.Guid AddHiveExperiment(HeuristicLab.Clients.Hive.HiveExperiment hiveExperimentDto) {
     1888    public System.Guid AddHiveExperiment(HeuristicLab.Clients.Hive.Job hiveExperimentDto) {
    18891889      return base.Channel.AddHiveExperiment(hiveExperimentDto);
    18901890    }
    18911891
    1892     public void UpdateHiveExperiment(HeuristicLab.Clients.Hive.HiveExperiment hiveExperimentDto) {
     1892    public void UpdateHiveExperiment(HeuristicLab.Clients.Hive.Job hiveExperimentDto) {
    18931893      base.Channel.UpdateHiveExperiment(hiveExperimentDto);
    18941894    }
     
    19061906    }
    19071907
    1908     public System.Collections.Generic.List<HeuristicLab.Clients.Hive.HiveExperimentPermission> GetHiveExperimentPermissions(System.Guid hiveExperimentId) {
     1908    public System.Collections.Generic.List<HeuristicLab.Clients.Hive.JobPermission> GetHiveExperimentPermissions(System.Guid hiveExperimentId) {
    19091909      return base.Channel.GetHiveExperimentPermissions(hiveExperimentId);
    19101910    }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.3/ServiceClients/Task.cs

    r6721 r6723  
    3838      this.IsParentJob = original.IsParentJob;
    3939      this.FinishWhenChildJobsFinished = original.FinishWhenChildJobsFinished;
    40       this.HiveExperimentId = original.HiveExperimentId;
     40      this.JobId = original.JobId;
    4141      this.IsPrivileged = original.IsPrivileged;
    4242    }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.3/Util/PluginUtil.cs

    r6452 r6723  
    3636    /// <param name="service">An active service-proxy</param>
    3737    /// <param name="onlinePlugins">List of plugins which are available online</param>
    38     /// <param name="alreadyUploadedPlugins">List of plugins which have been uploaded from this HiveExperiment</param>
     38    /// <param name="alreadyUploadedPlugins">List of plugins which have been uploaded from this Job</param>
    3939    /// <param name="neededPlugins">List of plugins which need to be uploaded</param>
    4040    /// <returns></returns>
Note: See TracChangeset for help on using the changeset viewer.