Search in sources :

Example 6 with ASelectQuery

use of org.opencastproject.assetmanager.api.query.ASelectQuery in project opencast by opencast.

the class IBMWatsonTranscriptionServiceTest method testWorkflowDispatcherRunTranscriptionCompletedState.

@Test
public void testWorkflowDispatcherRunTranscriptionCompletedState() throws Exception {
    database.storeJobControl(MP_ID, TRACK_ID, JOB_ID, TranscriptionJobControl.Status.Progress.name(), TRACK_DURATION);
    database.storeJobControl("mpId2", "audioTrack2", "jobId2", TranscriptionJobControl.Status.Progress.name(), TRACK_DURATION);
    database.updateJobControl(JOB_ID, TranscriptionJobControl.Status.TranscriptionComplete.name());
    // Mocks for query, result, etc
    Snapshot snapshot = EasyMock.createNiceMock(Snapshot.class);
    EasyMock.expect(snapshot.getOrganizationId()).andReturn(org.getId());
    ARecord aRec = EasyMock.createNiceMock(ARecord.class);
    EasyMock.expect(aRec.getSnapshot()).andReturn(Opt.some(snapshot));
    Stream<ARecord> recStream = Stream.mk(aRec);
    Predicate p = EasyMock.createNiceMock(Predicate.class);
    EasyMock.expect(p.and(p)).andReturn(p);
    AResult r = EasyMock.createNiceMock(AResult.class);
    EasyMock.expect(r.getSize()).andReturn(1L);
    EasyMock.expect(r.getRecords()).andReturn(recStream);
    Target t = EasyMock.createNiceMock(Target.class);
    ASelectQuery selectQuery = EasyMock.createNiceMock(ASelectQuery.class);
    EasyMock.expect(selectQuery.where(EasyMock.anyObject(Predicate.class))).andReturn(selectQuery);
    EasyMock.expect(selectQuery.run()).andReturn(r);
    AQueryBuilder query = EasyMock.createNiceMock(AQueryBuilder.class);
    EasyMock.expect(query.snapshot()).andReturn(t);
    EasyMock.expect(query.mediaPackageId(EasyMock.anyObject(String.class))).andReturn(p);
    EasyMock.expect(query.select(EasyMock.anyObject(Target.class))).andReturn(selectQuery);
    VersionField v = EasyMock.createNiceMock(VersionField.class);
    EasyMock.expect(v.isLatest()).andReturn(p);
    EasyMock.expect(query.version()).andReturn(v);
    EasyMock.expect(assetManager.createQuery()).andReturn(query);
    EasyMock.replay(snapshot, aRec, p, r, t, selectQuery, query, v, assetManager);
    Capture<Set<String>> capturedMpIds = Capture.newInstance();
    WorkflowDefinition wfDef = new WorkflowDefinitionImpl();
    EasyMock.expect(wfService.getWorkflowDefinitionById(IBMWatsonTranscriptionService.DEFAULT_WF_DEF)).andReturn(wfDef);
    List<WorkflowInstance> wfList = new ArrayList<WorkflowInstance>();
    wfList.add(new WorkflowInstanceImpl());
    Stream<WorkflowInstance> wfListStream = Stream.mk(wfList);
    Workflows wfs = EasyMock.createNiceMock(Workflows.class);
    EasyMock.expect(wfs.applyWorkflowToLatestVersion(EasyMock.capture(capturedMpIds), EasyMock.anyObject(ConfiguredWorkflow.class))).andReturn(wfListStream);
    service.setWfUtil(wfs);
    EasyMock.replay(wfService, wfs);
    WorkflowDispatcher dispatcher = service.new WorkflowDispatcher();
    dispatcher.run();
    // Check if only one mp has a workflow created for it
    Assert.assertEquals(1, capturedMpIds.getValue().size());
    // And if it was the correct one
    Assert.assertEquals(MP_ID, capturedMpIds.getValue().iterator().next());
    // Check if status in db was updated
    TranscriptionJobControl job = database.findByJob(JOB_ID);
    Assert.assertNotNull(job);
    Assert.assertEquals(TranscriptionJobControl.Status.Closed.name(), job.getStatus());
}
Also used : TranscriptionJobControl(org.opencastproject.transcription.ibmwatson.persistence.TranscriptionJobControl) Set(java.util.Set) WorkflowDefinitionImpl(org.opencastproject.workflow.api.WorkflowDefinitionImpl) Workflows(org.opencastproject.assetmanager.util.Workflows) VersionField(org.opencastproject.assetmanager.api.query.VersionField) ArrayList(java.util.ArrayList) AQueryBuilder(org.opencastproject.assetmanager.api.query.AQueryBuilder) WorkflowDefinition(org.opencastproject.workflow.api.WorkflowDefinition) WorkflowDispatcher(org.opencastproject.transcription.ibmwatson.IBMWatsonTranscriptionService.WorkflowDispatcher) WorkflowInstance(org.opencastproject.workflow.api.WorkflowInstance) ConfiguredWorkflow(org.opencastproject.workflow.api.ConfiguredWorkflow) Predicate(org.opencastproject.assetmanager.api.query.Predicate) Snapshot(org.opencastproject.assetmanager.api.Snapshot) ARecord(org.opencastproject.assetmanager.api.query.ARecord) Target(org.opencastproject.assetmanager.api.query.Target) WorkflowInstanceImpl(org.opencastproject.workflow.api.WorkflowInstanceImpl) AResult(org.opencastproject.assetmanager.api.query.AResult) ASelectQuery(org.opencastproject.assetmanager.api.query.ASelectQuery) Test(org.junit.Test)

Example 7 with ASelectQuery

use of org.opencastproject.assetmanager.api.query.ASelectQuery in project opencast by opencast.

the class SchedulerServiceImpl method getCalendar.

@Override
public String getCalendar(Opt<String> captureAgentId, Opt<String> seriesId, Opt<Date> cutoff) throws SchedulerException {
    try {
        AQueryBuilder query = assetManager.createQuery();
        Props p = new Props(query);
        Predicate predicate = withOrganization(query).and(withOwner(query)).and(query.hasPropertiesOf(p.namespace())).and(p.optOut().eq(false)).and(withVersion(query)).and(p.end().ge(DateTime.now().minusHours(1).toDate()));
        for (String agentId : captureAgentId) {
            predicate = predicate.and(p.agent().eq(agentId));
        }
        for (String series : seriesId) {
            predicate = predicate.and(query.seriesId().eq(series));
        }
        for (Date d : cutoff) {
            predicate = predicate.and(p.start().le(d));
        }
        ASelectQuery select = query.select(query.snapshot(), p.agent().target(), p.start().target(), p.end().target(), query.propertiesOf(CA_NAMESPACE)).where(predicate);
        Stream<ARecord> records = select.run().getRecords();
        CalendarGenerator cal = new CalendarGenerator(seriesService);
        for (ARecord record : records) {
            boolean blacklisted;
            // isBlacklisted() methods are not implemented in the persistence layer and return always false
            // try {
            // //blacklisted = isBlacklisted(record.getMediaPackageId());
            // } catch (NotFoundException e) {
            // continue;
            // }
            blacklisted = false;
            // Skip blacklisted events
            if (blacklisted)
                continue;
            Opt<MediaPackage> optMp = record.getSnapshot().map(episodeToMp);
            // If the event media package is empty, skip the event
            if (optMp.isNone()) {
                logger.warn("Mediapackage for event '{}' can't be found, event is not recorded", record.getMediaPackageId());
                continue;
            }
            Opt<DublinCoreCatalog> catalogOpt = loadEpisodeDublinCoreFromAsset(record.getSnapshot().get());
            if (catalogOpt.isNone()) {
                logger.warn("No episode catalog available, skipping!");
                continue;
            }
            Map<String, String> caMetadata = record.getProperties().filter(filterByNamespace._2(CA_NAMESPACE)).group(toKey, toValue);
            // If the even properties are empty, skip the event
            if (caMetadata.isEmpty()) {
                logger.warn("Properties for event '{}' can't be found, event is not recorded", record.getMediaPackageId());
                continue;
            }
            String agentId = record.getProperties().apply(Properties.getString(AGENT_CONFIG));
            Date start = record.getProperties().apply(Properties.getDate(START_DATE_CONFIG));
            Date end = record.getProperties().apply(Properties.getDate(END_DATE_CONFIG));
            Date lastModified = record.getSnapshot().get().getArchivalDate();
            // Add the entry to the calendar, skip it with a warning if adding fails
            try {
                cal.addEvent(optMp.get(), catalogOpt.get(), agentId, start, end, lastModified, toPropertyString(caMetadata));
            } catch (Exception e) {
                logger.warn("Error adding event '{}' to calendar, event is not recorded: {}", record.getMediaPackageId(), getStackTrace(e));
                continue;
            }
        }
        // Only validate calendars with events. Without any events, the iCalendar won't validate
        if (cal.getCalendar().getComponents().size() > 0) {
            try {
                cal.getCalendar().validate();
            } catch (ValidationException e) {
                logger.warn("Recording calendar could not be validated (returning it anyways): {}", getStackTrace(e));
            }
        }
        return cal.getCalendar().toString();
    } catch (Exception e) {
        if (e instanceof SchedulerException)
            throw e;
        logger.error("Failed getting calendar: {}", getStackTrace(e));
        throw new SchedulerException(e);
    }
}
Also used : ValidationException(net.fortuna.ical4j.model.ValidationException) SchedulerException(org.opencastproject.scheduler.api.SchedulerException) AQueryBuilder(org.opencastproject.assetmanager.api.query.AQueryBuilder) Log.getHumanReadableTimeString(org.opencastproject.util.Log.getHumanReadableTimeString) Date(java.util.Date) SchedulerException(org.opencastproject.scheduler.api.SchedulerException) SchedulerConflictException(org.opencastproject.scheduler.api.SchedulerConflictException) IOException(java.io.IOException) ServiceException(org.osgi.framework.ServiceException) SchedulerTransactionLockException(org.opencastproject.scheduler.api.SchedulerTransactionLockException) ConfigurationException(org.osgi.service.cm.ConfigurationException) SeriesException(org.opencastproject.series.api.SeriesException) MediaPackageException(org.opencastproject.mediapackage.MediaPackageException) ValidationException(net.fortuna.ical4j.model.ValidationException) UnauthorizedException(org.opencastproject.security.api.UnauthorizedException) NotFoundException(org.opencastproject.util.NotFoundException) Predicate(org.opencastproject.assetmanager.api.query.Predicate) ARecord(org.opencastproject.assetmanager.api.query.ARecord) MediaPackage(org.opencastproject.mediapackage.MediaPackage) ASelectQuery(org.opencastproject.assetmanager.api.query.ASelectQuery) DublinCoreCatalog(org.opencastproject.metadata.dublincore.DublinCoreCatalog)

Example 8 with ASelectQuery

use of org.opencastproject.assetmanager.api.query.ASelectQuery in project opencast by opencast.

the class AbstractAssetManagerPropertyRetrievalTest method testPropertyRetrieval.

/**
 * Create some media packages and associate some random properties to each of them.
 * Then iterate all created properties and create a query for each of them.
 */
@Test
@Parameters
public void testPropertyRetrieval(final Params params) {
    // create a set of media packages and add them to the asset manager
    final String[] mps = createAndAddMediaPackagesSimple(params.mpCount, 1, 1);
    final Random random = new Random(System.nanoTime());
    // create a set of random property names
    final PropertyName[] propertyNames = createRandomPropertyNames(params.propertyNameSetSize);
    // create a random amount of random properties for each media package
    final Stream<Property> props = $(mps).bind(new Fn<String, Stream<Property>>() {

        @Override
        public Stream<Property> apply(final String mp) {
            // create a random amount of random properties
            return Stream.cont(inc()).take(random.nextInt(params.maxProps - params.minProps + 1) + params.minProps).map(new Fn<Integer, Property>() {

                @Override
                public Property apply(Integer ignore) {
                    // try to pick a free property a 100 times
                    for (int i = 0; i < 100; i++) {
                        // randomly select a property name
                        final PropertyName pName = propertyNames[random.nextInt(propertyNames.length)];
                        // check if the selected property is already associated with the current media package
                        final ASelectQuery doesPropertyExist = q.select(q.properties(pName)).where(q.mediaPackageId(mp));
                        if (sizeOf(doesPropertyExist.run().getRecords().bind(ARecords.getProperties)) == 0) {
                            // create a property with a randomly picked value
                            final Property p = Property.mk(PropertyId.mk(mp, pName), params.values[random.nextInt(params.values.length)]);
                            if (am.setProperty(p))
                                return p;
                        }
                    }
                    fail("Cannot pick another random property that has not been inserted yet");
                    return null;
                }
            });
        }
    }).eval();
    assertThat("Number of generated properties", sizeOf(props), allOf(greaterThanOrEqualTo(params.mpCount * params.minProps), lessThanOrEqualTo(params.mpCount * params.maxProps)));
    // iterate all properties and try to retrieve them from the AssetManager
    for (final Property prop : props) {
        final AResult r = q.select(params.mkTarget.apply(prop)).where(params.mkWhere.apply(prop)).run();
        // get all properties of the result records
        assertThat("Number of records", r.getSize(), params.expectRecords);
        final Stream<Property> allProps = r.getRecords().bind(ARecords.getProperties);
        assertThat("Total number of properties: " + allProps.mkString(", "), sizeOf(allProps), params.expectPropertiesTotal);
        assertThat("Total number of snapshots", sizeOf(r.getRecords().bind(ARecords.getSnapshot)), params.expectSnapshotsTotal);
        final Stream<Property> findSavedProperty = r.getRecords().bind(ARecords.getProperties).filter(Booleans.eq(prop));
        if (params.expectContainsSavedProperty) {
            assertThat("Contains saved property", findSavedProperty, hasItem(prop));
        }
    }
}
Also used : PropertyName(org.opencastproject.assetmanager.api.PropertyName) Fn(com.entwinemedia.fn.Fn) Random(java.util.Random) AResult(org.opencastproject.assetmanager.api.query.AResult) ASelectQuery(org.opencastproject.assetmanager.api.query.ASelectQuery) Property(org.opencastproject.assetmanager.api.Property) Parameters(junitparams.Parameters) Test(org.junit.Test)

Example 9 with ASelectQuery

use of org.opencastproject.assetmanager.api.query.ASelectQuery in project opencast by opencast.

the class IBMWatsonTranscriptionServiceTest method testWorkflowDispatcherRunProgressState.

@Test
public void testWorkflowDispatcherRunProgressState() throws Exception {
    InputStream stream = IBMWatsonTranscriptionServiceTest.class.getResourceAsStream("/" + PULLED_TRANSCRIPTION_FILE);
    database.storeJobControl(MP_ID, TRACK_ID, JOB_ID, TranscriptionJobControl.Status.Progress.name(), 0);
    database.storeJobControl("mpId2", "audioTrack2", "jobId2", TranscriptionJobControl.Status.Progress.name(), TRACK_DURATION);
    EasyMock.expect(workspace.putInCollection(EasyMock.anyObject(String.class), EasyMock.anyObject(String.class), EasyMock.anyObject(InputStream.class))).andReturn(new URI("http://anything"));
    EasyMock.replay(workspace);
    HttpEntity httpEntity = EasyMock.createNiceMock(HttpEntity.class);
    EasyMock.expect(httpEntity.getContent()).andReturn(stream);
    CloseableHttpResponse response = EasyMock.createNiceMock(CloseableHttpResponse.class);
    StatusLine status = EasyMock.createNiceMock(StatusLine.class);
    EasyMock.expect(response.getStatusLine()).andReturn(status).anyTimes();
    EasyMock.expect(response.getEntity()).andReturn(httpEntity).anyTimes();
    EasyMock.expect(status.getStatusCode()).andReturn(HttpStatus.SC_OK).anyTimes();
    EasyMock.replay(httpEntity, response, status);
    Capture<HttpGet> capturedGet = Capture.newInstance();
    EasyMock.expect(httpClient.execute(EasyMock.capture(capturedGet))).andReturn(response);
    EasyMock.replay(httpClient);
    // enrich(q.select(q.snapshot()).where(q.mediaPackageId(mpId).and(q.version().isLatest())).run()).getSnapshots();
    // Mocks for query, result, etc
    Snapshot snapshot = EasyMock.createNiceMock(Snapshot.class);
    EasyMock.expect(snapshot.getOrganizationId()).andReturn(org.getId());
    ARecord aRec = EasyMock.createNiceMock(ARecord.class);
    EasyMock.expect(aRec.getSnapshot()).andReturn(Opt.some(snapshot));
    Stream<ARecord> recStream = Stream.mk(aRec);
    Predicate p = EasyMock.createNiceMock(Predicate.class);
    EasyMock.expect(p.and(p)).andReturn(p);
    AResult r = EasyMock.createNiceMock(AResult.class);
    EasyMock.expect(r.getSize()).andReturn(1L);
    EasyMock.expect(r.getRecords()).andReturn(recStream);
    Target t = EasyMock.createNiceMock(Target.class);
    ASelectQuery selectQuery = EasyMock.createNiceMock(ASelectQuery.class);
    EasyMock.expect(selectQuery.where(EasyMock.anyObject(Predicate.class))).andReturn(selectQuery);
    EasyMock.expect(selectQuery.run()).andReturn(r);
    AQueryBuilder query = EasyMock.createNiceMock(AQueryBuilder.class);
    EasyMock.expect(query.snapshot()).andReturn(t);
    EasyMock.expect(query.mediaPackageId(EasyMock.anyObject(String.class))).andReturn(p);
    EasyMock.expect(query.select(EasyMock.anyObject(Target.class))).andReturn(selectQuery);
    VersionField v = EasyMock.createNiceMock(VersionField.class);
    EasyMock.expect(v.isLatest()).andReturn(p);
    EasyMock.expect(query.version()).andReturn(v);
    EasyMock.expect(assetManager.createQuery()).andReturn(query);
    EasyMock.replay(snapshot, aRec, p, r, t, selectQuery, query, v, assetManager);
    Capture<Set<String>> capturedMpIds = Capture.newInstance();
    WorkflowDefinition wfDef = new WorkflowDefinitionImpl();
    EasyMock.expect(wfService.getWorkflowDefinitionById(IBMWatsonTranscriptionService.DEFAULT_WF_DEF)).andReturn(wfDef);
    List<WorkflowInstance> wfList = new ArrayList<WorkflowInstance>();
    wfList.add(new WorkflowInstanceImpl());
    Stream<WorkflowInstance> wfListStream = Stream.mk(wfList);
    Workflows wfs = EasyMock.createNiceMock(Workflows.class);
    EasyMock.expect(wfs.applyWorkflowToLatestVersion(EasyMock.capture(capturedMpIds), EasyMock.anyObject(ConfiguredWorkflow.class))).andReturn(wfListStream);
    service.setWfUtil(wfs);
    EasyMock.replay(wfService, wfs);
    WorkflowDispatcher dispatcher = service.new WorkflowDispatcher();
    dispatcher.run();
    // Check if it called the external service to get the results
    Assert.assertEquals("https://stream.watsonplatform.net/speech-to-text/api/v1/recognitions/" + JOB_ID, capturedGet.getValue().getURI().toString());
    // Check if only one mp has a workflow created for it
    Assert.assertEquals(1, capturedMpIds.getValue().size());
    // And if it was the correct one
    Assert.assertEquals(MP_ID, capturedMpIds.getValue().iterator().next());
    // Check if status in db was updated
    TranscriptionJobControl job = database.findByJob(JOB_ID);
    Assert.assertNotNull(job);
    Assert.assertEquals(TranscriptionJobControl.Status.Closed.name(), job.getStatus());
}
Also used : Set(java.util.Set) HttpEntity(org.apache.http.HttpEntity) HttpGet(org.apache.http.client.methods.HttpGet) ArrayList(java.util.ArrayList) AQueryBuilder(org.opencastproject.assetmanager.api.query.AQueryBuilder) WorkflowDispatcher(org.opencastproject.transcription.ibmwatson.IBMWatsonTranscriptionService.WorkflowDispatcher) WorkflowInstance(org.opencastproject.workflow.api.WorkflowInstance) URI(java.net.URI) Predicate(org.opencastproject.assetmanager.api.query.Predicate) ARecord(org.opencastproject.assetmanager.api.query.ARecord) Target(org.opencastproject.assetmanager.api.query.Target) CloseableHttpResponse(org.apache.http.client.methods.CloseableHttpResponse) AResult(org.opencastproject.assetmanager.api.query.AResult) TranscriptionJobControl(org.opencastproject.transcription.ibmwatson.persistence.TranscriptionJobControl) WorkflowDefinitionImpl(org.opencastproject.workflow.api.WorkflowDefinitionImpl) Workflows(org.opencastproject.assetmanager.util.Workflows) ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) VersionField(org.opencastproject.assetmanager.api.query.VersionField) WorkflowDefinition(org.opencastproject.workflow.api.WorkflowDefinition) ConfiguredWorkflow(org.opencastproject.workflow.api.ConfiguredWorkflow) StatusLine(org.apache.http.StatusLine) Snapshot(org.opencastproject.assetmanager.api.Snapshot) WorkflowInstanceImpl(org.opencastproject.workflow.api.WorkflowInstanceImpl) ASelectQuery(org.opencastproject.assetmanager.api.query.ASelectQuery) Test(org.junit.Test)

Example 10 with ASelectQuery

use of org.opencastproject.assetmanager.api.query.ASelectQuery in project opencast by opencast.

the class SchedulerServiceImpl method preCollisionEventCheck.

private List<String> preCollisionEventCheck(String trxId, String schedulingSource) throws SchedulerException {
    try {
        AQueryBuilder query = assetManager.createQuery();
        Props p = new Props(query);
        TrxProps trxP = new TrxProps(query);
        Predicate isSourceWithTrx = trxP.source().eq(schedulingSource).and(trxP.transactionId().eq(trxId));
        Predicate hasProperties = p.agent().exists().and(p.start().exists()).and(p.end().exists());
        Predicate isNotSource = p.source().eq(schedulingSource).not().and(hasProperties);
        Predicate isNotOptedOut = p.optOut().eq(false).or(trxP.optOut().eq(false));
        ASelectQuery select = query.select(trxP.optOut().target(), p.optOut().target(), p.agent().target(), p.start().target(), p.end().target(), trxP.agent().target(), trxP.start().target(), trxP.end().target(), trxP.transactionId().target()).where(withOrganization(query).and(isSourceWithTrx.or(isNotSource)).and(query.version().isLatest()).and(isNotOptedOut));
        AResult result = select.run();
        // Check for conflicts
        List<String> conflictingRecords = new ArrayList<>();
        Map<String, List<Interval>> invervalMap = new HashMap<>();
        for (ARecord record : result.getRecords()) {
            String agentId;
            Date start;
            Date end;
            Opt<String> optTrxId = record.getProperties().apply(Properties.getStringOpt(TRANSACTION_ID_CONFIG));
            if (optTrxId.isSome() && trxId.equals(optTrxId.get())) {
                agentId = record.getProperties().filter(filterByNamespace._2(trxP.namespace())).apply(Properties.getString(AGENT_CONFIG));
                start = record.getProperties().filter(filterByNamespace._2(trxP.namespace())).apply(Properties.getDate(START_DATE_CONFIG));
                end = record.getProperties().filter(filterByNamespace._2(trxP.namespace())).apply(Properties.getDate(END_DATE_CONFIG));
            } else {
                agentId = record.getProperties().filter(filterByNamespace._2(p.namespace())).apply(Properties.getString(AGENT_CONFIG));
                start = record.getProperties().filter(filterByNamespace._2(p.namespace())).apply(Properties.getDate(START_DATE_CONFIG));
                end = record.getProperties().filter(filterByNamespace._2(p.namespace())).apply(Properties.getDate(END_DATE_CONFIG));
            }
            Interval currentInterval = new Interval(start.getTime(), end.getTime());
            List<Interval> intervals = invervalMap.get(agentId);
            if (intervals == null)
                intervals = new ArrayList<>();
            boolean overlaps = false;
            for (Interval i : intervals) {
                if (!i.overlaps(currentInterval))
                    continue;
                overlaps = true;
                break;
            }
            if (!overlaps) {
                intervals.add(currentInterval);
            } else {
                conflictingRecords.add(record.getMediaPackageId());
            }
            invervalMap.put(agentId, intervals);
        }
        return conflictingRecords;
    } catch (Exception e) {
        logger.error("Failed to search for conflicting events: {}", getStackTrace(e));
        throw new SchedulerException(e);
    }
}
Also used : SchedulerException(org.opencastproject.scheduler.api.SchedulerException) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) AQueryBuilder(org.opencastproject.assetmanager.api.query.AQueryBuilder) Log.getHumanReadableTimeString(org.opencastproject.util.Log.getHumanReadableTimeString) Date(java.util.Date) SchedulerException(org.opencastproject.scheduler.api.SchedulerException) SchedulerConflictException(org.opencastproject.scheduler.api.SchedulerConflictException) IOException(java.io.IOException) ServiceException(org.osgi.framework.ServiceException) SchedulerTransactionLockException(org.opencastproject.scheduler.api.SchedulerTransactionLockException) ConfigurationException(org.osgi.service.cm.ConfigurationException) SeriesException(org.opencastproject.series.api.SeriesException) MediaPackageException(org.opencastproject.mediapackage.MediaPackageException) ValidationException(net.fortuna.ical4j.model.ValidationException) UnauthorizedException(org.opencastproject.security.api.UnauthorizedException) NotFoundException(org.opencastproject.util.NotFoundException) Predicate(org.opencastproject.assetmanager.api.query.Predicate) ARecord(org.opencastproject.assetmanager.api.query.ARecord) AResult(org.opencastproject.assetmanager.api.query.AResult) ArrayList(java.util.ArrayList) AccessControlList(org.opencastproject.security.api.AccessControlList) List(java.util.List) LinkedList(java.util.LinkedList) ASelectQuery(org.opencastproject.assetmanager.api.query.ASelectQuery) Interval(org.joda.time.Interval)

Aggregations

ASelectQuery (org.opencastproject.assetmanager.api.query.ASelectQuery)11 AQueryBuilder (org.opencastproject.assetmanager.api.query.AQueryBuilder)9 ARecord (org.opencastproject.assetmanager.api.query.ARecord)7 AResult (org.opencastproject.assetmanager.api.query.AResult)7 Predicate (org.opencastproject.assetmanager.api.query.Predicate)6 ArrayList (java.util.ArrayList)4 Test (org.junit.Test)4 Snapshot (org.opencastproject.assetmanager.api.Snapshot)4 MediaPackageException (org.opencastproject.mediapackage.MediaPackageException)4 IOException (java.io.IOException)3 Date (java.util.Date)3 ValidationException (net.fortuna.ical4j.model.ValidationException)3 VersionField (org.opencastproject.assetmanager.api.query.VersionField)3 SchedulerConflictException (org.opencastproject.scheduler.api.SchedulerConflictException)3 SchedulerException (org.opencastproject.scheduler.api.SchedulerException)3 SchedulerTransactionLockException (org.opencastproject.scheduler.api.SchedulerTransactionLockException)3 AccessControlList (org.opencastproject.security.api.AccessControlList)3 UnauthorizedException (org.opencastproject.security.api.UnauthorizedException)3 SeriesException (org.opencastproject.series.api.SeriesException)3 Fn (com.entwinemedia.fn.Fn)2