Class SchedulingUtils

java.lang.Object
org.opencastproject.external.util.SchedulingUtils

public final class SchedulingUtils extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<com.google.gson.JsonObject>
    convertConflictingEvents(Optional<String> checkedEventId, List<org.opencastproject.mediapackage.MediaPackage> mediaPackages, org.opencastproject.index.service.api.IndexService indexService, org.opencastproject.elasticsearch.index.ElasticsearchIndex elasticsearchIndex)
    Convert the given list of MediaPackage elements to a JSON used to tell which events are causing conflicts.
    static List<org.opencastproject.mediapackage.MediaPackage>
    getConflictingEvents(SchedulingUtils.SchedulingInfo schedulingInfo, org.opencastproject.capture.admin.api.CaptureAgentStateService agentStateService, org.opencastproject.scheduler.api.SchedulerService schedulerService)
    Get the conflicting events for the given SchedulingInfo.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • convertConflictingEvents

      public static List<com.google.gson.JsonObject> convertConflictingEvents(Optional<String> checkedEventId, List<org.opencastproject.mediapackage.MediaPackage> mediaPackages, org.opencastproject.index.service.api.IndexService indexService, org.opencastproject.elasticsearch.index.ElasticsearchIndex elasticsearchIndex) throws org.opencastproject.elasticsearch.api.SearchIndexException
      Convert the given list of MediaPackage elements to a JSON used to tell which events are causing conflicts.
      Parameters:
      checkedEventId - The id of the event which was checked for conflicts. May be empty if an rrule was checked.
      mediaPackages - The conflicting MediaPackages.
      indexService - The IndexService for getting the corresponding events for the conflicting MediaPackages.
      elasticsearchIndex - The index to use for getting the corresponding events for the conflicting MediaPackages.
      Returns:
      A List of conflicting events, represented as JSON objects.
      Throws:
      org.opencastproject.elasticsearch.api.SearchIndexException - If an event cannot be found.
    • getConflictingEvents

      public static List<org.opencastproject.mediapackage.MediaPackage> getConflictingEvents(SchedulingUtils.SchedulingInfo schedulingInfo, org.opencastproject.capture.admin.api.CaptureAgentStateService agentStateService, org.opencastproject.scheduler.api.SchedulerService schedulerService) throws org.opencastproject.util.NotFoundException, org.opencastproject.security.api.UnauthorizedException, org.opencastproject.scheduler.api.SchedulerException
      Get the conflicting events for the given SchedulingInfo.
      Parameters:
      schedulingInfo - The SchedulingInfo to check for conflicts.
      agentStateService - The CaptureAgentStateService to use for retrieving capture agents.
      schedulerService - The SchedulerService to use for conflict checking.
      Returns:
      A list of MediaPackage elements which cause conflicts with the given SchedulingInfo.
      Throws:
      org.opencastproject.util.NotFoundException - If the capture agent cannot be found.
      org.opencastproject.security.api.UnauthorizedException - If the SchedulerService cannot be queried due to missing authorization.
      org.opencastproject.scheduler.api.SchedulerException - In case internal errors occur within the SchedulerService.