Class ThemeSearchQuery
java.lang.Object
org.opencastproject.elasticsearch.impl.AbstractSearchQuery
org.opencastproject.elasticsearch.index.objects.theme.ThemeSearchQuery
- All Implemented Interfaces:
org.opencastproject.elasticsearch.api.SearchQuery
public class ThemeSearchQuery
extends org.opencastproject.elasticsearch.impl.AbstractSearchQuery
This interface defines a fluent api for a query object used to lookup themes in the search index.
-
Field Summary
FieldsFields inherited from class org.opencastproject.elasticsearch.impl.AbstractSearchQuery
fields, filter, fuzzySearch, limit, offset, text, types -
Constructor Summary
ConstructorsConstructorDescriptionThemeSearchQuery(String organization, org.opencastproject.security.api.User user) Creates a query that will return theme documents. -
Method Summary
Modifier and TypeMethodDescriptionReturns whether the theme query is searching for themes where the bumper is active.Returns the bumperFile of the theme query.Returns the creator of the themes.Returns the description of the theme query.Long[]Returns the list of theme identifiers or an empty array if no identifiers have been specified.Returns whether the theme query is searching for default themes.Returns whether the theme query is looking for themes where the license slide is active.Returns the license slide background this query is looking for.Returns the license slide description this query is looking for.getName()Returns the name looked for by the theme query.Returns the organization of the theme query.org.opencastproject.util.requests.SortCriterion.OrderReturns the sort order for the theme created date.org.opencastproject.util.requests.SortCriterion.OrderReturns the sort order for the theme creator username.org.opencastproject.util.requests.SortCriterion.OrderReturns the sort order for the theme name.org.opencastproject.util.requests.SortCriterion.OrderReturns the sort order for the theme name.Returns whether this query is searching for themes where the title slide is active.Returns the title slide metadata this query is searching forReturns whether the query is looking for themes where the trailer is activeReturns the trailer file id that is being matched in this queryorg.opencastproject.security.api.UsergetUser()Returns the user of this search querysortByCreatedDateTime(org.opencastproject.util.requests.SortCriterion.Order order) Defines the sort order for the theme created date & time.sortByCreator(org.opencastproject.util.requests.SortCriterion.Order order) Defines the sort order for the theme by creator username.sortByDefault(org.opencastproject.util.requests.SortCriterion.Order order) Defines the sort order for the theme default propertysortByDescription(org.opencastproject.util.requests.SortCriterion.Order order) Defines the sort order for the theme by description.sortByName(org.opencastproject.util.requests.SortCriterion.Order order) Defines the sort order for the theme by names.protected StringsortOrderFieldName(String field) toString()withBumperActive(Boolean bumperActive) Selects themes with where the bumper is active.withBumperFile(String bumperFile) Selects themes with the given bumper file id.withCreatedFrom(Date createdFrom) The created date to start looking for themes.withCreatedTo(Date createdTo) The created date to stop looking for series.withCreator(String creator) Selects themes with the given creator.withDescription(String description) Selects themes with the given description.withIdentifier(long id) Selects themes with the given identifier.withIsDefault(Boolean isDefault) Selects themes that are default.withLicense(String watermarkPosition) Selects themes with the given watermark position.withLicenseSlideActive(Boolean licenseSlideActive) Selects themes where the license slide is active.withLicenseSlideBackground(String licenseSlideBackground) Selects themes with the given license slide background.withLicenseSlideDescription(String licenseSlideDescription) Selects themes with the given license slide description.Selects themes with the given name.withTitleSlideActive(Boolean titleSlideActive) Selects themes where the title slide is active.withTitleSlideBackground(String titleSlideBackground) Selects themes with the given title slide background id.withTitleSlideMetadata(String titleSlideMetadata) Selects themes with matching title slide metadatawithTrailerActive(Boolean trailerActive) Selects themes that have the trailer activewithTrailerFile(String trailerFile) Selects themes with the given trailer filewithWatermarkActive(Boolean watermarkActive) Selects themes where a watermark is activewithWatermarkFile(String watermarkFile) Selects themes with the given watermark fileMethods inherited from class org.opencastproject.elasticsearch.impl.AbstractSearchQuery
getFields, getFilter, getLimit, getOffset, getQueryString, getSortOrder, getSortOrders, getTerms, getTypes, isFuzzySearch, withField, withFields, withFilter, withLimit, withOffset, withSortOrder, withText, withText, withText, withTypes
-
Field Details
-
identifiers
-
-
Constructor Details
-
ThemeSearchQuery
Creates a query that will return theme documents. The user's organization must match the query's organization.- Parameters:
organization- The organization to run this query with. Cannot be null.user- The user to run this query as. Cannot be null.- Throws:
IllegalStateException- Thrown if the current user's organization doesn't match the search organization, the organization is null, or user is null.
-
-
Method Details
-
sortOrderFieldName
- Specified by:
sortOrderFieldNamein classorg.opencastproject.elasticsearch.impl.AbstractSearchQuery
-
withIdentifier
Selects themes with the given identifier.Note that this method may be called multiple times to support selection of multiple themes.
- Parameters:
id- the theme identifier- Returns:
- the enhanced search query
-
getIdentifiers
Returns the list of theme identifiers or an empty array if no identifiers have been specified.- Returns:
- the identifiers
-
withDescription
Selects themes with the given description.- Parameters:
description- the description- Returns:
- the enhanced search query
-
getDescription
Returns the description of the theme query.- Returns:
- the description
-
getOrganization
Returns the organization of the theme query.- 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
-
withCreator
Selects themes with the given creator.- Parameters:
creator- the creator- Returns:
- the enhanced search query
-
getCreator
Returns the creator of the themes.- Returns:
- the creator
-
withCreatedFrom
The created date to start looking for themes.- Parameters:
createdFrom- The created date to start looking for themes- Returns:
- the enhanced search query
-
getCreatedFrom
- Returns:
- The Date after which all series returned should have been created
-
withCreatedTo
The created date to stop looking for series.- Parameters:
createdTo- The created date to stop looking for series- Returns:
- the enhanced search query
-
getCreatedTo
- Returns:
- The Date before which all series returned should have been created
-
withIsDefault
Selects themes that are default.- Parameters:
isDefault- Whether to search for themes that are default or not.- Returns:
- the enhanced search query
-
getIsDefault
Returns whether the theme query is searching for default themes.- Returns:
- whether the search is looking for default themes.
-
withName
Selects themes with the given name.- Parameters:
name- the name- Returns:
- the enhanced search query
-
getName
Returns the name looked for by the theme query.- Returns:
- the name
-
withBumperActive
Selects themes with where the bumper is active.- Parameters:
bumperActive- Whether the bumperActive- Returns:
- the enhanced search query
-
getBumperActive
Returns whether the theme query is searching for themes where the bumper is active.- Returns:
- the bumperActive
-
withBumperFile
Selects themes with the given bumper file id.- Parameters:
bumperFile- the bumper file id- Returns:
- the enhanced search query
-
getBumperFile
Returns the bumperFile of the theme query.- Returns:
- the bumperFile
-
withLicenseSlideActive
Selects themes where the license slide is active.- Parameters:
licenseSlideActive- If the license slide is active or not.- Returns:
- the enhanced search query
-
getLicenseSlideActive
Returns whether the theme query is looking for themes where the license slide is active.- Returns:
- the license
-
withLicenseSlideBackground
Selects themes with the given license slide background.- Parameters:
licenseSlideBackground- the license slide background file- Returns:
- the enhanced search query
-
getLicenseSlideBackground
Returns the license slide background this query is looking for.- Returns:
- the licenseSlideBackground
-
withLicenseSlideDescription
Selects themes with the given license slide description.- Parameters:
licenseSlideDescription- the license slide description- Returns:
- the enhanced search query
-
getLicenseSlideDescription
Returns the license slide description this query is looking for.- Returns:
- the license slide description
-
withTrailerActive
Selects themes that have the trailer active- Parameters:
trailerActive- whether the trailer is active or not- Returns:
- the enhanced search query
-
getTrailerActive
Returns whether the query is looking for themes where the trailer is active- Returns:
- Whether the query is looking for themes where the trailer is active
-
withTrailerFile
Selects themes with the given trailer file- Parameters:
trailerFile- the trailer file that should be in the themes- Returns:
- the enhanced search query
-
getTrailerFile
Returns the trailer file id that is being matched in this query- Returns:
- the trailer file id
-
withTitleSlideActive
Selects themes where the title slide is active.- Parameters:
titleSlideActive- Whether to search for themes where the title slide is active- Returns:
- the enhanced search query
-
getTitleSlideActive
Returns whether this query is searching for themes where the title slide is active.- Returns:
- Whether the query is looking for themes where the title slide is active
-
withTitleSlideMetadata
Selects themes with matching title slide metadata- Parameters:
titleSlideMetadata- Search themes for this title slide metadata- Returns:
- the enhanced search query
-
getTitleSlideMetadata
Returns the title slide metadata this query is searching for- Returns:
- the title slide metadata being searched for
-
withTitleSlideBackground
Selects themes with the given title slide background id.- Parameters:
titleSlideBackground- the id for the title slide background file.- Returns:
- the enhanced search query
-
getTitleSlideBackground
- Returns:
- Returns the title slide background id this query is searching for.
-
withWatermarkActive
Selects themes where a watermark is active- Parameters:
watermarkActive- Whether to search for themes where the watermark is active- Returns:
- the enhanced search query
-
getWatermarkActive
- Returns:
- Returns whether this query is searching for themes where the watermark is active.
-
withWatermarkFile
Selects themes with the given watermark file- Parameters:
watermarkFile- the id of the watermark file- Returns:
- the enhanced search query
-
getWatermarkFile
- Returns:
- Returns the watermark file id this query is searching for.
-
withLicense
Selects themes with the given watermark position.- Parameters:
watermarkPosition- the watermark position to select- Returns:
- the enhanced search query
-
getWatermarkPosition
- Returns:
- Returns the watermark position this query is searching for.
-
sortByCreator
Defines the sort order for the theme by creator username.- Parameters:
order- the order- Returns:
- the enhanced search query
-
getThemeCreatorSortOrder
public org.opencastproject.util.requests.SortCriterion.Order getThemeCreatorSortOrder()Returns the sort order for the theme creator username.- Returns:
- the sort order
-
sortByCreatedDateTime
public ThemeSearchQuery sortByCreatedDateTime(org.opencastproject.util.requests.SortCriterion.Order order) Defines the sort order for the theme created date & time.- Parameters:
order- the order- Returns:
- the enhanced search query
-
sortByDefault
Defines the sort order for the theme default property- Parameters:
order- the order- Returns:
- the enhanced search query
-
getSeriesDateSortOrder
public org.opencastproject.util.requests.SortCriterion.Order getSeriesDateSortOrder()Returns the sort order for the theme created date.- Returns:
- the sort order
-
sortByName
Defines the sort order for the theme by names.- Parameters:
order- the order- Returns:
- the enhanced search query
-
getThemeNameSortOrder
public org.opencastproject.util.requests.SortCriterion.Order getThemeNameSortOrder()Returns the sort order for the theme name.- Returns:
- the sort order
-
sortByDescription
public ThemeSearchQuery sortByDescription(org.opencastproject.util.requests.SortCriterion.Order order) Defines the sort order for the theme by description.- Parameters:
order- the order- Returns:
- the enhanced search query
-
getThemeDescriptionSortOrder
public org.opencastproject.util.requests.SortCriterion.Order getThemeDescriptionSortOrder()Returns the sort order for the theme name.- Returns:
- the sort order
-
toString
-