Search in sources :

Example 11 with Recording

use of org.opencastproject.scheduler.api.Recording in project opencast by opencast.

the class SchedulerServiceImplTest method verifyRecording.

private void verifyRecording(String id, String state) throws SchedulerException {
    if (state == null) {
        try {
            schedSvc.getRecordingState(id);
            fail("");
        } catch (NotFoundException e) {
            assertNotNull(e);
        }
    } else {
        try {
            Recording recording = schedSvc.getRecordingState(id);
            assertEquals(id, recording.getID());
            assertEquals(state, recording.getState());
        } catch (NotFoundException e) {
            fail("");
        }
    }
}
Also used : NotFoundException(org.opencastproject.util.NotFoundException) Recording(org.opencastproject.scheduler.api.Recording)

Aggregations

Recording (org.opencastproject.scheduler.api.Recording)11 SchedulerException (org.opencastproject.scheduler.api.SchedulerException)6 RecordingImpl (org.opencastproject.scheduler.api.RecordingImpl)5 NotFoundException (org.opencastproject.util.NotFoundException)5 SchedulerConflictException (org.opencastproject.scheduler.api.SchedulerConflictException)4 SchedulerTransactionLockException (org.opencastproject.scheduler.api.SchedulerTransactionLockException)4 UnauthorizedException (org.opencastproject.security.api.UnauthorizedException)4 HashMap (java.util.HashMap)3 Log.getHumanReadableTimeString (org.opencastproject.util.Log.getHumanReadableTimeString)3 IOException (java.io.IOException)2 Date (java.util.Date)2 GET (javax.ws.rs.GET)2 Path (javax.ws.rs.Path)2 Produces (javax.ws.rs.Produces)2 ValidationException (net.fortuna.ical4j.model.ValidationException)2 HttpResponse (org.apache.http.HttpResponse)2 HttpGet (org.apache.http.client.methods.HttpGet)2 JSONArray (org.json.simple.JSONArray)2 JSONObject (org.json.simple.JSONObject)2 AQueryBuilder (org.opencastproject.assetmanager.api.query.AQueryBuilder)2