Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/17/10 10:26:55 (14 years ago)
Author:
cneumuel
Message:
  • Refactored HL.Hive.Experiment. JobItems are not called HiveJobs and OptimizerJobs do not contain a hierarchy anymore.
  • Dynamic generation of jobs on a slave are not reflected on the client user interface.
  • Optimizer-Trees are now strictly synchronized with the HiveJob-Trees (also the ComputeInParallel property is taken into account when the Child HiveJobs are created)
  • Improved the way a class can report progress and lock the UI (IProgressReporter, IProgress, Progress, ProgressView)
  • Changes were made to the config-files, so that server and clients work with blade12.hpc.fh-hagenberg.at
  • Lots of small changes and bugfixes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3-Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ClientFacade.cs

    r4368 r4423  
    6262    public Response RequestSnapshot(Guid jobId) {
    6363      using (contextFactory.GetContext()) {
    64         ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobId);
     64        ServiceLocator.GetAuthorizationManager().AuthorizeJobs(jobId);
    6565        return jobManager.RequestSnapshot(jobId);
    6666      }
     
    7171    public ResponseObject<SerializedJob> GetLastSerializedResult(Guid jobId) {
    7272      using (contextFactory.GetContext(false)) {
    73         ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobId);
     73        ServiceLocator.GetAuthorizationManager().AuthorizeJobs(jobId);
    7474        return jobManager.GetLastSerializedResult(jobId);
    7575      }
     
    8080    public ResponseObject<SerializedJob> GetSnapshotResult(Guid jobId) {
    8181      using (contextFactory.GetContext(false)) {
    82         ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobId);
     82        ServiceLocator.GetAuthorizationManager().AuthorizeJobs(jobId);
    8383        return jobManager.GetSnapshotResult(jobId);
    8484      }
     
    8989    public ResponseObject<JobDto> GetJobById(Guid jobId) {
    9090      using (contextFactory.GetContext(false)) {
    91         ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobId);
     91        ServiceLocator.GetAuthorizationManager().AuthorizeJobs(jobId);
    9292        return jobManager.GetJobById(jobId);
    9393      }
     
    9898    public Response AbortJob(Guid jobId) {
    9999      using (contextFactory.GetContext()) {
    100         ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobId);
     100        ServiceLocator.GetAuthorizationManager().AuthorizeJobs(jobId);
    101101        return jobManager.AbortJob(jobId);
    102102      }
     
    107107    public ResponseObject<JobResultList> GetJobResults(IEnumerable<Guid> jobIds) {
    108108      using (contextFactory.GetContext(false)) {
    109         ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobIds.ToArray());
     109        ServiceLocator.GetAuthorizationManager().AuthorizeJobs(jobIds.ToArray());
    110110        return jobManager.GetJobResults(jobIds);
    111111      }
     
    117117      using (contextFactory.GetContext(false)) {
    118118        if (parentJobId.HasValue) {
    119           ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(parentJobId.Value);
     119          ServiceLocator.GetAuthorizationManager().AuthorizeJobs(parentJobId.Value);
    120120        }
    121121        // If parentJobId is null, GetChildJobResults will filter the results for the current user
     
    123123      }
    124124    }
     125
     126    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
     127    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     128    public ResponseObject<HiveExperimentDtoList> GetHiveExperiments() {
     129      using (contextFactory.GetContext(false)) {
     130        return jobManager.GetHiveExperiments();
     131      }
     132    }
     133
     134    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
     135    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     136    public ResponseObject<HiveExperimentDto> UpdateHiveExperiment(HiveExperimentDto hiveExperimentDto) {
     137      using (contextFactory.GetContext()) {
     138        if (hiveExperimentDto.UserId == Guid.Empty) {
     139          hiveExperimentDto.UserId = ServiceLocator.GetAuthorizationManager().UserId;
     140        } else {
     141          ServiceLocator.GetAuthorizationManager().Authorize(hiveExperimentDto.UserId);
     142        }
     143        return jobManager.UpdateHiveExperiment(hiveExperimentDto);
     144      }
     145    }
     146
     147    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
     148    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     149    public Response DeleteHiveExperiment(Guid hiveExperimentId) {
     150      using (contextFactory.GetContext()) {
     151        var hiveExperimentDto = DaoLocator.HiveExperimentDao.FindById(hiveExperimentId);
     152        if (hiveExperimentDto != null) {
     153          ServiceLocator.GetAuthorizationManager().Authorize(hiveExperimentDto.UserId);
     154        }
     155        return jobManager.DeleteHiveExperiment(hiveExperimentId);
     156      }
     157    }
     158
     159    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
     160    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     161    public ResponseObject<JobDto> AddChildJob(Guid parentJobId, SerializedJob serializedJob) {
     162      using (contextFactory.GetContext()) {
     163        ServiceLocator.GetAuthorizationManager().AuthorizeJobs(parentJobId);
     164        return jobManager.AddChildJob(parentJobId, serializedJob);
     165      }
     166    }
    125167    #endregion
    126 
    127 
    128168  }
    129169}
Note: See TracChangeset for help on using the changeset viewer.