java.lang.Object
org.opencastproject.elasticsearch.impl.AbstractSearchQuery
org.opencastproject.elasticsearch.index.objects.event.EventSearchQuery
All Implemented Interfaces:
org.opencastproject.elasticsearch.api.SearchQuery

public class EventSearchQuery extends org.opencastproject.elasticsearch.impl.AbstractSearchQuery
This interface defines a fluent api for a query object used to lookup recording events in the search index.
  • Constructor Details

    • EventSearchQuery

      public EventSearchQuery(String organization, org.opencastproject.security.api.User user)
      Creates a query that will return event documents.
  • Method Details

    • sortOrderFieldName

      protected String sortOrderFieldName(String field)
      Specified by:
      sortOrderFieldName in class org.opencastproject.elasticsearch.impl.AbstractSearchQuery
    • withIdentifier

      public EventSearchQuery withIdentifier(String id)
      Selects recording events with the given identifier.

      Note that this method may be called multiple times to support selection of multiple recording events.

      Parameters:
      id - the recording identifier
      Returns:
      the enhanced search query
    • getIdentifier

      public String[] getIdentifier()
      Returns the list of recording identifiers or an empty array if no identifiers have been specified.
      Returns:
      the identifiers
    • getOrganization

      public String getOrganization()
      Returns the organization of the recording
      Returns:
      the organization
    • getUser

      public org.opencastproject.security.api.User getUser()
      Returns the user of this search query
      Returns:
      the user of this search query
    • withTitle

      public EventSearchQuery withTitle(String title)
      Selects recordings with the given title.
      Parameters:
      title - the title
      Returns:
      the enhanced search query
    • getTitle

      public String getTitle()
      Returns the title of the recording.
      Returns:
      the title
    • withoutActions

      public EventSearchQuery withoutActions()
      Filter the recording events without any action checked.
      Returns:
      the enhanced search query
    • withAction

      public EventSearchQuery withAction(org.opencastproject.security.api.Permissions.Action action)
      Filter the recording events with the given action.

      Note that this method may be called multiple times to support filtering by multiple actions.

      Parameters:
      action - the action
      Returns:
      the enhanced search query
    • getActions

      public String[] getActions()
      Returns the list of actions or an empty array if no actions have been specified.
      Returns:
      the actions
    • withPresenter

      public EventSearchQuery withPresenter(String presenter)
      Selects recording events with the given presenter.

      Note that this method may be called multiple times to support selection of multiple recording events.

      Parameters:
      presenter - the presenter
      Returns:
      the enhanced search query
    • getPresenters

      public String[] getPresenters()
      Returns the list of recording presenters or an empty array if no presenter have been specified.
      Returns:
      the presenters
    • withContributor

      public EventSearchQuery withContributor(String contributor)
      Selects recording events with the given contributor.

      Note that this method may be called multiple times to support selection of multiple recording events.

      Parameters:
      contributor - the contributor
      Returns:
      the enhanced search query
    • getContributors

      public String[] getContributors()
      Returns the list of recording contributors or an empty array if no contributors have been specified.
      Returns:
      the contributors
    • withSubject

      public EventSearchQuery withSubject(String subject)
      Selects recording events with the given subject.
      Parameters:
      subject - the subject
      Returns:
      the enhanced search query
    • getSubject

      public String getSubject()
      Returns the subject of the recording.
      Returns:
      the subject
    • withDescription

      public EventSearchQuery withDescription(String description)
      Selects recordings with the given description.
      Parameters:
      description - the description
      Returns:
      the enhanced search query
    • getDescription

      public String getDescription()
      Returns the description of the recording.
      Returns:
      the description
    • withLocation

      public EventSearchQuery withLocation(String location)
      Selects recordings with the given location.
      Parameters:
      location - the location
      Returns:
      the enhanced search query
    • getLocation

      public String getLocation()
      Returns the location of the recording.
      Returns:
      the location
    • withSeriesId

      public EventSearchQuery withSeriesId(String seriesId)
      Selects recordings with the given series identifier.
      Parameters:
      seriesId - the series identifier
      Returns:
      the enhanced search query
    • getSeriesId

      public String getSeriesId()
      Returns the series identifier of the recording.
      Returns:
      the series identifier
    • withSeriesName

      public EventSearchQuery withSeriesName(String seriesName)
      Selects recordings with the given series name.
      Parameters:
      seriesName - the series name
      Returns:
      the enhanced search query
    • getSeriesName

      public String getSeriesName()
      Returns the series name of the recording.
      Returns:
      the series name
    • withLanguage

      public EventSearchQuery withLanguage(String language)
      Selects recordings with the given language.
      Parameters:
      language - the language
      Returns:
      the enhanced search query
    • getLanguage

      public String getLanguage()
      Returns the language of the recording.
      Returns:
      the language
    • withSource

      public EventSearchQuery withSource(String source)
      Selects recordings with the given source type.
      Parameters:
      source - the source
      Returns:
      the enhanced search query
    • getSource

      public String getSource()
      Returns the source of the recording.
      Returns:
      the source
    • withCreated

      public EventSearchQuery withCreated(String created)
      Selects recordings with the given creation date.
      Parameters:
      created - the creation date
      Returns:
      the enhanced search query
    • getCreated

      public String getCreated()
      Returns the creation date of the recording.
      Returns:
      the creation date
    • withStartFrom

      public EventSearchQuery withStartFrom(Date startFrom)
      The start date to start looking for events.
      Parameters:
      startFrom - The start date to start looking for events
      Returns:
      the enhanced search query
    • getStartFrom

      public Date getStartFrom()
      Returns:
      The Date after which all events returned should have been started
    • withStartTo

      public EventSearchQuery withStartTo(Date startTo)
      The start date to stop looking for events.
      Parameters:
      startTo - The start date to stop looking for events
      Returns:
      the enhanced search query
    • getStartTo

      public Date getStartTo()
      Returns:
      The Date before which all events returned should have been started
    • withTechnicalStartFrom

      public EventSearchQuery withTechnicalStartFrom(Date startFrom)
      The technical start date to start looking for events.
      Parameters:
      startFrom - The technical start date to start looking for events
      Returns:
      the enhanced search query
    • getTechnicalStartFrom

      public Date getTechnicalStartFrom()
      Returns:
      The technical date after which all events returned should have been started
    • withTechnicalStartTo

      public EventSearchQuery withTechnicalStartTo(Date startTo)
      The technical start date to stop looking for events.
      Parameters:
      startTo - The technical start date to stop looking for events
      Returns:
      the enhanced search query
    • getTechnicalStartTo

      public Date getTechnicalStartTo()
      Returns:
      The technical date before which all events returned should have been started
    • withCreator

      public EventSearchQuery withCreator(String creator)
      Selects recordings with the given creator.
      Parameters:
      creator - the creator
      Returns:
      the enhanced search query
    • getCreator

      public String getCreator()
      Returns the creator of the recording.
      Returns:
      the creator
    • withPublisher

      public EventSearchQuery withPublisher(String publisher)
      Selects recordings with the given publisher.
      Parameters:
      publisher - the publisher
      Returns:
      the enhanced search query
    • getPublisher

      public String getPublisher()
      Returns the publisher of the recording.
      Returns:
      the publisher
    • withLicense

      public EventSearchQuery withLicense(String license)
      Selects recordings with the given license.
      Parameters:
      license - the license
      Returns:
      the enhanced search query
    • getLicense

      public String getLicense()
      Returns the license of the recording.
      Returns:
      the license
    • withRights

      public EventSearchQuery withRights(String rights)
      Selects recordings with the given rights.
      Parameters:
      rights - the rights
      Returns:
      the enhanced search query
    • getRights

      public String getRights()
      Returns the rights of the recording.
      Returns:
      the rights
    • withAccessPolicy

      public EventSearchQuery withAccessPolicy(String accessPolicy)
      Selects recordings with the given access policy.
      Parameters:
      accessPolicy - the access policy
      Returns:
      the enhanced search query
    • getAccessPolicy

      public String getAccessPolicy()
      Returns the access policy of the recording.
      Returns:
      the access policy
    • withManagedAcl

      public EventSearchQuery withManagedAcl(String managedAcl)
      Selects recordings with the given managed ACL name.
      Parameters:
      managedAcl - the name of the managed ACL
      Returns:
      the enhanced search query
    • getManagedAcl

      public String getManagedAcl()
      Returns the name of the managed ACL set to the recording.
      Returns:
      the name of the managed ACL
    • withWorkflowState

      public EventSearchQuery withWorkflowState(String workflowState)
      Selects recordings with the given workflow state.
      Parameters:
      workflowState - the workflow state
      Returns:
      the enhanced search query
    • getWorkflowState

      public String getWorkflowState()
      Returns the workflow state of the recording.
      Returns:
      the workflow state
    • withWorkflowId

      public EventSearchQuery withWorkflowId(long workflowId)
      Selects recordings with the given workflow id.
      Parameters:
      workflowId - the workflow id
      Returns:
      the enhanced search query
    • getWorkflowId

      public Long getWorkflowId()
      Returns the workflow id of the recording.
      Returns:
      the workflow id
    • withWorkflowDefinition

      public EventSearchQuery withWorkflowDefinition(String workflowDefinition)
      Selects recordings with the given workflow definition.
      Parameters:
      workflowDefinition - the workflow definition
      Returns:
      the enhanced search query
    • getWorkflowDefinition

      public String getWorkflowDefinition()
      Returns the workflow definition of the recording.
      Returns:
      the workflow definition
    • withStartDate

      public EventSearchQuery withStartDate(String startDate)
      Selects recordings with the given start date.
      Parameters:
      startDate - the start date
      Returns:
      the enhanced search query
    • getStartDate

      public String getStartDate()
      Returns the start date of the recording.
      Returns:
      the start date
    • withDuration

      public EventSearchQuery withDuration(long duration)
      Selects recordings with the given duration.
      Parameters:
      duration - the duration
      Returns:
      the enhanced search query
    • getDuration

      public Long getDuration()
      Returns the duration of the recording.
      Returns:
      the duration
    • withEventStatus

      public EventSearchQuery withEventStatus(String eventStatus)
      Selects recordings with the given event status.
      Parameters:
      eventStatus - the event status
      Returns:
      the enhanced search query
    • getEventStatus

      public String getEventStatus()
      Returns the event status of the recording.
      Returns:
      the event status
    • withComments

      public EventSearchQuery withComments(boolean hasComments)
      Selects recordings with the given has comments status.
      Parameters:
      hasComments - the has comments status
      Returns:
      the enhanced search query
    • withOpenComments

      public EventSearchQuery withOpenComments(boolean hasOpenComments)
      Selects recordings with the given has open comments status.
      Parameters:
      hasOpenComments - the has open comments status
      Returns:
      the enhanced search query
    • withNeedsCutting

      public EventSearchQuery withNeedsCutting(boolean needsCutting)
      Selects recordings with the given has comment need cutting status.
      Parameters:
      needsCutting - the event has the comments status that it needs cutting
      Returns:
      the enhanced search query
    • getHasComments

      public Boolean getHasComments()
      Returns the has comments status of the recording.
      Returns:
      the recording has comments status
    • getHasOpenComments

      public Boolean getHasOpenComments()
      Returns the has open comments status of the recording.
      Returns:
      the recording has open comments status
    • withComments

      public EventSearchQuery withComments(String comment)
    • getComments

      public String[] getComments()
    • needsCutting

      public Boolean needsCutting()
      Returns the has open comments reason that it needs cutting of the recording.
      Returns:
      the event has the open comments status that it needs cutting
    • withPublications

      public EventSearchQuery withPublications(String publication)
      Selects recording events with the given publication.

      Note that this method may be called multiple times to support selection of multiple recording events.

      Parameters:
      publication - the publication
      Returns:
      the enhanced search query
    • getPublications

      public String[] getPublications()
      Returns the list of event publications or an empty array if no publications have been specified.
      Returns:
      the publications
    • withIsPublished

      public EventSearchQuery withIsPublished(boolean isPublished)
      Selects recordings with the given is published status.
      Parameters:
      isPublished - the is published status
      Returns:
      the enhanced search query
    • getIsPublished

      public Boolean getIsPublished()
      Returns the is published status of the recording.
      Returns:
      the recording is published status
    • withArchiveVersion

      public EventSearchQuery withArchiveVersion(long archiveVersion)
      Selects events with the given archive version.
      Parameters:
      archiveVersion - the archive version
      Returns:
      the enhanced search query
    • getArchiveVersion

      public Long getArchiveVersion()
      Returns the archive version of the event.
      Returns:
      the archive version
    • withAgentId

      public EventSearchQuery withAgentId(String agentId)
      Selects recordings with the given agent id.
      Parameters:
      agentId - the agent id
      Returns:
      the enhanced search query
    • getAgentId

      public String getAgentId()
      Returns the agent id of the recording.
      Returns:
      the agent id
    • withTechnicalStartTime

      public EventSearchQuery withTechnicalStartTime(Date technicalStartTime)
      Selects recordings with the given technical start date.
      Parameters:
      technicalStartTime - the start date
      Returns:
      the enhanced search query
    • getTechnicalStartTime

      public Date getTechnicalStartTime()
      Returns the technical start date of the recording.
      Returns:
      the technical start date
    • withTechnicalEndTime

      public EventSearchQuery withTechnicalEndTime(Date technicalEndTime)
      Selects recordings with the given technical end date.
      Parameters:
      technicalEndTime - the end date
      Returns:
    • getTechnicalEndTime

      public Date getTechnicalEndTime()
      Returns the technical end date of the recording.
      Returns:
      the technical end date
    • withTechnicalPresenters

      public EventSearchQuery withTechnicalPresenters(String presenter)
      Selects recording events with the given technical presenters.

      Note that this method may be called multiple times to support selection of multiple recording events.

      Parameters:
      presenter - the presenter
      Returns:
      the enhanced search query
    • getTechnicalPresenters

      public String[] getTechnicalPresenters()
      Returns the list of technical presenters or an empty array if no presenters have been specified.
      Returns:
      the technical presenters
    • sortByStartDate

      public EventSearchQuery sortByStartDate(org.opencastproject.util.requests.SortCriterion.Order order)
      Defines the sort order for the recording start date.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getStartDateSortOrder

      public org.opencastproject.util.requests.SortCriterion.Order getStartDateSortOrder()
      Returns the sort order for the recording start date.
      Returns:
      the sort order
    • sortByTechnicalStartDate

      public EventSearchQuery sortByTechnicalStartDate(org.opencastproject.util.requests.SortCriterion.Order order)
      Defines the sort order for the technical recording start date.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getTechnicalStartDateSortOrder

      public org.opencastproject.util.requests.SortCriterion.Order getTechnicalStartDateSortOrder()
      Returns the sort order for the technical recording start date.
      Returns:
      the sort order
    • sortByEndDate

      public EventSearchQuery sortByEndDate(org.opencastproject.util.requests.SortCriterion.Order order)
      Defines the sort order for the recording end date.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getEndDateSortOrder

      public org.opencastproject.util.requests.SortCriterion.Order getEndDateSortOrder()
      Returns the sort order for the recording end date.
      Returns:
      the sort order
    • sortByTechnicalEndDate

      public EventSearchQuery sortByTechnicalEndDate(org.opencastproject.util.requests.SortCriterion.Order order)
      Defines the sort order for the technical recording end date.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getTechnicalEndDateSortOrder

      public org.opencastproject.util.requests.SortCriterion.Order getTechnicalEndDateSortOrder()
      Returns the sort order for the technical recording end date.
      Returns:
      the sort order
    • sortByDate

      public EventSearchQuery sortByDate(org.opencastproject.util.requests.SortCriterion.Order order)
      Defines the sort order for the recording date.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getDateSortOrder

      public org.opencastproject.util.requests.SortCriterion.Order getDateSortOrder()
      Returns the sort order for the recording date.
      Returns:
      the sort order
    • sortByTitle

      public EventSearchQuery sortByTitle(org.opencastproject.util.requests.SortCriterion.Order order)
      Defines the sort order for the recording date.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getTitleSortOrder

      public org.opencastproject.util.requests.SortCriterion.Order getTitleSortOrder()
      Returns the sort order for the recording start date.
      Returns:
      the sort order
    • sortByUID

      public EventSearchQuery sortByUID(org.opencastproject.util.requests.SortCriterion.Order order)
    • getUIDSortOrder

      public org.opencastproject.util.requests.SortCriterion.Order getUIDSortOrder()
    • sortByPresenter

      public EventSearchQuery sortByPresenter(org.opencastproject.util.requests.SortCriterion.Order order)
      Defines the sort order for the recording date.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getPresentersSortOrder

      public org.opencastproject.util.requests.SortCriterion.Order getPresentersSortOrder()
      Returns the sort order for the recording start date.
      Returns:
      the sort order
    • sortByLocation

      public EventSearchQuery sortByLocation(org.opencastproject.util.requests.SortCriterion.Order order)
      Defines the sort order for the location.
      Parameters:
      order - the sort order
      Returns:
      the updated query
    • getLocationSortOrder

      public org.opencastproject.util.requests.SortCriterion.Order getLocationSortOrder()
      Returns the sort order for the location.
      Returns:
      the sort order
    • sortBySeriesName

      public EventSearchQuery sortBySeriesName(org.opencastproject.util.requests.SortCriterion.Order order)
      Defines the sort order for the series name.
      Parameters:
      order - the sort order
      Returns:
      the updated query
    • getSeriesNameSortOrder

      public org.opencastproject.util.requests.SortCriterion.Order getSeriesNameSortOrder()
      Returns the sort order for the series name.
      Returns:
      the sort order
    • sortByManagedAcl

      public EventSearchQuery sortByManagedAcl(org.opencastproject.util.requests.SortCriterion.Order order)
      Defines the sort order for the managed ACL.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getManagedAclSortOrder

      public org.opencastproject.util.requests.SortCriterion.Order getManagedAclSortOrder()
      Returns the sort order for the series managed ACL.
      Returns:
      the sort order
    • sortByWorkflowState

      public EventSearchQuery sortByWorkflowState(org.opencastproject.util.requests.SortCriterion.Order order)
      Defines the sort order for the workflow state.
      Parameters:
      order - the sort order
      Returns:
      the updated query
    • getWorkflowStateSortOrder

      public org.opencastproject.util.requests.SortCriterion.Order getWorkflowStateSortOrder()
      Returns the sort order for the workflow state.
      Returns:
      the sort order
    • sortByEventStatus

      public EventSearchQuery sortByEventStatus(org.opencastproject.util.requests.SortCriterion.Order order)
      Defines the sort order for the event status.
      Parameters:
      order - the sort order
      Returns:
      the updated query
    • getEventStatusSortOrder

      public org.opencastproject.util.requests.SortCriterion.Order getEventStatusSortOrder()
      Returns the sort order for the event status.
      Returns:
      the sort order
    • sortByPublicationIgnoringInternal

      public EventSearchQuery sortByPublicationIgnoringInternal(org.opencastproject.util.requests.SortCriterion.Order order)
      Defines the sort order for publication.
      Parameters:
      order - the sort order
      Returns:
      the updated query
    • getPublicationSortOrder

      public org.opencastproject.util.requests.SortCriterion.Order getPublicationSortOrder()
      Returns the sort order for the publication.
      Returns:
      the sort order