Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 14778 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
RevLine 
[8958]1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
[9215]5using HeuristicLab.Services.Optimization.ControllerService.Model;
[8958]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
[9215]20  public interface IExperimentDao {
21    bool Add(string username, Experiment experiment);
[9305]22    bool Update(string username, Experiment experiment);
[9215]23    bool DeleteByName(string username, string experiment);
[9324]24    bool Delete(string username, string experimentId);
[9215]25    Experiment FindByName(string username, string experiment);
[9324]26    IEnumerable<Experiment> GetExperiments(string user, bool namesOnly = false);
[9227]27    Experiment GetExperimentByName(string username, string scenario);
[9305]28
29    Experiment GetExperimentById(User user, string nodeId);
[9215]30  }
31
[9395]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
[8958]38  public interface IBlobDao {
39    bool Add(StringEntry entry);
40    bool DeleteByKey(string entryKey);
41    StringEntry FindByKey(string entryKey);
42  }
43
[9362]44
45  public interface IVisualExtensionDao {
46    bool Add(string algorithmId, string script);
47    bool DeleteById(string algorithmId);
48    string FindById(string algorithmId);
[9395]49    bool Exists(string algorithmId);
[9362]50  }
51
[8958]52  public interface IDataAccessLayer {
[9215]53    IScenarioDao ScenarioDao { get; }
54    IBlobDao BlobDao { get; }
[9350]55    IExperimentDao ExperimentDao { get; }
[9362]56    IVisualExtensionDao VisualExtensionDao { get; }
[9395]57    IJobDao JobDao { get; }
[8958]58  }
[9166]59
[9362]60
[9166]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  }
[8958]69}
70
Note: See TracBrowser for help on using the repository browser.