Class SchedulingUtils
java.lang.Object
org.opencastproject.external.util.SchedulingUtils
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 ofMediaPackageelements 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.
-
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 ofMediaPackageelements 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 conflictingMediaPackages.indexService- TheIndexServicefor getting the corresponding events for the conflictingMediaPackages.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- TheCaptureAgentStateServiceto use for retrieving capture agents.schedulerService- TheSchedulerServiceto use for conflict checking.- Returns:
- A list of
MediaPackageelements 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 theSchedulerServicecannot be queried due to missing authorization.org.opencastproject.scheduler.api.SchedulerException- In case internal errors occur within theSchedulerService.
-