Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/DAL.cs @ 16003

Last change on this file since 16003 was 9395, checked in by fschoepp, 12 years ago

#1888:

  • Added visual extensions (dynamic JavaScript) which will be used to render additional result parameters specific to scenarios (e. g. create a graphical representation of a TSP).
  • Added relationship between jobs and experiments (otherwise, it's not possible to get the job's experiment).
  • Updated Admin page to allow removal/addition of visual extensions.
  • Added back-end logic to store/retrieve/delete visual extensions.
  • Added visual extension functionality to the JavaScript views/controllers (job.*.js).
  • Added tsp.js which is a visual extension for the "Genetic Algorithm - TSP" scenario. It adds a graphical representation of the TSP (just like the C# version does) to the results.
File size: 2.2 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Services.Optimization.ControllerService.Model;
6
7namespace HeuristicLab.Services.Optimization.ControllerService.Interfaces {
8  public class StringEntry {
9    public string Key { get; set; }
10    public string Text { get; set; }   
11  };
12
13  public interface IScenarioDao {
14    bool Add(ScenarioEntity entity);
15    bool DeleteByName(string scenarioName);
16    ScenarioEntity FindByName(string scenarioName);
17    IEnumerable<ScenarioEntity> GetAllEntities();
18  }
19
20  public interface IExperimentDao {
21    bool Add(string username, Experiment experiment);
22    bool Update(string username, Experiment experiment);
23    bool DeleteByName(string username, string experiment);
24    bool Delete(string username, string experimentId);
25    Experiment FindByName(string username, string experiment);
26    IEnumerable<Experiment> GetExperiments(string user, bool namesOnly = false);
27    Experiment GetExperimentByName(string username, string scenario);
28
29    Experiment GetExperimentById(User user, string nodeId);
30  }
31
32  public interface IJobDao {
33    bool Add(string username, Experiment experiment, string jobId);
34    bool Delete(string username, string jobId);
35    Experiment FindByJobId(string username, string jobId);
36  }
37
38  public interface IBlobDao {
39    bool Add(StringEntry entry);
40    bool DeleteByKey(string entryKey);
41    StringEntry FindByKey(string entryKey);
42  }
43
44
45  public interface IVisualExtensionDao {
46    bool Add(string algorithmId, string script);
47    bool DeleteById(string algorithmId);
48    string FindById(string algorithmId);
49    bool Exists(string algorithmId);
50  }
51
52  public interface IDataAccessLayer {
53    IScenarioDao ScenarioDao { get; }
54    IBlobDao BlobDao { get; }
55    IExperimentDao ExperimentDao { get; }
56    IVisualExtensionDao VisualExtensionDao { get; }
57    IJobDao JobDao { get; }
58  }
59
60
61  public static class DataAccessLayerProvider {   
62    private static IDataAccessLayer layer = new Azure.AzureDataAccessLayer();
63    //private static IDataAccessLayer layer = new Mockup.MockupDataAccessLayer();
64
65    public static IDataAccessLayer GetLayer() {
66      return layer;
67    }
68  }
69}
70
Note: See TracBrowser for help on using the repository browser.