Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/14/10 17:45:06 (14 years ago)
Author:
cneumuel
Message:

worked on implementation new data layer and server components (#1233)

Location:
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New
Files:
10 added
1 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.Common/3.3/ApplicationConstants.cs

    r4594 r4598  
    3333    public static System.Transactions.IsolationLevel ISOLATION_LEVEL_SCOPE = System.Transactions.IsolationLevel.ReadUncommitted;
    3434
    35     public static int HEARTBEAT_MAX_DIF = 120; // value in seconds
     35    public static int HEARTBEAT_TIMEOUT = 120; // value in seconds
    3636   
    3737    public static int JOB_TIME_TO_LIVE = 5;
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.Common/3.3/DataTransfer/HivePluginData.cs

    r4593 r4598  
    2222using System;
    2323using System.Runtime.Serialization;
    24 using HeuristicLab.Common;
    2524
    2625namespace HeuristicLab.Services.Hive.Common.DataTransfer {
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.Common/3.3/DataTransfer/Job.cs

    r4593 r4598  
    3434    public Guid UserId { get; set; }
    3535    [DataMember]
    36     public Slave Slave { get; set; }
     36    public Guid SlaveId { get; set; }
    3737    [DataMember]
    3838    public int Priority { get; set; }
     
    4242    public int MemoryNeeded { get; set; }
    4343    [DataMember]
    44     public List<HivePlugin> PluginsNeeded { get; set; }
     44    public List<Guid> PluginsNeededIds { get; set; }
    4545    [DataMember]
    4646    public List<Guid> AssignedResourceIds { get; set; }
    4747    [DataMember]
    48     public Project Project { get; set; }
     48    public Guid ProjectId { get; set; }
    4949
    5050    public override string ToString() {
    51       return base.ToString() + "State: " + State + ", [Ressource : " + Slave + " ] , DateCreated: " + DateCreated + ", DateCalculated: " + DateCalculated +
     51      return base.ToString() + "State: " + State + ", [SlaveId : " + SlaveId + " ] , DateCreated: " + DateCreated + ", DateCalculated: " + DateCalculated +
    5252        "Priority: " + Priority + ", CoresNeeded: " + CoresNeeded + "AssignedResources: " + AssignedResourceIds;
    5353    }
    5454
    5555    public Job() {
    56       PluginsNeeded = new List<HivePlugin>();
     56      PluginsNeededIds = new List<Guid>();
    5757      AssignedResourceIds = new List<Guid>();
    5858    }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.Common/3.3/DataTransfer/JobData.cs

    r4593 r4598  
    2323using System.IO;
    2424using System.Runtime.Serialization;
    25 using HeuristicLab.Common;
    2625
    2726namespace HeuristicLab.Services.Hive.Common.DataTransfer {
     
    3029  public class JobData : HiveItem {
    3130    [DataMember]
    32     public Job Job { get; set; }
     31    public Guid JobId { get; set; }
    3332    [DataMember]
    3433    public byte[] Data { get; set; }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.Common/3.3/DataTransfer/JobState.cs

    r4593 r4598  
    3131    /// Job is waiting to be calculated
    3232    /// </summary>
    33     Offline,
     33    Waiting,
    3434
    3535    /// <summary>
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.Common/3.3/DataTransfer/LightweightJob.cs

    r4593 r4598  
    4343    [DataMember]
    4444    public Guid? ParentJobId { get; set; }
     45
     46    public LightweightJob() { }
     47
     48    public LightweightJob(Job job) {
     49      this.SlaveId = job.SlaveId;
     50      this.State = job.State;
     51      this.ExecutionTime = job.ExecutionTime;
     52      this.Exception = job.Exception;
     53      this.DateCreated = job.DateCreated;
     54      this.DateCalculated = job.DateCalculated;
     55      this.DateFinished = job.DateFinished;
     56      this.ParentJobId = job.ParentJobId;
     57    }
    4558  }
    4659}
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.Common/3.3/HeuristicLab.Services.Hive.Common-3.3.csproj

    r4593 r4598  
    6666    <Compile Include="DataTransfer\LightweightJob.cs" />
    6767    <Compile Include="DataTransfer\JobState.cs" />
     68    <Compile Include="Disposable.cs" />
    6869    <Compile Include="MessageContainer.cs" />
    6970    <Compile Include="DataTransfer\NamedHiveItem.cs" />
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.Common/3.3/ServiceContracts/IHiveService.cs

    r4593 r4598  
    1515    #region Job Methods
    1616    [OperationContract]
    17     Job AddJob(JobData job);
     17    Guid AddJob(Job jobDto, JobData jobDataDto);
     18
    1819    [OperationContract]
    19     Job AddJobWithGroupStrings(JobData jobObj, IEnumerable<string> groups);
     20    Guid AddChildJob(Guid parentJobId, Job jobDto, JobData jobDataDto);
     21
     22    [OperationContract] // formerly GetJobById
     23    Job GetJob(Guid jobId);
     24
     25    [OperationContract] // formerly GetAllJobs
     26    IEnumerable<Job> GetJobs();
     27
     28    [OperationContract] // formerly GetJobResults
     29    IEnumerable<LightweightJob> GetLightweightJobs(IEnumerable<Guid> jobIds);
     30
     31    [OperationContract] // formerly GetChildJobResults
     32    IEnumerable<LightweightJob> GetLightweightChildJobs(Guid? parentJobId, bool recursive, bool includeParent);
     33
     34    [OperationContract] // formerly GetLastSerializedResult
     35    JobData GetJobData(Guid jobId);
     36
    2037    [OperationContract]
    21     JobData GetLastSerializedResult(Guid jobId);
     38    Stream GetJobDataStreamed(Guid jobId);
     39
     40    [OperationContract]
     41    void UpdateJob(Job jobDto, JobData jobDataDto);
     42       
     43    [OperationContract] // formerly StoreFinishedJobResultStreamed
     44    void UpdateJobDataStreamed(Stream stream);
     45
     46    [OperationContract]
     47    void DeleteChildJobs(Guid parentJobId);
     48
     49    [OperationContract] // new method: appropriate job is choosen and set to 'calculating'. the slave is responsible for requesting the jobData. Server should wait some timeout until he redistributes the job
     50    Job AquireJob(Guid slaveId);
     51
     52    //[OperationContract] // dump?
     53    //Job GetJobByIdWithDetails(Guid jobId);
     54
     55    //[OperationContract] dump?
     56    //Job AddNewJob(JobData job);
     57
     58    //[OperationContract]
     59    //void RemoveJob(Guid jobId);
     60
     61    //[OperationContract] // GetJobForCalculation (was this used?
     62    //Job GetJob(Guid slaveId);
     63
     64    //[OperationContract] --> replaced by UpdateJob
     65    //void StoreFinishedJobResult(Guid slaveId, Guid jobId, byte[] result, TimeSpan executionTime, string exception);
     66
     67    //[OperationContract] dump this! a slave should just check if job is still offline, if so it can submit the finished job, otherwise throw away! its a rare case that a slave reawakes with a finished job
     68    //void IsJobStillNeeded(Guid jobId);
     69
     70    //[OperationContract] // dump?
     71    //Job AddJobWithGroupStrings(JobData jobObj, IEnumerable<string> groups);
     72    #endregion
     73
     74
     75    #region Job Control Methods
    2276    [OperationContract]
    2377    void AbortJob(Guid jobId);
    24     [OperationContract]
    25     Job GetJobById(Guid jobId);
    26     [OperationContract]
    27     IEnumerable<LightweightJob> GetJobResults(IEnumerable<Guid> jobIds);
    28     [OperationContract]
    29     IEnumerable<LightweightJob> GetChildJobResults(Guid? parentJobId, bool recursive, bool includeParent);
    30     [OperationContract]
    31     Job AddChildJob(Guid parentJobId, JobData serializedJob);
    32     [OperationContract]
    33     Job GetAllJobsWithFilter(JobState jobState, int offset, int count);
    34     [OperationContract]
    35     Job GetAllJobs();
    36     [OperationContract]
    37     Job GetJobByIdWithDetails(Guid jobId);
    38     [OperationContract]
    39     Job AddNewJob(JobData job);
    40     //[OperationContract]
    41     //void RemoveJob(Guid jobId);
     78
    4279    [OperationContract]
    4380    Job PauseJob(JobData serializedJob);
    44     [OperationContract]
    45     void DeleteChildJobs(Guid jobId);
    46     [OperationContract]
    47     Job GetJob(Guid clientId);
    48     [OperationContract]
    49     void StoreFinishedJobResult(Guid clientId, Guid jobId, byte[] result, TimeSpan executionTime, string exception);
    50     [OperationContract]
    51     void IsJobStillNeeded(Guid jobId);
    52     [OperationContract]
    53     Stream GetStreamedJob(Guid clientId);
    54     [OperationContract]
    55     void StoreFinishedJobResultStreamed(Stream stream);
    5681    #endregion
    5782
     
    6287    [OperationContract]
    6388    IEnumerable<HiveExperiment> GetHiveExperiments();
     89
    6490    [OperationContract]
    65     HiveExperiment UpdateHiveExperiment(HiveExperiment hiveExperimentDto);
     91    void UpdateHiveExperiment(HiveExperiment hiveExperimentDto);
     92
    6693    [OperationContract]
    6794    void DeleteHiveExperiment(Guid hiveExperimentId);
     
    123150    #region Slave Methods
    124151    [OperationContract]
    125     IEnumerable<Slave> GetAllSlaves();
     152    Guid AddSlaveGroup(SlaveGroup slaveGroup);
     153
    126154    [OperationContract]
    127     [ServiceKnownType(typeof(Resource))]
    128     [ServiceKnownType(typeof(Slave))]
    129     [ServiceKnownType(typeof(SlaveGroup))]
    130     IEnumerable<SlaveGroup> GetAllSlaveGroups();
     155    IEnumerable<Slave> GetSlaves();
     156   
    131157    [OperationContract]
    132     IEnumerable<SlaveGroup> GetAllGroupsOfResource(Guid resourceId);
    133     [OperationContract]
    134     SlaveGroup AddSlaveGroup(SlaveGroup clientGroup);
     158    //[ServiceKnownType(typeof(Resource))] - not sure about those
     159    //[ServiceKnownType(typeof(Slave))]
     160    //[ServiceKnownType(typeof(SlaveGroup))]
     161    IEnumerable<SlaveGroup> GetSlaveGroups();
     162
    135163    [OperationContract]
    136164    void DeleteSlaveGroup(Guid clientGroupId);
     165
    137166    [OperationContract]
    138     [ServiceKnownType(typeof(Resource))]
    139     [ServiceKnownType(typeof(Slave))]
    140     [ServiceKnownType(typeof(SlaveGroup))]
    141     void AddResourceToGroup(Guid clientGroupId, Resource resource);
     167    //[ServiceKnownType(typeof(Resource))]
     168    //[ServiceKnownType(typeof(Slave))]
     169    //[ServiceKnownType(typeof(SlaveGroup))]
     170    void AddResourceToGroup(Guid slaveGroupId, Resource resource);
     171
    142172    [OperationContract]
    143     void DeleteResourceFromGroup(Guid clientGroupId, Guid resourceId);
     173    void RemoveResourceFromGroup(Guid slaveGroupId, Guid resourceId);
    144174    #endregion
    145175   
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/ContextFactory.cs

    r4593 r4598  
    3131
    3232namespace HeuristicLab.Services.Hive.DataAccess {
     33  public delegate T CreateDataContext<T>() where T : DataContext;
     34
    3335  /// <summary>
    3436  /// This class handles creates one Context for each Thread which asks for one.
     
    3941  /// it has to be disposed in order to finish the corresponding transaction.
    4042  /// </summary>
    41   public class ContextFactory : IContextFactory {
     43  public class ContextFactory<T> : IContextFactory<T> where T : DataContext {
    4244    private static object locker = new object();
    43     private static IDictionary<int, HiveDataContext> contexts = new Dictionary<int, HiveDataContext>();
     45    private static IDictionary<int, Disposable<T>> contexts = new Dictionary<int, Disposable<T>>();
    4446    private static IDictionary<int, TransactionScope> transactions = new Dictionary<int, TransactionScope>();
     47    private CreateDataContext<T> createDataContext;
    4548
    46     private static IContextFactory instance = null;
    47     public static IContextFactory Instance {
    48       get {
    49         if (instance == null)
    50           instance = new ContextFactory();
    51         return instance;
    52       }
     49    public ContextFactory(CreateDataContext<T> createDataContext) {
     50      this.createDataContext = createDataContext;
    5351    }
    54 
    55     #region IContextManager Members
    5652
    5753    public IDisposable GetContext() {
     
    6965        }
    7066
    71         DisposableHiveDataContext context = CreateContext();
    72         context.OnDisposing += new EventHandler(context_OnDisposing);
    73         contexts.Add(threadId, context);
     67        T context = createDataContext();
     68       
     69        Disposable<T> disposableContext = new Disposable<T>(context);
     70        disposableContext.OnDisposing += new EventHandler(context_OnDisposing);
     71        contexts.Add(threadId, disposableContext);
    7472
    7573        if (withTransaction) {
     
    7977        return context;
    8078      }
    81     }
    82 
    83     private static DisposableHiveDataContext CreateContext() {
    84       return new DisposableHiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString);
    8579    }
    8680
     
    10296      lock (locker) {
    10397        int threadId = Thread.CurrentThread.ManagedThreadId;
    104 
     98        contexts[threadId].Dispose();
    10599        contexts.Remove(threadId);
    106100        // context gets disposed implicitly, when it is used as IDisposable
     
    126120    }
    127121
    128     public DataContext CurrentContext {
     122    public T CurrentContext {
    129123      get {
    130124        lock (locker) {
    131125          int threadId = Thread.CurrentThread.ManagedThreadId;
    132126          if (contexts.ContainsKey(threadId)) {
    133             return contexts[threadId];
     127            return contexts[threadId].Obj;
    134128          } else {
    135             return null;
     129            return default(T);
    136130          }
    137131        }
     
    139133    }
    140134
    141     #endregion
    142   }
    143 
    144   /// <summary>
    145   /// Offers an event when it gets disposed
    146   /// </summary>
    147   class DisposableHiveDataContext : HiveDataContext {
    148 
    149     public DisposableHiveDataContext(string connection) : base(connection) { }
    150 
    151     protected override void Dispose(bool disposing) {
    152       base.Dispose(disposing);
    153       if (OnDisposing != null)
    154         OnDisposing(this, new EventArgs());
     135    public static HiveDataContext CreateHiveContext() {
     136      return new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString);
    155137    }
    156 
    157     public event EventHandler OnDisposing;
    158138  }
    159139}
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HeuristicLab.Services.Hive.DataAccess-3.3.csproj

    r4593 r4598  
    5656  <ItemGroup>
    5757    <Compile Include="ContextFactory.cs" />
     58    <Compile Include="Convert.cs" />
    5859    <Compile Include="HeuristicLabServicesHiveDataAccessPlugin.cs" />
     60    <Compile Include="HiveDao.cs" />
    5961    <Compile Include="HiveDataContext.cs">
    6062      <DependentUpon>HiveDataContext.dbml</DependentUpon>
     
    6668    </Compile>
    6769    <Compile Include="Interfaces\IContextFactory.cs" />
     70    <Compile Include="Interfaces\IHiveDao.cs" />
    6871    <Compile Include="Properties\AssemblyInfo.cs" />
    6972    <Compile Include="Properties\Settings.Designer.cs">
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml

    r4593 r4598  
    3535    </Type>
    3636  </Table>
    37   <Table Name="dbo.PluginInfo" Member="PluginInfos">
    38     <Type Name="PluginInfo">
     37  <Table Name="dbo.Plugin" Member="Plugins">
     38    <Type Name="Plugin">
    3939      <Column Name="PluginId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
    4040      <Column Name="Name" Type="System.String" DbType="VarChar(MAX)" CanBeNull="false" />
     
    4242      <Column Name="BuildDate" Type="System.String" DbType="VarChar(20)" CanBeNull="false" />
    4343      <Association Name="PluginInfo_RequiredPlugin" Member="RequiredPlugins" ThisKey="PluginId" OtherKey="PluginId" Type="RequiredPlugin" />
     44      <Association Name="Plugin_PluginData" Member="PluginData" ThisKey="PluginId" OtherKey="PluginId" Type="PluginData" Cardinality="One" />
    4445    </Type>
    4546  </Table>
     
    5657      <Column Name="JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
    5758      <Column Name="PluginId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
    58       <Association Name="PluginInfo_RequiredPlugin" Member="PluginInfo" ThisKey="PluginId" OtherKey="PluginId" Type="PluginInfo" IsForeignKey="true" DeleteRule="CASCADE" />
     59      <Association Name="PluginInfo_RequiredPlugin" Member="Plugin" Storage="_PluginInfo" ThisKey="PluginId" OtherKey="PluginId" Type="Plugin" IsForeignKey="true" DeleteRule="CASCADE" />
    5960      <Association Name="Job_RequiredPlugin" Member="Job" ThisKey="JobId" OtherKey="JobId" Type="Job" IsForeignKey="true" />
    6061    </Type>
     
    9798      <Column Name="ExecutionTime" Type="System.TimeSpan" DbType="Time" CanBeNull="true" />
    9899      <Column Name="Exception" Type="System.String" DbType="VarChar(MAX)" CanBeNull="true" />
    99       <Column Name="SerializedJob" Type="System.Data.Linq.Binary" DbType="VarBinary(MAX)" CanBeNull="false" UpdateCheck="Never" IsDelayLoaded="true" />
    100100      <Column Name="DateCreated" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
    101101      <Column Name="DateCalculated" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
     
    109109      <Association Name="Job_RequiredPlugin" Member="RequiredPlugins" ThisKey="JobId" OtherKey="JobId" Type="RequiredPlugin" />
    110110      <Association Name="Job_Job" Member="Jobs" ThisKey="JobId" OtherKey="ParentJobId" Type="Job" />
     111      <Association Name="Job_JobData" Member="JobData" ThisKey="JobId" OtherKey="JobId" Type="JobData" Cardinality="One" />
    111112      <Association Name="Job_Job" Member="Job1" ThisKey="ParentJobId" OtherKey="JobId" Type="Job" IsForeignKey="true" />
    112113      <Association Name="Project_Job" Member="Project" ThisKey="ProjectId" OtherKey="ProjectId" Type="Project" IsForeignKey="true" DeleteRule="SET NULL" />
     
    137138    </Type>
    138139  </Table>
     140  <Table Name="" Member="JobDatas">
     141    <Type Name="JobData">
     142      <Column Name="JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
     143      <Column Member="Data" Type="System.Data.Linq.Binary" DbType="VarBinary(MAX)" CanBeNull="false" UpdateCheck="Never" />
     144      <Association Name="Job_JobData" Member="Job" ThisKey="JobId" OtherKey="JobId" Type="Job" IsForeignKey="true" />
     145    </Type>
     146  </Table>
     147  <Table Name="" Member="PluginDatas">
     148    <Type Name="PluginData">
     149      <Column Member="PluginId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
     150      <Column Name="Data" Type="System.Data.Linq.Binary" DbType="VarBinary(MAX) NOT NULL" CanBeNull="false" UpdateCheck="Never" />
     151      <Association Name="Plugin_PluginData" Member="Plugin" ThisKey="PluginId" OtherKey="PluginId" Type="Plugin" IsForeignKey="true" />
     152    </Type>
     153  </Table>
    139154</Database>
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout

    r4593 r4598  
    11<?xml version="1.0" encoding="utf-8"?>
    2 <ordesignerObjectsDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 17.625, 18.375" name="HiveDataContext">
     2<ordesignerObjectsDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 17.25, 12.5" name="HiveDataContext">
    33  <DataContextMoniker Name="/HiveDataContext" />
    44  <nestedChildShapes>
    5     <classShape Id="a929c9dc-69f4-4488-ba1c-a2342bf81d89" absoluteBounds="13, 8, 2, 1.3862939453124987">
     5    <classShape Id="a929c9dc-69f4-4488-ba1c-a2342bf81d89" absoluteBounds="12.75, 2.875, 2, 1.3862939453124987">
    66      <DataClassMoniker Name="/HiveDataContext/AssignedResource" />
    77      <nestedChildShapes>
    8         <elementListCompartment Id="8b005775-f0ee-41b0-ae10-6d1151003708" absoluteBounds="13.015, 8.46, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    9       </nestedChildShapes>
    10     </classShape>
    11     <classShape Id="3176614f-3038-41e5-8e75-cdf99373cb3d" absoluteBounds="6.25, 8.375, 2, 1.5785953776041666">
     8        <elementListCompartment Id="8b005775-f0ee-41b0-ae10-6d1151003708" absoluteBounds="12.765, 3.3350000000000009, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     9      </nestedChildShapes>
     10    </classShape>
     11    <classShape Id="3176614f-3038-41e5-8e75-cdf99373cb3d" absoluteBounds="4.5, 2.125, 2, 1.5785953776041666">
    1212      <DataClassMoniker Name="/HiveDataContext/UptimeStatistic" />
    1313      <nestedChildShapes>
    14         <elementListCompartment Id="35235ffe-b21e-49da-b58a-27423444612a" absoluteBounds="6.2650000000000006, 8.835, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    15       </nestedChildShapes>
    16     </classShape>
    17     <classShape Id="5d9c7dad-8113-49c9-bdfa-c64543554a7b" absoluteBounds="4, 8.5, 2, 1.3862939453125023">
     14        <elementListCompartment Id="35235ffe-b21e-49da-b58a-27423444612a" absoluteBounds="4.5150000000000006, 2.5850000000000009, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     15      </nestedChildShapes>
     16    </classShape>
     17    <classShape Id="5d9c7dad-8113-49c9-bdfa-c64543554a7b" absoluteBounds="7, 0.75, 2, 1.3862939453125023">
    1818      <DataClassMoniker Name="/HiveDataContext/SlaveConfig" />
    1919      <nestedChildShapes>
    20         <elementListCompartment Id="c2e15bc8-44cb-42af-b195-b9a30f61af28" absoluteBounds="4.0150000000000006, 8.96, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    21       </nestedChildShapes>
    22     </classShape>
    23     <classShape Id="7edeab13-5aa7-4b63-8c5e-cae056298001" absoluteBounds="9.625, 12.375, 2, 1.3862939453125023">
     20        <elementListCompartment Id="c2e15bc8-44cb-42af-b195-b9a30f61af28" absoluteBounds="7.0150000000000006, 1.2100000000000009, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     21      </nestedChildShapes>
     22    </classShape>
     23    <classShape Id="7edeab13-5aa7-4b63-8c5e-cae056298001" absoluteBounds="15, 2.875, 2, 1.3862939453125023">
    2424      <DataClassMoniker Name="/HiveDataContext/SlaveGroup_Resource" />
    2525      <nestedChildShapes>
    26         <elementListCompartment Id="b84f48de-4352-4df2-a7da-ff7cbc1fe702" absoluteBounds="9.64, 12.835, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    27       </nestedChildShapes>
    28     </classShape>
    29     <classShape Id="7d998e56-4fba-41ca-a1a8-1dcdb9068edf" absoluteBounds="9.25, 15.375, 2, 1.5785953776041666">
    30       <DataClassMoniker Name="/HiveDataContext/PluginInfo" />
    31       <nestedChildShapes>
    32         <elementListCompartment Id="ec4ba325-6dff-4418-baad-59af81ae2024" absoluteBounds="9.265, 15.835, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    33       </nestedChildShapes>
    34     </classShape>
    35     <classShape Id="85f04409-b6e0-4e2f-a140-7191436a806f" absoluteBounds="6.5, 16.875, 2, 1.1939925130208309">
     26        <elementListCompartment Id="b84f48de-4352-4df2-a7da-ff7cbc1fe702" absoluteBounds="15.015, 3.3350000000000009, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     27      </nestedChildShapes>
     28    </classShape>
     29    <classShape Id="7d998e56-4fba-41ca-a1a8-1dcdb9068edf" absoluteBounds="9, 10.625, 2, 1.5785953776041666">
     30      <DataClassMoniker Name="/HiveDataContext/Plugin" />
     31      <nestedChildShapes>
     32        <elementListCompartment Id="ec4ba325-6dff-4418-baad-59af81ae2024" absoluteBounds="9.015, 11.085, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     33      </nestedChildShapes>
     34    </classShape>
     35    <classShape Id="85f04409-b6e0-4e2f-a140-7191436a806f" absoluteBounds="5, 8.25, 2, 1.1939925130208309">
    3636      <DataClassMoniker Name="/HiveDataContext/Project" />
    3737      <nestedChildShapes>
    38         <elementListCompartment Id="59e11457-6078-47f4-8ee6-eb2052868699" absoluteBounds="6.5150000000000006, 17.335, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    39       </nestedChildShapes>
    40     </classShape>
    41     <classShape Id="97b00810-fa30-457e-b484-b4e80b22f91b" absoluteBounds="12, 5.5, 2, 1.3862939453124987">
     38        <elementListCompartment Id="59e11457-6078-47f4-8ee6-eb2052868699" absoluteBounds="5.0150000000000006, 8.71, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     39      </nestedChildShapes>
     40    </classShape>
     41    <classShape Id="97b00810-fa30-457e-b484-b4e80b22f91b" absoluteBounds="9.25, 8.875, 2, 1.3862939453124987">
    4242      <DataClassMoniker Name="/HiveDataContext/RequiredPlugin" />
    4343      <nestedChildShapes>
    44         <elementListCompartment Id="df6451e5-069e-4ca0-a909-61b8213b5047" absoluteBounds="12.015, 5.96, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    45       </nestedChildShapes>
    46     </classShape>
    47     <classShape Id="706a4581-6daf-4e71-ae2a-87d50b27a051" absoluteBounds="12.375, 2.875, 2, 1.3862939453125005">
     44        <elementListCompartment Id="df6451e5-069e-4ca0-a909-61b8213b5047" absoluteBounds="9.265, 9.335, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     45      </nestedChildShapes>
     46    </classShape>
     47    <classShape Id="706a4581-6daf-4e71-ae2a-87d50b27a051" absoluteBounds="11.75, 0.75, 2, 1.3862939453125005">
    4848      <DataClassMoniker Name="/HiveDataContext/Resource" />
    4949      <nestedChildShapes>
    50         <elementListCompartment Id="8c24f5bf-2164-4d0f-832e-1730eb0066df" absoluteBounds="12.39, 3.335, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    51       </nestedChildShapes>
    52     </classShape>
    53     <classShape Id="695bfc39-59f3-4e60-8644-f847964bf62c" absoluteBounds="9.25, 4.375, 2, 3.6939111328124987">
     50        <elementListCompartment Id="8c24f5bf-2164-4d0f-832e-1730eb0066df" absoluteBounds="11.765, 1.21, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     51      </nestedChildShapes>
     52    </classShape>
     53    <classShape Id="695bfc39-59f3-4e60-8644-f847964bf62c" absoluteBounds="9.25, 4.375, 2, 3.5016097005208326">
    5454      <DataClassMoniker Name="/HiveDataContext/Job" />
    5555      <nestedChildShapes>
    56         <elementListCompartment Id="a6a30e11-03d1-4869-82e6-b733f4ef9974" absoluteBounds="9.265, 4.835, 1.9700000000000002, 3.1339111328125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    57       </nestedChildShapes>
    58     </classShape>
    59     <classShape Id="8d5712f7-7a1a-4a89-bd4d-fd60200d3306" absoluteBounds="9.625, 9.25, 2, 2.1554996744791666">
     56        <elementListCompartment Id="a6a30e11-03d1-4869-82e6-b733f4ef9974" absoluteBounds="9.265, 4.835, 1.9700000000000002, 2.941609700520833" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     57      </nestedChildShapes>
     58    </classShape>
     59    <classShape Id="8d5712f7-7a1a-4a89-bd4d-fd60200d3306" absoluteBounds="11.75, 4.625, 2, 2.1554996744791666">
    6060      <DataClassMoniker Name="/HiveDataContext/UptimeCalendar" />
    6161      <nestedChildShapes>
    62         <elementListCompartment Id="7d8f121b-35bb-4753-a25f-3fac1562e68e" absoluteBounds="9.64, 9.71, 1.9700000000000002, 1.5954996744791665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    63       </nestedChildShapes>
    64     </classShape>
    65     <classShape Id="e6f840cc-2968-4be1-b234-eef624ccacbb" absoluteBounds="6, 10.75, 2, 1.9631982421875005">
     62        <elementListCompartment Id="7d8f121b-35bb-4753-a25f-3fac1562e68e" absoluteBounds="11.765, 5.0850000000000009, 1.9700000000000002, 1.5954996744791665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     63      </nestedChildShapes>
     64    </classShape>
     65    <classShape Id="e6f840cc-2968-4be1-b234-eef624ccacbb" absoluteBounds="4.875, 6, 2, 1.9631982421875005">
    6666      <DataClassMoniker Name="/HiveDataContext/HiveExperiment" />
    6767      <nestedChildShapes>
    68         <elementListCompartment Id="0c65d4e1-256a-4a91-9a57-392f25e4de7f" absoluteBounds="6.0150000000000006, 11.21, 1.9700000000000002, 1.4031982421875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    69       </nestedChildShapes>
    70     </classShape>
    71     <classShape Id="26f4edfa-91dd-4941-a058-359f89e567a8" absoluteBounds="7.75, 0.75, 2, 2.9247054036458326">
     68        <elementListCompartment Id="0c65d4e1-256a-4a91-9a57-392f25e4de7f" absoluteBounds="4.8900000000000006, 6.4600000000000009, 1.9700000000000002, 1.4031982421875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     69      </nestedChildShapes>
     70    </classShape>
     71    <classShape Id="26f4edfa-91dd-4941-a058-359f89e567a8" absoluteBounds="9.375, 0.75, 2, 2.9247054036458326">
    7272      <DataClassMoniker Name="/HiveDataContext/Slave" />
    7373      <nestedChildShapes>
    74         <elementListCompartment Id="1e61f36b-08dc-4df7-8594-c9dcd95c0791" absoluteBounds="7.7650000000000006, 1.21, 1.9700000000000002, 2.364705403645833" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    75       </nestedChildShapes>
    76     </classShape>
    77     <classShape Id="bbd91675-92f2-4a69-8429-0950008fc8a4" absoluteBounds="15.375, 5, 2, 0.80938964843749961">
     74        <elementListCompartment Id="1e61f36b-08dc-4df7-8594-c9dcd95c0791" absoluteBounds="9.39, 1.21, 1.9700000000000002, 2.364705403645833" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     75      </nestedChildShapes>
     76    </classShape>
     77    <classShape Id="bbd91675-92f2-4a69-8429-0950008fc8a4" absoluteBounds="14, 0.75, 2, 0.80938964843749961">
    7878      <DataClassMoniker Name="/HiveDataContext/SlaveGroup" />
    7979      <nestedChildShapes>
    80         <elementListCompartment Id="5a790e8f-6e2e-4bf5-bd2b-f8a82224d9d7" absoluteBounds="15.375, 5, 0.125, 0.2493896484375" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    81       </nestedChildShapes>
    82     </classShape>
    83     <inheritanceConnector edgePoints="[(12.375 : 3.27485270182292); (9.75 : 3.27485270182292)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
     80        <elementListCompartment Id="5a790e8f-6e2e-4bf5-bd2b-f8a82224d9d7" absoluteBounds="14, 0.75, 0.125, 0.2493896484375" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     81      </nestedChildShapes>
     82    </classShape>
     83    <inheritanceConnector edgePoints="[(11.75 : 1.44314697265625); (11.375 : 1.44314697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
    8484      <nodes>
    8585        <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" />
     
    8787      </nodes>
    8888    </inheritanceConnector>
    89     <inheritanceConnector edgePoints="[(13.265623 : 4.2612939453125); (13.265623 : 4.625); (16.375 : 4.625); (16.375 : 5)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
     89    <inheritanceConnector edgePoints="[(13.75 : 1.15469482421875); (14 : 1.15469482421875)]" fixedFrom="Algorithm" fixedTo="Algorithm" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
    9090      <nodes>
    9191        <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" />
     
    9393      </nodes>
    9494    </inheritanceConnector>
    95     <associationConnector edgePoints="[(14.21875 : 4.2612939453125); (14.21875 : 8)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     95    <associationConnector edgePoints="[(13.25 : 2.1362939453125); (13.25 : 2.875)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    9696      <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedResource" />
    9797      <nodes>
     
    100100      </nodes>
    101101    </associationConnector>
    102     <associationConnector edgePoints="[(11.25 : 7.44314447265625); (11.6666666666667 : 7.44314447265625 : JumpStart); (11.8333333333333 : 7.44314447265625 : JumpEnd); (14.6406275 : 7.44314447265625); (14.6406275 : 8)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     102    <associationConnector edgePoints="[(11.25 : 7.20274983723958); (14.34375 : 7.20274983723958); (14.34375 : 4.2612939453125)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    103103      <AssociationMoniker Name="/HiveDataContext/Job/Job_AssignedResource" />
    104104      <nodes>
     
    107107      </nodes>
    108108    </associationConnector>
    109     <associationConnector edgePoints="[(8 : 3.67470540364583); (8 : 8.375)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     109    <associationConnector edgePoints="[(9.375 : 2.93674967447917); (6.5 : 2.93674967447917)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    110110      <AssociationMoniker Name="/HiveDataContext/Slave/Slave_UptimeStatistic" />
    111111      <nodes>
     
    114114      </nodes>
    115115    </associationConnector>
    116     <associationConnector edgePoints="[(16.375 : 5.8093896484375); (16.375 : 13.0681469726563); (12.5520833333333 : 13.0681469726563 : JumpStart); (12.3854166666667 : 13.0681469726563 : JumpEnd); (11.625 : 13.0681469726563)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     116    <associationConnector edgePoints="[(15.6910576194798 : 1.5593896484375); (15.6910576194798 : 2.875)]" fixedFrom="Algorithm" fixedTo="Caller">
    117117      <AssociationMoniker Name="/HiveDataContext/SlaveGroup/SlaveGroup_SlaveGroup_Resource" />
    118118      <nodes>
     
    121121      </nodes>
    122122    </associationConnector>
    123     <associationConnector edgePoints="[(13.265623 : 4.2612939453125); (13.265623 : 5.25); (11.75 : 5.25); (11.75 : 9); (11.875 : 9); (11.875 : 12.6903214863281); (11.625 : 12.6903214863281)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     123    <associationConnector edgePoints="[(13.75 : 2.1362939453125); (14.125 : 2.5112939453125); (15.3497974555544 : 2.5112939453125); (15.3497974555544 : 2.875)]" fixedFrom="NotFixed" fixedTo="Caller">
    124124      <AssociationMoniker Name="/HiveDataContext/Resource/Resource_SlaveGroup_Resource" />
    125125      <nodes>
     
    128128      </nodes>
    129129    </associationConnector>
    130     <associationConnector edgePoints="[(11.25 : 16.1642976888021); (12.46875 : 16.1642976888021); (12.46875 : 6.8862939453125)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    131       <AssociationMoniker Name="/HiveDataContext/PluginInfo/PluginInfo_RequiredPlugin" />
     130    <associationConnector edgePoints="[(10.125 : 10.625); (10.125 : 10.2612939453125)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     131      <AssociationMoniker Name="/HiveDataContext/Plugin/PluginInfo_RequiredPlugin" />
    132132      <nodes>
    133133        <classShapeMoniker Id="7d998e56-4fba-41ca-a1a8-1dcdb9068edf" />
     
    135135      </nodes>
    136136    </associationConnector>
    137     <associationConnector edgePoints="[(11.25 : 6.19314697265625); (12 : 6.19314697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     137    <associationConnector edgePoints="[(10.25 : 7.87660970052083); (10.25 : 8.875)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    138138      <AssociationMoniker Name="/HiveDataContext/Job/Job_RequiredPlugin" />
    139139      <nodes>
     
    142142      </nodes>
    143143    </associationConnector>
    144     <associationConnector edgePoints="[(5 : 8.5); (5 : 2.21235270182292); (7.75 : 2.21235270182292)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     144    <associationConnector edgePoints="[(9 : 1.44314697265625); (9.375 : 1.44314697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    145145      <AssociationMoniker Name="/HiveDataContext/SlaveConfig/SlaveConfig_Slave" />
    146146      <nodes>
     
    149149      </nodes>
    150150    </associationConnector>
    151     <associationConnector edgePoints="[(10.25 : 8.0689111328125); (10.25 : 8.3189111328125); (10.6930769230769 : 8.3189111328125); (10.6930769230769 : 8.0689111328125)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     151    <associationConnector edgePoints="[(11.0834359271285 : 7.87660970052083); (11.0834359271285 : 7.95910970052083); (11.1656121961154 : 7.95910970052083); (11.1656121961154 : 8.12660970052083); (10.5546153846154 : 8.12660970052083); (10.5546153846154 : 7.87660970052083)]" manuallyRouted="true" fixedFrom="Caller" fixedTo="Algorithm">
    152152      <AssociationMoniker Name="/HiveDataContext/Job/Job_Job" />
    153153      <nodes>
     
    156156      </nodes>
    157157    </associationConnector>
    158     <associationConnector edgePoints="[(8.40625 : 16.875); (8.40625 : 6.22195556640625); (9.25 : 6.22195556640625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     158    <associationConnector edgePoints="[(7 : 8.25); (7.875 : 8.125); (7.875 : 8.05644744428109); (8.875 : 8.05644744428109); (8.875 : 8.25160970052083); (9.25 : 7.87660970052083)]" manuallyRouted="true" fixedFrom="Algorithm" fixedTo="Algorithm">
    159159      <AssociationMoniker Name="/HiveDataContext/Project/Project_Job" />
    160160      <nodes>
     
    163163      </nodes>
    164164    </associationConnector>
    165     <associationConnector edgePoints="[(9.5 : 3.67470540364583); (9.5 : 4.375)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     165    <associationConnector edgePoints="[(10.3125 : 3.67470540364583); (10.3125 : 4.375)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    166166      <AssociationMoniker Name="/HiveDataContext/Slave/Slave_Job" />
    167167      <nodes>
     
    170170      </nodes>
    171171    </associationConnector>
    172     <associationConnector edgePoints="[(12.375 : 3.99924967447917); (11.46875 : 3.99924967447917); (11.46875 : 9.25)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     172    <associationConnector edgePoints="[(12.21875 : 2.1362939453125); (12.21875 : 4.625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    173173      <AssociationMoniker Name="/HiveDataContext/Resource/Resource_UptimeCalendar" />
    174174      <nodes>
     
    177177      </nodes>
    178178    </associationConnector>
    179     <associationConnector edgePoints="[(9.40625 : 8.0689111328125); (9.40625 : 11.8902498372396); (8.48958333333333 : 11.8902498372396 : JumpStart); (8.32291666666667 : 11.8902498372396 : JumpEnd); (8 : 11.8902498372396)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     179    <associationConnector edgePoints="[(9.25 : 6.71875); (6.875 : 6.71875)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    180180      <AssociationMoniker Name="/HiveDataContext/Job/Job_HiveExperiment" />
    181181      <nodes>
    182182        <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />
    183183        <classShapeMoniker Id="e6f840cc-2968-4be1-b234-eef624ccacbb" />
     184      </nodes>
     185    </associationConnector>
     186    <classShape Id="6bc13f26-f9a8-4597-b054-35be34190d12" absoluteBounds="6.875, 4.375, 2, 1.1939925130208327">
     187      <DataClassMoniker Name="/HiveDataContext/JobData" />
     188      <nestedChildShapes>
     189        <elementListCompartment Id="a068522c-7974-4679-b356-e33c941c465b" absoluteBounds="6.89, 4.835, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     190      </nestedChildShapes>
     191    </classShape>
     192    <classShape Id="ad25bd0f-80e8-4a06-abd8-190eb678eec7" absoluteBounds="11.5, 10.625, 2, 1.1939925130208344">
     193      <DataClassMoniker Name="/HiveDataContext/PluginData" />
     194      <nestedChildShapes>
     195        <elementListCompartment Id="acddb513-7de6-4bb4-8335-d6982fb2ef35" absoluteBounds="11.515, 11.085, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     196      </nestedChildShapes>
     197    </classShape>
     198    <associationConnector edgePoints="[(11 : 11.2219962565104); (11.5 : 11.2219962565104)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     199      <AssociationMoniker Name="/HiveDataContext/Plugin/Plugin_PluginData" />
     200      <nodes>
     201        <classShapeMoniker Id="7d998e56-4fba-41ca-a1a8-1dcdb9068edf" />
     202        <classShapeMoniker Id="ad25bd0f-80e8-4a06-abd8-190eb678eec7" />
     203      </nodes>
     204    </associationConnector>
     205    <associationConnector edgePoints="[(9.25 : 4.97199625651042); (8.875 : 4.97199625651042)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     206      <AssociationMoniker Name="/HiveDataContext/Job/Job_JobData" />
     207      <nodes>
     208        <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />
     209        <classShapeMoniker Id="6bc13f26-f9a8-4597-b054-35be34190d12" />
    184210      </nodes>
    185211    </associationConnector>
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs

    r4593 r4598  
    4343    partial void UpdateSlaveGroup_Resource(SlaveGroup_Resource instance);
    4444    partial void DeleteSlaveGroup_Resource(SlaveGroup_Resource instance);
    45     partial void InsertPluginInfo(PluginInfo instance);
    46     partial void UpdatePluginInfo(PluginInfo instance);
    47     partial void DeletePluginInfo(PluginInfo instance);
     45    partial void InsertPlugin(Plugin instance);
     46    partial void UpdatePlugin(Plugin instance);
     47    partial void DeletePlugin(Plugin instance);
    4848    partial void InsertProject(Project instance);
    4949    partial void UpdateProject(Project instance);
     
    6464    partial void UpdateHiveExperiment(HiveExperiment instance);
    6565    partial void DeleteHiveExperiment(HiveExperiment instance);
     66    partial void InsertJobData(JobData instance);
     67    partial void UpdateJobData(JobData instance);
     68    partial void DeleteJobData(JobData instance);
    6669    #endregion
    6770   
     
    122125    }
    123126   
    124     public System.Data.Linq.Table<PluginInfo> PluginInfos
    125     {
    126       get
    127       {
    128         return this.GetTable<PluginInfo>();
     127    public System.Data.Linq.Table<Plugin> Plugins
     128    {
     129      get
     130      {
     131        return this.GetTable<Plugin>();
    129132      }
    130133    }
     
    175178      {
    176179        return this.GetTable<HiveExperiment>();
     180      }
     181    }
     182   
     183    public System.Data.Linq.Table<JobData> JobDatas
     184    {
     185      get
     186      {
     187        return this.GetTable<JobData>();
     188      }
     189    }
     190   
     191    public System.Data.Linq.Table<PluginData> PluginDatas
     192    {
     193      get
     194      {
     195        return this.GetTable<PluginData>();
    177196      }
    178197    }
     
    876895  }
    877896 
    878   [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PluginInfo")]
    879   public partial class PluginInfo : INotifyPropertyChanging, INotifyPropertyChanged
     897  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Plugin")]
     898  public partial class Plugin : INotifyPropertyChanging, INotifyPropertyChanged
    880899  {
    881900   
     
    906925    #endregion
    907926   
    908     public PluginInfo()
     927    public Plugin()
    909928    {
    910929      this._RequiredPlugins = new EntitySet<RequiredPlugin>(new Action<RequiredPlugin>(this.attach_RequiredPlugins), new Action<RequiredPlugin>(this.detach_RequiredPlugins));
     
    10281047    {
    10291048      this.SendPropertyChanging();
    1030       entity.PluginInfo = this;
     1049      entity.Plugin = this;
    10311050    }
    10321051   
     
    10341053    {
    10351054      this.SendPropertyChanging();
    1036       entity.PluginInfo = null;
     1055      entity.Plugin = null;
    10371056    }
    10381057  }
     
    11641183    private System.Guid _PluginId;
    11651184   
    1166     private EntityRef<PluginInfo> _PluginInfo;
     1185    private EntityRef<Plugin> _PluginInfo;
    11671186   
    11681187    private EntityRef<Job> _Job;
     
    11821201    public RequiredPlugin()
    11831202    {
    1184       this._PluginInfo = default(EntityRef<PluginInfo>);
     1203      this._PluginInfo = default(EntityRef<Plugin>);
    11851204      this._Job = default(EntityRef<Job>);
    11861205      OnCreated();
     
    12561275   
    12571276    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="PluginInfo_RequiredPlugin", Storage="_PluginInfo", ThisKey="PluginId", OtherKey="PluginId", IsForeignKey=true, DeleteRule="CASCADE")]
    1258     public PluginInfo PluginInfo
     1277    public Plugin Plugin
    12591278    {
    12601279      get
     
    12641283      set
    12651284      {
    1266         PluginInfo previousValue = this._PluginInfo.Entity;
     1285        Plugin previousValue = this._PluginInfo.Entity;
    12671286        if (((previousValue != value)
    12681287              || (this._PluginInfo.HasLoadedOrAssignedValue == false)))
     
    12841303            this._PluginId = default(System.Guid);
    12851304          }
    1286           this.SendPropertyChanged("PluginInfo");
     1305          this.SendPropertyChanged("Plugin");
    12871306        }
    12881307      }
     
    19781997    private string _Exception;
    19791998   
    1980     private System.Data.Linq.Link<System.Data.Linq.Binary> _SerializedJob;
    1981    
    19821999    private System.Nullable<System.DateTime> _DateCreated;
    19832000   
     
    20012018   
    20022019    private EntitySet<Job> _Jobs;
     2020   
     2021    private EntityRef<JobData> _JobData;
    20032022   
    20042023    private EntityRef<Job> _Job1;
     
    20242043    partial void OnExceptionChanging(string value);
    20252044    partial void OnExceptionChanged();
    2026     partial void OnSerializedJobChanging(System.Data.Linq.Binary value);
    2027     partial void OnSerializedJobChanged();
    20282045    partial void OnDateCreatedChanging(System.Nullable<System.DateTime> value);
    20292046    partial void OnDateCreatedChanged();
     
    20492066      this._RequiredPlugins = new EntitySet<RequiredPlugin>(new Action<RequiredPlugin>(this.attach_RequiredPlugins), new Action<RequiredPlugin>(this.detach_RequiredPlugins));
    20502067      this._Jobs = new EntitySet<Job>(new Action<Job>(this.attach_Jobs), new Action<Job>(this.detach_Jobs));
     2068      this._JobData = default(EntityRef<JobData>);
    20512069      this._Job1 = default(EntityRef<Job>);
    20522070      this._Project = default(EntityRef<Project>);
     
    21832201    }
    21842202   
    2185     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SerializedJob", DbType="VarBinary(MAX)", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
    2186     public System.Data.Linq.Binary SerializedJob
    2187     {
    2188       get
    2189       {
    2190         return this._SerializedJob.Value;
    2191       }
    2192       set
    2193       {
    2194         if ((this._SerializedJob.Value != value))
    2195         {
    2196           this.OnSerializedJobChanging(value);
    2197           this.SendPropertyChanging();
    2198           this._SerializedJob.Value = value;
    2199           this.SendPropertyChanged("SerializedJob");
    2200           this.OnSerializedJobChanged();
    2201         }
    2202       }
    2203     }
    2204    
    22052203    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime")]
    22062204    public System.Nullable<System.DateTime> DateCreated
     
    24032401      {
    24042402        this._Jobs.Assign(value);
     2403      }
     2404    }
     2405   
     2406    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_JobData", Storage="_JobData", ThisKey="JobId", OtherKey="JobId", IsUnique=true, IsForeignKey=false)]
     2407    public JobData JobData
     2408    {
     2409      get
     2410      {
     2411        return this._JobData.Entity;
     2412      }
     2413      set
     2414      {
     2415        JobData previousValue = this._JobData.Entity;
     2416        if (((previousValue != value)
     2417              || (this._JobData.HasLoadedOrAssignedValue == false)))
     2418        {
     2419          this.SendPropertyChanging();
     2420          if ((previousValue != null))
     2421          {
     2422            this._JobData.Entity = null;
     2423            previousValue.Job = null;
     2424          }
     2425          this._JobData.Entity = value;
     2426          if ((value != null))
     2427          {
     2428            value.Job = this;
     2429          }
     2430          this.SendPropertyChanged("JobData");
     2431        }
    24052432      }
    24062433    }
     
    30183045    }
    30193046  }
     3047 
     3048  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
     3049  public partial class JobData : INotifyPropertyChanging, INotifyPropertyChanged
     3050  {
     3051   
     3052    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
     3053   
     3054    private System.Guid _JobId;
     3055   
     3056    private System.Data.Linq.Binary _Data;
     3057   
     3058    private EntityRef<Job> _Job;
     3059   
     3060    #region Extensibility Method Definitions
     3061    partial void OnLoaded();
     3062    partial void OnValidate(System.Data.Linq.ChangeAction action);
     3063    partial void OnCreated();
     3064    partial void OnJobIdChanging(System.Guid value);
     3065    partial void OnJobIdChanged();
     3066    partial void OnDataChanging(System.Data.Linq.Binary value);
     3067    partial void OnDataChanged();
     3068    #endregion
     3069   
     3070    public JobData()
     3071    {
     3072      this._Job = default(EntityRef<Job>);
     3073      OnCreated();
     3074    }
     3075   
     3076    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
     3077    public System.Guid JobId
     3078    {
     3079      get
     3080      {
     3081        return this._JobId;
     3082      }
     3083      set
     3084      {
     3085        if ((this._JobId != value))
     3086        {
     3087          if (this._Job.HasLoadedOrAssignedValue)
     3088          {
     3089            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
     3090          }
     3091          this.OnJobIdChanging(value);
     3092          this.SendPropertyChanging();
     3093          this._JobId = value;
     3094          this.SendPropertyChanged("JobId");
     3095          this.OnJobIdChanged();
     3096        }
     3097      }
     3098    }
     3099   
     3100    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="VarBinary(MAX)", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
     3101    public System.Data.Linq.Binary Data
     3102    {
     3103      get
     3104      {
     3105        return this._Data;
     3106      }
     3107      set
     3108      {
     3109        if ((this._Data != value))
     3110        {
     3111          this.OnDataChanging(value);
     3112          this.SendPropertyChanging();
     3113          this._Data = value;
     3114          this.SendPropertyChanged("Data");
     3115          this.OnDataChanged();
     3116        }
     3117      }
     3118    }
     3119   
     3120    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_JobData", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
     3121    public Job Job
     3122    {
     3123      get
     3124      {
     3125        return this._Job.Entity;
     3126      }
     3127      set
     3128      {
     3129        Job previousValue = this._Job.Entity;
     3130        if (((previousValue != value)
     3131              || (this._Job.HasLoadedOrAssignedValue == false)))
     3132        {
     3133          this.SendPropertyChanging();
     3134          if ((previousValue != null))
     3135          {
     3136            this._Job.Entity = null;
     3137            previousValue.JobData = null;
     3138          }
     3139          this._Job.Entity = value;
     3140          if ((value != null))
     3141          {
     3142            value.JobData = this;
     3143            this._JobId = value.JobId;
     3144          }
     3145          else
     3146          {
     3147            this._JobId = default(System.Guid);
     3148          }
     3149          this.SendPropertyChanged("Job");
     3150        }
     3151      }
     3152    }
     3153   
     3154    public event PropertyChangingEventHandler PropertyChanging;
     3155   
     3156    public event PropertyChangedEventHandler PropertyChanged;
     3157   
     3158    protected virtual void SendPropertyChanging()
     3159    {
     3160      if ((this.PropertyChanging != null))
     3161      {
     3162        this.PropertyChanging(this, emptyChangingEventArgs);
     3163      }
     3164    }
     3165   
     3166    protected virtual void SendPropertyChanged(String propertyName)
     3167    {
     3168      if ((this.PropertyChanged != null))
     3169      {
     3170        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
     3171      }
     3172    }
     3173  }
     3174 
     3175  [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
     3176  public partial class PluginData
     3177  {
     3178   
     3179    private System.Guid _PluginId;
     3180   
     3181    private System.Data.Linq.Binary _Data;
     3182   
     3183    public PluginData()
     3184    {
     3185    }
     3186   
     3187    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginId", DbType="UniqueIdentifier NOT NULL")]
     3188    public System.Guid PluginId
     3189    {
     3190      get
     3191      {
     3192        return this._PluginId;
     3193      }
     3194      set
     3195      {
     3196        if ((this._PluginId != value))
     3197        {
     3198          this._PluginId = value;
     3199        }
     3200      }
     3201    }
     3202   
     3203    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="VarBinary(MAX) NOT NULL", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
     3204    public System.Data.Linq.Binary Data
     3205    {
     3206      get
     3207      {
     3208        return this._Data;
     3209      }
     3210      set
     3211      {
     3212        if ((this._Data != value))
     3213        {
     3214          this._Data = value;
     3215        }
     3216      }
     3217    }
     3218  }
    30203219}
    30213220#pragma warning restore 1591
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/Interfaces/IContextFactory.cs

    r4593 r4598  
    2424
    2525namespace HeuristicLab.Services.Hive.DataAccess {
    26   public interface IContextFactory {
     26  public interface IContextFactory<T> where T : DataContext {
    2727    /// <summary>
    2828    /// Uses transaction by default.
     
    3434    IDisposable GetContext(bool withTransaction);
    3535
    36     DataContext CurrentContext { get; }
     36    T CurrentContext { get; }
    3737
    3838    void RollbackTransaction();
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.Server/3.3/HeuristicLab.Services.Hive-3.3.csproj

    r4593 r4598  
    4444      <HintPath>..\..\..\..\..\..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
    4545    </Reference>
     46    <Reference Include="HeuristicLab.Tracing-3.3, Version=3.2.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
    4647    <Reference Include="System" />
    4748    <Reference Include="System.Core" />
     49    <Reference Include="System.Data.Linq" />
    4850    <Reference Include="System.ServiceModel" />
     51    <Reference Include="System.Transactions" />
     52    <Reference Include="System.Web" />
    4953    <Reference Include="System.Xml.Linq" />
    5054    <Reference Include="System.Data.DataSetExtensions" />
     
    5357  </ItemGroup>
    5458  <ItemGroup>
    55     <Compile Include="Convert.cs" />
     59    <Compile Include="AuthorizationManager.cs" />
    5660    <Compile Include="HeuristicLabServicesHivePlugin.cs" />
     61    <Compile Include="Hive.cs" />
    5762    <Compile Include="HiveRoles.cs" />
    5863    <Compile Include="HiveService.cs" />
     64    <Compile Include="Interfaces\IAuthorizationManager.cs" />
     65    <Compile Include="LifecycleManager.cs" />
    5966    <Compile Include="Properties\AssemblyInfo.cs" />
     67    <Compile Include="ServiceLocator.cs" />
    6068  </ItemGroup>
    6169  <ItemGroup>
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.Server/3.3/HiveRoles.cs

    r4593 r4598  
    2121
    2222
    23 namespace HeuristicLab.Hive.Contracts {
     23namespace HeuristicLab.Services.Hive {
    2424  public static class HiveRoles {
    2525    public const string Administrator = "Hive.Administrator";
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.Server/3.3/HiveService.cs

    r4593 r4598  
    99using System.IO;
    1010using System.Security.Permissions;
     11using System.Data.Linq;
    1112
    1213namespace HeuristicLab.Services.Hive {
     14
     15
    1316  /// <summary>
    1417  /// Implementation of the Hive service (interface <see cref="IHiveService"/>).
     
    1619  [ServiceBehavior(IncludeExceptionDetailInFaults = true)]
    1720  public class HiveService : IHiveService {
    18     private DataAccess.IContextFactory contextFactory = new DataAccess.ContextFactory();
     21    private DataAccess.IHiveDao dao {
     22      get { return ServiceLocator.Instance.HiveDao; }
     23    }
     24    private DataAccess.IContextFactory<DataAccess.HiveDataContext> contextFactory {
     25      get { return ServiceLocator.Instance.ContextFactory; }
     26    }
     27    private IAuthorizationManager auth {
     28      get { return ServiceLocator.Instance.AuthorizationManager; }
     29    }
    1930
    2031    #region Job Methods
    2132    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    2233    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
    23     public Guid AddJob(JobData dto) {
    24       using (contextFactory.GetContext()) {
    25         DataAccess.Job entity = Convert.ToEntity(dto); entity.Id = 0;
    26         okb.Platforms.InsertOnSubmit(entity);
    27         okb.SubmitChanges();
    28         return entity.Id;
    29       }
    30     }
    31 
    32     public Job AddJobWithGroupStrings(JobData jobObj, IEnumerable<string> groups) {
    33       throw new NotImplementedException();
    34     }
    35 
    36     public JobData GetLastSerializedResult(Guid jobId) {
    37       throw new NotImplementedException();
    38     }
    39 
     34    public Guid AddJob(Job jobDto, JobData jobDataDto) {
     35      using (contextFactory.GetContext()) {
     36        jobDataDto.JobId = dao.AddJob(jobDto);
     37        dao.AddJobData(jobDataDto);
     38        return jobDataDto.JobId;
     39      }
     40    }
     41
     42    public Guid AddChildJob(Guid parentJobId, Job jobDto, JobData jobDataDto) {
     43      jobDto.ParentJobId = parentJobId;
     44      return AddJob(jobDto, jobDataDto);
     45    }
     46
     47    public Job GetJob(Guid jobId) {
     48      using (contextFactory.GetContext()) {
     49        return dao.GetJob(jobId);
     50      }
     51    }
     52
     53    public IEnumerable<Job> GetJobs() {
     54      using (contextFactory.GetContext()) {
     55        return dao.GetJobs(x => true);
     56      }
     57    }
     58
     59    public IEnumerable<LightweightJob> GetLightweightJobs(IEnumerable<Guid> jobIds) {
     60      using (contextFactory.GetContext()) {
     61        return dao.GetJobs(x => jobIds.Contains(x.JobId)).Select(x => new LightweightJob(x)).ToArray();
     62      }
     63    }
     64
     65    public IEnumerable<LightweightJob> GetLightweightChildJobs(Guid? parentJobId, bool recursive, bool includeParent) {
     66      using (contextFactory.GetContext()) {
     67        return GetChildJobs(parentJobId, recursive, includeParent).Select(x => new LightweightJob(x)).ToArray();
     68      }
     69    }
     70
     71    // formerly GetLastSerializedResult
     72    public JobData GetJobData(Guid jobId) {
     73      using (contextFactory.GetContext()) {
     74        return dao.GetJobData(jobId);
     75      }
     76    }
     77
     78    public Stream GetJobDataStreamed(Guid jobId) {
     79      throw new NotImplementedException();
     80    }
     81
     82    public void UpdateJob(Job jobDto, JobData jobDataDto) {
     83      using (contextFactory.GetContext()) {
     84        dao.UpdateJob(jobDto);
     85        dao.UpdateJobData(jobDataDto);
     86      }
     87    }
     88
     89    public void UpdateJobDataStreamed(Stream stream) {
     90      throw new NotImplementedException();
     91    }
     92
     93    public void DeleteChildJobs(Guid jobId) {
     94      using (contextFactory.GetContext()) {
     95        var jobs = GetChildJobs(jobId, true, false);
     96        foreach (var job in jobs) {
     97          dao.DeleteJob(job.Id);
     98          dao.DeleteJobData(job.Id);
     99        };
     100      }
     101    }
     102
     103    public Job AquireJob(Guid slaveId) {
     104      throw new NotImplementedException();
     105    }
     106    #endregion
     107
     108
     109    #region Job Control Methods
    40110    public void AbortJob(Guid jobId) {
    41111      throw new NotImplementedException();
    42112    }
    43 
    44     public Job GetJobById(Guid jobId) {
    45       throw new NotImplementedException();
    46     }
    47 
    48     public IEnumerable<LightweightJob> GetJobResults(IEnumerable<Guid> jobIds) {
    49       throw new NotImplementedException();
    50     }
    51 
    52     public IEnumerable<LightweightJob> GetChildJobResults(Guid? parentJobId, bool recursive, bool includeParent) {
    53       throw new NotImplementedException();
    54     }
    55 
    56     public Job AddChildJob(Guid parentJobId, JobData serializedJob) {
    57       throw new NotImplementedException();
    58     }
    59 
    60     public Job GetAllJobsWithFilter(JobState jobState, int offset, int count) {
    61       throw new NotImplementedException();
    62     }
    63 
    64     public Job GetAllJobs() {
    65       throw new NotImplementedException();
    66     }
    67 
    68     public Job GetJobByIdWithDetails(Guid jobId) {
    69       throw new NotImplementedException();
    70     }
    71 
    72     public Job AddNewJob(JobData job) {
    73       throw new NotImplementedException();
    74     }
    75 
    76113    public Job PauseJob(JobData serializedJob) {
    77114      throw new NotImplementedException();
    78115    }
    79 
    80     public void DeleteChildJobs(Guid jobId) {
    81       throw new NotImplementedException();
    82     }
    83 
    84     public Job GetJob(Guid clientId) {
    85       throw new NotImplementedException();
    86     }
    87 
    88     public void StoreFinishedJobResult(Guid clientId, Guid jobId, byte[] result, TimeSpan executionTime, string exception) {
    89       throw new NotImplementedException();
    90     }
    91 
    92     public void IsJobStillNeeded(Guid jobId) {
    93       throw new NotImplementedException();
    94     }
    95 
    96     public Stream GetStreamedJob(Guid clientId) {
    97       throw new NotImplementedException();
    98     }
    99 
    100     public void StoreFinishedJobResultStreamed(Stream stream) {
    101       throw new NotImplementedException();
    102     }
    103 
    104     #endregion
     116    #endregion
     117
    105118
    106119    #region HiveExperiment Methods
    107120    public IEnumerable<HiveExperiment> GetHiveExperiments() {
    108       throw new NotImplementedException();
    109     }
    110 
    111     public HiveExperiment UpdateHiveExperiment(HiveExperiment hiveExperimentDto) {
    112       throw new NotImplementedException();
     121      using (contextFactory.GetContext()) {
     122        return dao.GetHiveExperiments(x => x.UserId == auth.UserId);
     123      }
     124    }
     125
     126    public void UpdateHiveExperiment(HiveExperiment hiveExperimentDto) {
     127      using (contextFactory.GetContext()) {
     128        dao.UpdateHiveExperiment(hiveExperimentDto);
     129      }
    113130    }
    114131
    115132    public void DeleteHiveExperiment(Guid hiveExperimentId) {
    116       throw new NotImplementedException();
     133      using (contextFactory.GetContext()) {
     134        HiveExperiment he = dao.GetHiveExperiment(hiveExperimentId);
     135        if(he.RootJobId.HasValue) {
     136          var jobs = GetChildJobs(he.RootJobId.Value, true, true);
     137          foreach(var j in jobs) {
     138            dao.DeleteJobData(j.Id);
     139            dao.DeleteJob(j.Id);
     140          }
     141        }
     142        dao.DeleteHiveExperiment(hiveExperimentId);
     143      }
    117144    }
    118145    #endregion
     
    189216
    190217    #region Slave Methods
    191     public IEnumerable<Slave> GetAllSlaves() {
    192       throw new NotImplementedException();
    193     }
    194 
    195     public IEnumerable<SlaveGroup> GetAllSlaveGroups() {
    196       throw new NotImplementedException();
    197     }
    198 
    199     public IEnumerable<SlaveGroup> GetAllGroupsOfResource(Guid resourceId) {
    200       throw new NotImplementedException();
    201     }
    202 
    203     public SlaveGroup AddSlaveGroup(SlaveGroup clientGroup) {
    204       throw new NotImplementedException();
    205     }
    206 
    207     public void DeleteSlaveGroup(Guid clientGroupId) {
    208       throw new NotImplementedException();
    209     }
    210 
    211     public void AddResourceToGroup(Guid clientGroupId, Resource resource) {
    212       throw new NotImplementedException();
    213     }
    214 
    215     public void DeleteResourceFromGroup(Guid clientGroupId, Guid resourceId) {
    216       throw new NotImplementedException();
    217     }
    218     #endregion
     218    public Guid AddSlaveGroup(SlaveGroup slaveGroup) {
     219      using (contextFactory.GetContext()) {
     220        return dao.AddSlaveGroup(slaveGroup);
     221      }
     222    }
     223
     224    public IEnumerable<Slave> GetSlaves() {
     225      using (contextFactory.GetContext()) {
     226        return dao.GetSlaves(x => true);
     227      }
     228    }
     229
     230    public IEnumerable<SlaveGroup> GetSlaveGroups() {
     231      using (contextFactory.GetContext()) {
     232        return dao.GetSlaveGroups(x => true);
     233      }
     234    }
     235   
     236    public void DeleteSlaveGroup(Guid slaveGroupId) {
     237      using (contextFactory.GetContext()) {
     238        dao.DeleteSlaveGroup(slaveGroupId);
     239      }
     240    }
     241
     242    public void AddResourceToGroup(Guid slaveGroupId, Resource resource) {
     243      using (contextFactory.GetContext()) {
     244        throw new NotImplementedException();       
     245      }
     246    }
     247
     248    public void RemoveResourceFromGroup(Guid clientGroupId, Guid resourceId) {
     249      using (contextFactory.GetContext()) {
     250        throw new NotImplementedException();
     251      }
     252    }
     253    #endregion
     254
     255    #region Helper Methods
     256    private IEnumerable<Job> GetChildJobs(Guid? parentJobId, bool recursive, bool includeParent) {
     257      var jobs = new List<Job>(dao.GetJobs(x => parentJobId == null ? !x.ParentJobId.HasValue : x.ParentJobId.Value == parentJobId));
     258
     259      if (includeParent) {
     260        jobs.Add(GetJob(parentJobId.Value));
     261      }
     262
     263      if (recursive) {
     264        var childs = new List<Job>();
     265        foreach (var job in jobs) {
     266          childs.AddRange(GetChildJobs(job.Id, recursive, false));
     267        }
     268        jobs.AddRange(childs);
     269      }
     270      return jobs;
     271    }
     272    #endregion
     273
    219274
    220275  }
Note: See TracChangeset for help on using the changeset viewer.