Class IndexServiceImpl
java.lang.Object
org.opencastproject.index.service.impl.IndexServiceImpl
- All Implemented Interfaces:
IndexService
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opencastproject.index.service.api.IndexService
IndexService.EventRemovalResult, IndexService.Source, IndexService.SourceType -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) voidaddCatalogUIAdapter(org.opencastproject.metadata.dublincore.EventCatalogUIAdapter catalogUIAdapter) OSGi callback to addEventCatalogUIAdapterinstance.voidaddCatalogUIAdapter(org.opencastproject.metadata.dublincore.SeriesCatalogUIAdapter catalogUIAdapter) OSGi callback to addSeriesCatalogUIAdapterinstance.createEvent(javax.servlet.http.HttpServletRequest request) Creates a new event based on a request.createEvent(org.json.simple.JSONObject metadataJson, org.opencastproject.mediapackage.MediaPackage mp) createEvent(EventHttpServletRequest eventHttpServletRequest) Create a new event using aEventHttpServletRequest.createSeries(org.json.simple.JSONObject metadata) Create a new series.createSeries(org.opencastproject.metadata.dublincore.MetadataList metadataList, Map<String, String> options, com.entwinemedia.fn.data.Opt<org.opencastproject.security.api.AccessControlList> optAcl, com.entwinemedia.fn.data.Opt<Long> optThemeId) Create a series from a set of metadata and options.voiddeactivate(org.osgi.service.component.ComponentContext cc) org.opencastproject.authorization.xacml.manager.api.AclServiceorg.opencastproject.metadata.dublincore.EventCatalogUIAdapterorg.opencastproject.metadata.dublincore.EventCatalogUIAdaptergetCommonEventCatalogUIAdapter(String organization) org.opencastproject.metadata.dublincore.SeriesCatalogUIAdapterorg.opencastproject.metadata.dublincore.SeriesCatalogUIAdaptergetCommonSeriesCatalogUIAdapter(String organization) com.entwinemedia.fn.data.Opt<org.opencastproject.elasticsearch.index.objects.event.Event> Get a single eventList<org.opencastproject.metadata.dublincore.EventCatalogUIAdapter> List<org.opencastproject.metadata.dublincore.EventCatalogUIAdapter> getEventCatalogUIAdapters(String organization) org.opencastproject.mediapackage.MediaPackagegetEventMediapackage(org.opencastproject.elasticsearch.index.objects.event.Event event) getEventSource(org.opencastproject.elasticsearch.index.objects.event.Event event) Determines in a very basic way what kind of source the event isgetEventWorkflowProperties(List<String> eventIds) List<org.opencastproject.metadata.dublincore.EventCatalogUIAdapter> org.opencastproject.metadata.dublincore.MetadataListorg.opencastproject.metadata.dublincore.MetadataListList<org.opencastproject.metadata.dublincore.SeriesCatalogUIAdapter> List<org.opencastproject.metadata.dublincore.SeriesCatalogUIAdapter> getSeriesCatalogUIAdapters(String organization) getTechnicalPresenters(org.opencastproject.metadata.dublincore.DublinCoreMetadataCollection eventMetadata) Processes the combined usernames and free text entries of the presenters (creator) field into a list of presenters using the full names of the users if available and adds the usernames to a set of technical presenters.booleanisWorkflowActive(String workflowState) voidremoveCatalogByFlavor(org.opencastproject.elasticsearch.index.objects.event.Event event, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor) Remove catalogs from the event with the given flavor.voidremoveCatalogByFlavor(org.opencastproject.elasticsearch.index.objects.series.Series series, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor) Remove a catalog from the series that matches the given flavor.voidremoveCatalogUIAdapter(org.opencastproject.metadata.dublincore.EventCatalogUIAdapter catalogUIAdapter) OSGi callback to removeEventCatalogUIAdapterinstance.voidremoveCatalogUIAdapter(org.opencastproject.metadata.dublincore.SeriesCatalogUIAdapter catalogUIAdapter) OSGi callback to removeSeriesCatalogUIAdapterinstance.booleanremoveEvent(String id) Removes an event.removeEvent(org.opencastproject.elasticsearch.index.objects.event.Event event, String retractWorkflowId) Removes an event and retracts it if necessary.voidremoveSeries(String id) Remove a series.voidsetAclServiceFactory(org.opencastproject.authorization.xacml.manager.api.AclServiceFactory aclServiceFactory) OSGi DI.voidsetAssetManager(org.opencastproject.assetmanager.api.AssetManager assetManager) OSGi DI.voidsetAuthorizationService(org.opencastproject.security.api.AuthorizationService authorizationService) OSGi DI.voidsetCaptureAgentStateService(org.opencastproject.capture.admin.api.CaptureAgentStateService captureAgentStateService) OSGi DI.voidsetElasticsearchIndex(org.opencastproject.elasticsearch.index.ElasticsearchIndex elasticsearchIndex) voidsetEventCommentService(org.opencastproject.event.comment.EventCommentService eventCommentService) OSGi callback for the event comment service.voidsetIngestService(org.opencastproject.ingest.api.IngestService ingestService) OSGi DI.voidsetListProvidersService(org.opencastproject.list.api.ListProvidersService listProvidersService) OSGi DI.voidsetSchedulerService(org.opencastproject.scheduler.api.SchedulerService schedulerService) OSGi DI.voidsetSecurityService(org.opencastproject.security.api.SecurityService securityService) OSGi DI.voidsetSeriesService(org.opencastproject.series.api.SeriesService seriesService) OSGi DI.voidsetUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService) OSGi DI.voidsetWorkflowService(org.opencastproject.workflow.api.WorkflowService workflowService) OSGi DI.voidsetWorkspace(org.opencastproject.workspace.api.Workspace workspace) OSGi DI.org.opencastproject.metadata.dublincore.MetadataListupdateAllEventMetadata(String id, String metadataJSON, org.opencastproject.elasticsearch.index.ElasticsearchIndex index) Update the event metadata in all available catalogs.org.opencastproject.metadata.dublincore.MetadataListupdateAllSeriesMetadata(String id, String metadataJSON, org.opencastproject.elasticsearch.index.ElasticsearchIndex index) Update the series metadata in all available catalogs.org.opencastproject.metadata.dublincore.MetadataListupdateAllSeriesMetadata(String id, org.opencastproject.metadata.dublincore.MetadataList metadataList, org.opencastproject.elasticsearch.index.ElasticsearchIndex index) Update the series metadata in all available catalogs by providing a completeMetadataListvoidupdateCommentCatalog(org.opencastproject.elasticsearch.index.objects.event.Event event, List<org.opencastproject.event.comment.EventComment> comments) org.opencastproject.security.api.AccessControlListupdateEventAcl(String id, org.opencastproject.security.api.AccessControlList acl, org.opencastproject.elasticsearch.index.ElasticsearchIndex index) Update the event'sAccessControlList.updateEventAssets(org.opencastproject.mediapackage.MediaPackage mp, javax.servlet.http.HttpServletRequest request) Create or Update an existing event asset.org.opencastproject.metadata.dublincore.MetadataListupdateEventMetadata(String id, org.opencastproject.metadata.dublincore.MetadataList metadataList, org.opencastproject.elasticsearch.index.ElasticsearchIndex index) Update an event's metadata using aMetadataListprotected org.opencastproject.mediapackage.MediaPackageupdateMpAssetFlavor(List<String> assetList, org.opencastproject.mediapackage.MediaPackage mp, org.json.simple.JSONArray assetMetadata) Update the flavor of newly added asset with the passed metadata
-
Field Details
-
THEME_PROPERTY_NAME
- See Also:
-
-
Constructor Details
-
IndexServiceImpl
public IndexServiceImpl()
-
-
Method Details
-
setAclServiceFactory
public void setAclServiceFactory(org.opencastproject.authorization.xacml.manager.api.AclServiceFactory aclServiceFactory) OSGi DI.- Parameters:
aclServiceFactory- the factory to set
-
setElasticsearchIndex
public void setElasticsearchIndex(org.opencastproject.elasticsearch.index.ElasticsearchIndex elasticsearchIndex) -
setAuthorizationService
public void setAuthorizationService(org.opencastproject.security.api.AuthorizationService authorizationService) OSGi DI.- Parameters:
authorizationService- the service to set
-
setCaptureAgentStateService
public void setCaptureAgentStateService(org.opencastproject.capture.admin.api.CaptureAgentStateService captureAgentStateService) OSGi DI.- Parameters:
captureAgentStateService- the service to set
-
setEventCommentService
public void setEventCommentService(org.opencastproject.event.comment.EventCommentService eventCommentService) OSGi callback for the event comment service.- Parameters:
eventCommentService- the service to set
-
addCatalogUIAdapter
public void addCatalogUIAdapter(org.opencastproject.metadata.dublincore.EventCatalogUIAdapter catalogUIAdapter) OSGi callback to addEventCatalogUIAdapterinstance.- Parameters:
catalogUIAdapter- the adapter to add
-
removeCatalogUIAdapter
public void removeCatalogUIAdapter(org.opencastproject.metadata.dublincore.EventCatalogUIAdapter catalogUIAdapter) OSGi callback to removeEventCatalogUIAdapterinstance.- Parameters:
catalogUIAdapter- the adapter to remove
-
addCatalogUIAdapter
public void addCatalogUIAdapter(org.opencastproject.metadata.dublincore.SeriesCatalogUIAdapter catalogUIAdapter) OSGi callback to addSeriesCatalogUIAdapterinstance.- Parameters:
catalogUIAdapter- the adapter to add
-
removeCatalogUIAdapter
public void removeCatalogUIAdapter(org.opencastproject.metadata.dublincore.SeriesCatalogUIAdapter catalogUIAdapter) OSGi callback to removeSeriesCatalogUIAdapterinstance.- Parameters:
catalogUIAdapter- the adapter to remove
-
setIngestService
public void setIngestService(org.opencastproject.ingest.api.IngestService ingestService) OSGi DI.- Parameters:
ingestService- the service to set
-
setListProvidersService
public void setListProvidersService(org.opencastproject.list.api.ListProvidersService listProvidersService) OSGi DI.- Parameters:
listProvidersService- the service to set
-
setAssetManager
public void setAssetManager(org.opencastproject.assetmanager.api.AssetManager assetManager) OSGi DI.- Parameters:
assetManager- the manager to set
-
setSchedulerService
public void setSchedulerService(org.opencastproject.scheduler.api.SchedulerService schedulerService) OSGi DI.- Parameters:
schedulerService- the service to set
-
setSecurityService
public void setSecurityService(org.opencastproject.security.api.SecurityService securityService) OSGi DI.- Parameters:
securityService- the service to set
-
setSeriesService
public void setSeriesService(org.opencastproject.series.api.SeriesService seriesService) OSGi DI.- Parameters:
seriesService- the service to set
-
setWorkflowService
public void setWorkflowService(org.opencastproject.workflow.api.WorkflowService workflowService) OSGi DI.- Parameters:
workflowService- the service to set
-
setWorkspace
public void setWorkspace(org.opencastproject.workspace.api.Workspace workspace) OSGi DI.- Parameters:
workspace- the workspace to set
-
setUserDirectoryService
public void setUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService) OSGi DI.- Parameters:
userDirectoryService- the service to set
-
getAclService
public org.opencastproject.authorization.xacml.manager.api.AclService getAclService()- Returns:
- the acl service
-
getEventCatalogUIAdapters
-
getSeriesCatalogUIAdapters
public List<org.opencastproject.metadata.dublincore.SeriesCatalogUIAdapter> getSeriesCatalogUIAdapters(String organization) - Parameters:
organization- The organization to filter the results with.- Returns:
- A
ListofSeriesCatalogUIAdapterthat provide the metadata to the front end.
-
getCommonEventCatalogUIAdapter
public org.opencastproject.metadata.dublincore.EventCatalogUIAdapter getCommonEventCatalogUIAdapter(String organization) -
getCommonSeriesCatalogUIAdapter
public org.opencastproject.metadata.dublincore.SeriesCatalogUIAdapter getCommonSeriesCatalogUIAdapter(String organization) -
getEventCatalogUIAdapters
public List<org.opencastproject.metadata.dublincore.EventCatalogUIAdapter> getEventCatalogUIAdapters()- Specified by:
getEventCatalogUIAdaptersin interfaceIndexService- Returns:
- A
ListofEventCatalogUIAdapterthat provide the metadata to the front end.
-
getExtendedEventCatalogUIAdapters
public List<org.opencastproject.metadata.dublincore.EventCatalogUIAdapter> getExtendedEventCatalogUIAdapters()- Specified by:
getExtendedEventCatalogUIAdaptersin interfaceIndexService- Returns:
- A
Listof extendedEventCatalogUIAdapterthat provide the metadata to the front end. Does not contain the commonEventCatalogUIAdapter.
-
getSeriesCatalogUIAdapters
public List<org.opencastproject.metadata.dublincore.SeriesCatalogUIAdapter> getSeriesCatalogUIAdapters()- Specified by:
getSeriesCatalogUIAdaptersin interfaceIndexService- Returns:
- A
ListofSeriesCatalogUIAdapterthat provide the metadata to the front end.
-
getCommonEventCatalogUIAdapter
public org.opencastproject.metadata.dublincore.EventCatalogUIAdapter getCommonEventCatalogUIAdapter()- Specified by:
getCommonEventCatalogUIAdapterin interfaceIndexService- Returns:
- the common
EventCatalogUIAdapter
-
getCommonSeriesCatalogUIAdapter
public org.opencastproject.metadata.dublincore.SeriesCatalogUIAdapter getCommonSeriesCatalogUIAdapter()- Specified by:
getCommonSeriesCatalogUIAdapterin interfaceIndexService- Returns:
- the common
SeriesCatalogUIAdapter
-
activate
public void activate(org.osgi.service.component.ComponentContext cc) -
deactivate
public void deactivate(org.osgi.service.component.ComponentContext cc) -
createEvent
public String createEvent(javax.servlet.http.HttpServletRequest request) throws IndexServiceException, UnsupportedAssetException Description copied from interface:IndexServiceCreates a new event based on a request.- Specified by:
createEventin interfaceIndexService- Parameters:
request- The request containing the data to create the event.- Returns:
- The event's id (or a comma seperated list of event ids if it was a group of events)
- Throws:
IndexServiceException- Thrown if there was an internal server error while creating the event.UnsupportedAssetException- Thrown if the provided asset file type is not accepted.
-
updateEventAssets
public String updateEventAssets(org.opencastproject.mediapackage.MediaPackage mp, javax.servlet.http.HttpServletRequest request) throws IndexServiceException, UnsupportedAssetException Description copied from interface:IndexServiceCreate or Update an existing event asset. The request contains a JSON describing asset type, flavor, subflavor, the mpId, a workflow description id to initiate on the event, and the asset file streams in a multipart form. Existing type-flavor matches are updated, otherwise the asset is added.- Specified by:
updateEventAssetsin interfaceIndexService- Parameters:
mp- The mediapackage to updaterequest- The http servlet request containing metadata, workflow id, and file streams- Returns:
- the workflow instance id that was started
- Throws:
IndexServiceException- Thrown if the update assets workflow cannot be startedUnsupportedAssetException- Thrown if the provided asset file type is not accepted.
-
createEvent
public String createEvent(org.json.simple.JSONObject metadataJson, org.opencastproject.mediapackage.MediaPackage mp) throws ParseException, IOException, org.opencastproject.mediapackage.MediaPackageException, org.opencastproject.ingest.api.IngestException, org.opencastproject.util.NotFoundException, org.opencastproject.scheduler.api.SchedulerException, org.opencastproject.security.api.UnauthorizedException - Throws:
ParseExceptionIOExceptionorg.opencastproject.mediapackage.MediaPackageExceptionorg.opencastproject.ingest.api.IngestExceptionorg.opencastproject.util.NotFoundExceptionorg.opencastproject.scheduler.api.SchedulerExceptionorg.opencastproject.security.api.UnauthorizedException
-
createEvent
public String createEvent(EventHttpServletRequest eventHttpServletRequest) throws ParseException, IOException, org.opencastproject.mediapackage.MediaPackageException, org.opencastproject.ingest.api.IngestException, org.opencastproject.util.NotFoundException, org.opencastproject.scheduler.api.SchedulerException, org.opencastproject.security.api.UnauthorizedException Description copied from interface:IndexServiceCreate a new event using aEventHttpServletRequest.- Specified by:
createEventin interfaceIndexService- Parameters:
eventHttpServletRequest- TheEventHttpServletRequestcontaining all of the necessary information to create a new event.- Returns:
- The id or ids created by the
EventHttpServletRequest. - Throws:
ParseException- Thrown if unable to parse the start and end UTC date and time.IOException- Thrown if unable to update the event's DublinCoreCatalogorg.opencastproject.mediapackage.MediaPackageException- Thrown if unable to update the event'sMediaPackageorg.opencastproject.ingest.api.IngestException- Thrown if unable to update the ingest service with the new Event.org.opencastproject.util.NotFoundException- Thrown if the specified workflow definition cannot be found.org.opencastproject.scheduler.api.SchedulerException- Thrown if unable to schedule the new event.org.opencastproject.security.api.UnauthorizedException- Thrown if the current user is unable to create the new event.
-
updateMpAssetFlavor
protected org.opencastproject.mediapackage.MediaPackage updateMpAssetFlavor(List<String> assetList, org.opencastproject.mediapackage.MediaPackage mp, org.json.simple.JSONArray assetMetadata) Update the flavor of newly added asset with the passed metadata- Parameters:
assetList- the list of assets to updatemp- the mediapackage to updateassetMetadata- a set of mapping metadata for the asset list- Returns:
- mediapackage updated with assets
-
updateAllEventMetadata
public org.opencastproject.metadata.dublincore.MetadataList updateAllEventMetadata(String id, String metadataJSON, org.opencastproject.elasticsearch.index.ElasticsearchIndex index) throws IllegalArgumentException, IndexServiceException, org.opencastproject.util.NotFoundException, org.opencastproject.elasticsearch.api.SearchIndexException, org.opencastproject.security.api.UnauthorizedException Description copied from interface:IndexServiceUpdate the event metadata in all available catalogs.- Specified by:
updateAllEventMetadatain interfaceIndexService- Parameters:
id- The id of the event to update.metadataJSON- The metadata to update in json format.index- The index to update the event in.- Returns:
- A metadata list of the updated fields.
- Throws:
IllegalArgumentException- Thrown if the metadata was not formatted correctly.IndexServiceException- Thrown if there was an error updating the event.org.opencastproject.util.NotFoundException- Thrown if theEventcould not be found.org.opencastproject.elasticsearch.api.SearchIndexException- Thrown if there was an error searching the search index.org.opencastproject.security.api.UnauthorizedException- Thrown if the current user is unable to update the event.
-
removeCatalogByFlavor
public void removeCatalogByFlavor(org.opencastproject.elasticsearch.index.objects.event.Event event, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor) throws IndexServiceException, org.opencastproject.util.NotFoundException, org.opencastproject.security.api.UnauthorizedException Description copied from interface:IndexServiceRemove catalogs from the event with the given flavor.- Specified by:
removeCatalogByFlavorin interfaceIndexService- Parameters:
event- The event who will have the catalog removed.flavor- The flavor to use to find the catalogs.- Throws:
IndexServiceException- Thrown if there was a problem getting the catalog for the event.org.opencastproject.util.NotFoundException- Thrown if unable to find a catalog that matches the flavor.org.opencastproject.security.api.UnauthorizedException- Thrown if the action is unauthorized.
-
removeCatalogByFlavor
public void removeCatalogByFlavor(org.opencastproject.elasticsearch.index.objects.series.Series series, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor) throws org.opencastproject.util.NotFoundException, IndexServiceException Description copied from interface:IndexServiceRemove a catalog from the series that matches the given flavor.- Specified by:
removeCatalogByFlavorin interfaceIndexService- Parameters:
series- The series to remove the catalog from.flavor- The flavor that will match the catalog.- Throws:
org.opencastproject.util.NotFoundException- Thrown if the catalog cannot be found.IndexServiceException- Thrown if there was an error reading the given event.
-
updateEventMetadata
public org.opencastproject.metadata.dublincore.MetadataList updateEventMetadata(String id, org.opencastproject.metadata.dublincore.MetadataList metadataList, org.opencastproject.elasticsearch.index.ElasticsearchIndex index) throws IndexServiceException, org.opencastproject.elasticsearch.api.SearchIndexException, org.opencastproject.util.NotFoundException, org.opencastproject.security.api.UnauthorizedException Description copied from interface:IndexServiceUpdate an event's metadata using aMetadataList- Specified by:
updateEventMetadatain interfaceIndexService- Parameters:
id- The id of the event.metadataList- TheMetadataListwith the new metadata.index- The index used to process this update.- Returns:
- The
MetadataListwith the updated fields. - Throws:
IndexServiceException- Thrown if unable to update the event with the index.org.opencastproject.elasticsearch.api.SearchIndexException- Thrown if there was a problem getting the event.org.opencastproject.util.NotFoundException- Thrown if unable to find the event.org.opencastproject.security.api.UnauthorizedException- Thrown if the current user is unable to edit the event.
-
getTechnicalPresenters
protected org.opencastproject.util.data.Tuple<List<String>,Set<String>> getTechnicalPresenters(org.opencastproject.metadata.dublincore.DublinCoreMetadataCollection eventMetadata) Processes the combined usernames and free text entries of the presenters (creator) field into a list of presenters using the full names of the users if available and adds the usernames to a set of technical presenters.- Parameters:
eventMetadata- The metadata list that has the presenter (creator) field to pull the list of presenters from.- Returns:
- A
Tuplewith a list of friendly presenter names and a set of user names if available for the presenters.
-
updateEventAcl
public org.opencastproject.security.api.AccessControlList updateEventAcl(String id, org.opencastproject.security.api.AccessControlList acl, org.opencastproject.elasticsearch.index.ElasticsearchIndex index) throws IllegalArgumentException, IndexServiceException, org.opencastproject.elasticsearch.api.SearchIndexException, org.opencastproject.util.NotFoundException, org.opencastproject.security.api.UnauthorizedException Description copied from interface:IndexServiceUpdate the event'sAccessControlList.- Specified by:
updateEventAclin interfaceIndexService- Parameters:
id- The id of the event to update.acl- TheAccessControlListthat this event will get updated with.index- The index to update the event in.- Returns:
- The updated
AccessControlList. - Throws:
IllegalArgumentException- Thrown if the event is currently processing as a workflow so unable to update the ACL as we may have already distributed it.IndexServiceException- Thrown if there was a problem updating the ACL for an event.org.opencastproject.elasticsearch.api.SearchIndexException- Thrown if there was an error searching the search index.org.opencastproject.util.NotFoundException- Thrown if the event cannot be found to update.org.opencastproject.security.api.UnauthorizedException- Thrown if the action is unauthorized.
-
getEventWorkflowProperties
- Specified by:
getEventWorkflowPropertiesin interfaceIndexService
-
getEvent
public com.entwinemedia.fn.data.Opt<org.opencastproject.elasticsearch.index.objects.event.Event> getEvent(String id, org.opencastproject.elasticsearch.index.ElasticsearchIndex index) throws org.opencastproject.elasticsearch.api.SearchIndexException Description copied from interface:IndexServiceGet a single event- Specified by:
getEventin interfaceIndexService- Parameters:
id- the mediapackage idindex- The index to get the event from.- Returns:
- an event or none if not found wrapped in an option
- Throws:
org.opencastproject.elasticsearch.api.SearchIndexException- Thrown if the index cannot be read
-
removeEvent
public IndexService.EventRemovalResult removeEvent(org.opencastproject.elasticsearch.index.objects.event.Event event, String retractWorkflowId) throws org.opencastproject.security.api.UnauthorizedException, org.opencastproject.workflow.api.WorkflowDatabaseException, org.opencastproject.util.NotFoundException Description copied from interface:IndexServiceRemoves an event and retracts it if necessary.- Specified by:
removeEventin interfaceIndexService- Parameters:
event- The event to remove.retractWorkflowId- The id of the workflow to use to retract the event if necessary.- Returns:
- A result which tells if the event was removed, removal failed, or the event is being retracted and will be removed later.
- Throws:
org.opencastproject.security.api.UnauthorizedException- Thrown if the action is unauthorizedorg.opencastproject.workflow.api.WorkflowDatabaseException- Thrown if the workflow database is not reachable. This may be a temporary problem.org.opencastproject.util.NotFoundException- If the configured retract workflow cannot be found. This is most likely a configuration issue.
-
removeEvent
public boolean removeEvent(String id) throws org.opencastproject.util.NotFoundException, org.opencastproject.security.api.UnauthorizedException Description copied from interface:IndexServiceRemoves an event.- Specified by:
removeEventin interfaceIndexService- Parameters:
id- The id for the event to remove.- Returns:
- true if the event was found and removed.
- Throws:
org.opencastproject.util.NotFoundException- Thrown if the group was not foundorg.opencastproject.security.api.UnauthorizedException- Thrown if the action is unauthorized
-
getEventMediapackage
public org.opencastproject.mediapackage.MediaPackage getEventMediapackage(org.opencastproject.elasticsearch.index.objects.event.Event event) throws IndexServiceException - Specified by:
getEventMediapackagein interfaceIndexService- Throws:
IndexServiceException
-
getEventSource
public IndexService.Source getEventSource(org.opencastproject.elasticsearch.index.objects.event.Event event) Determines in a very basic way what kind of source the event is- Specified by:
getEventSourcein interfaceIndexService- Parameters:
event- the event- Returns:
- the source type
-
createSeries
public String createSeries(org.opencastproject.metadata.dublincore.MetadataList metadataList, Map<String, String> options, com.entwinemedia.fn.data.Opt<org.opencastproject.security.api.AccessControlList> optAcl, com.entwinemedia.fn.data.Opt<Long> optThemeId) throws IndexServiceExceptionDescription copied from interface:IndexServiceCreate a series from a set of metadata and options.- Specified by:
createSeriesin interfaceIndexService- Parameters:
metadataList- The metadata for the seriesoptions- Options for the seriesoptAcl- ACLs for the seriesoptThemeId- Themes for the series- Returns:
- The series id.
- Throws:
IndexServiceException- Thrown if there are issues with processing the request.
-
createSeries
public String createSeries(org.json.simple.JSONObject metadata) throws IllegalArgumentException, IndexServiceException, org.opencastproject.security.api.UnauthorizedException Description copied from interface:IndexServiceCreate a new series.- Specified by:
createSeriesin interfaceIndexService- Parameters:
metadata- The json metadata to create the new series.- Returns:
- The series id.
- Throws:
IllegalArgumentException- Thrown if the metadata is incomplete or malformed.IndexServiceException- Thrown if there are issues with processing the request.org.opencastproject.security.api.UnauthorizedException- Thrown if the user cannot create a new series.
-
removeSeries
public void removeSeries(String id) throws org.opencastproject.util.NotFoundException, org.opencastproject.series.api.SeriesException, org.opencastproject.security.api.UnauthorizedException Description copied from interface:IndexServiceRemove a series.- Specified by:
removeSeriesin interfaceIndexService- Parameters:
id- The id of the series to remove.- Throws:
org.opencastproject.util.NotFoundException- Thrown if the series is not foundorg.opencastproject.series.api.SeriesException- Thrown if an error removing the seriesorg.opencastproject.security.api.UnauthorizedException- Thrown if the activity is unauthorized
-
updateAllSeriesMetadata
public org.opencastproject.metadata.dublincore.MetadataList updateAllSeriesMetadata(String id, String metadataJSON, org.opencastproject.elasticsearch.index.ElasticsearchIndex index) throws IllegalArgumentException, IndexServiceException, org.opencastproject.util.NotFoundException Description copied from interface:IndexServiceUpdate the series metadata in all available catalogs.- Specified by:
updateAllSeriesMetadatain interfaceIndexService- Parameters:
id- The id of the series to update.metadataJSON- The metadata to update in json format.index- The index to update the series in.- Returns:
- A metadata list of the updated fields.
- Throws:
IllegalArgumentException- Thrown if the metadata was not formatted correctly.IndexServiceException- Thrown if there was an error updating the event.org.opencastproject.util.NotFoundException- Thrown if theEventcould not be found.
-
updateAllSeriesMetadata
public org.opencastproject.metadata.dublincore.MetadataList updateAllSeriesMetadata(String id, org.opencastproject.metadata.dublincore.MetadataList metadataList, org.opencastproject.elasticsearch.index.ElasticsearchIndex index) throws IndexServiceException, org.opencastproject.util.NotFoundException Description copied from interface:IndexServiceUpdate the series metadata in all available catalogs by providing a completeMetadataList- Specified by:
updateAllSeriesMetadatain interfaceIndexService- Parameters:
id- The id of the seriesmetadataList- The completeMetadataListindex- The index that will be used to find the series.- Returns:
- The updated
MetadataList - Throws:
IndexServiceException- Thrown if unable to query the index for the series.org.opencastproject.util.NotFoundException- Thrown if unable to find the series to update the metadata for.
-
updateCommentCatalog
public void updateCommentCatalog(org.opencastproject.elasticsearch.index.objects.event.Event event, List<org.opencastproject.event.comment.EventComment> comments) throws Exception - Specified by:
updateCommentCatalogin interfaceIndexService- Throws:
Exception
-
getMetadataListWithAllSeriesCatalogUIAdapters
public org.opencastproject.metadata.dublincore.MetadataList getMetadataListWithAllSeriesCatalogUIAdapters()- Specified by:
getMetadataListWithAllSeriesCatalogUIAdaptersin interfaceIndexService- Returns:
- A
MetadataListwith all of the available CatalogUIAdapters emptyDublinCoreMetadataCollectionavailable
-
getMetadataListWithAllEventCatalogUIAdapters
public org.opencastproject.metadata.dublincore.MetadataList getMetadataListWithAllEventCatalogUIAdapters()- Specified by:
getMetadataListWithAllEventCatalogUIAdaptersin interfaceIndexService
-
isWorkflowActive
-