Package org.opencastproject.search.impl
Class SearchServiceImpl
java.lang.Object
org.opencastproject.job.api.AbstractJobProducer
org.opencastproject.search.impl.SearchServiceImpl
- All Implemented Interfaces:
org.opencastproject.job.api.JobProducer,org.opencastproject.search.api.SearchService,org.opencastproject.security.api.StaticFileAuthorization
public final class SearchServiceImpl
extends org.opencastproject.job.api.AbstractJobProducer
implements org.opencastproject.search.api.SearchService, org.opencastproject.security.api.StaticFileAuthorization
An Opensearch-based
SearchService implementation.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opencastproject.search.api.SearchService
org.opencastproject.search.api.SearchService.IndexEntryType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe key to look for in the service configuration file to override theDEFAULT_ADD_JOB_LOADstatic final floatThe load introduced on the system by creating an add jobstatic final floatThe load introduced on the system by creating a delete jobstatic final StringThe key to look for in the service configuration file to override theDEFAULT_DELETE_JOB_LOADstatic final StringThe job typeprotected org.opencastproject.security.api.OrganizationDirectoryServiceThe organization directory serviceprotected org.opencastproject.security.api.UserDirectoryServiceThe user directory serviceFields inherited from class org.opencastproject.job.api.AbstractJobProducer
ACCEPT_JOB_LOADS_EXCEEDING_PROPERTY, acceptJobLoadsExeedingMaxLoad, DEFAULT_ACCEPT_JOB_LOADS_EXCEEDING, executor, jobType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) Service activator, called via declarative services configuration.org.opencastproject.job.api.Jobadd(org.opencastproject.mediapackage.MediaPackage mediaPackage) voidaddSynchronously(org.opencastproject.mediapackage.MediaPackage mediaPackage) org.opencastproject.job.api.Joborg.opencastproject.job.api.JobdeleteSeries(String seriesId) booleandeleteSynchronously(String mediaPackageId) org.opencastproject.mediapackage.MediaPackageprotected org.opencastproject.security.api.OrganizationDirectoryServiceprotected org.opencastproject.security.api.SecurityServiceCollection<org.apache.commons.lang3.tuple.Pair<org.opencastproject.security.api.Organization, org.opencastproject.mediapackage.MediaPackage>> protected org.opencastproject.serviceregistry.api.ServiceRegistryprotected org.opencastproject.security.api.UserDirectoryServicevoidprotected Stringprocess(org.opencastproject.job.api.Job job) org.opencastproject.search.api.SearchResultListsearch(org.elasticsearch.search.builder.SearchSourceBuilder searchSource) voidsetOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService organizationDirectory) Sets a reference to the organization directory service.voidsetPersistence(SearchServiceDatabase persistence) voidvoidsetSecurityService(org.opencastproject.security.api.SecurityService securityService) Callback for setting the security service.voidsetServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry) voidsetUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService) Callback for setting the user directory service.booleanverifyUrlAccess(String path) Methods inherited from class org.opencastproject.job.api.AbstractJobProducer
acceptJob, countJobs, finallyUpdateJob, getJobType, incident, isReadyToAccept, isReadyToAcceptJobs
-
Field Details
-
JOB_TYPE
The job type- See Also:
-
DEFAULT_ADD_JOB_LOAD
public static final float DEFAULT_ADD_JOB_LOADThe load introduced on the system by creating an add job- See Also:
-
DEFAULT_DELETE_JOB_LOAD
public static final float DEFAULT_DELETE_JOB_LOADThe load introduced on the system by creating a delete job- See Also:
-
ADD_JOB_LOAD_KEY
The key to look for in the service configuration file to override theDEFAULT_ADD_JOB_LOAD- See Also:
-
DELETE_JOB_LOAD_KEY
The key to look for in the service configuration file to override theDEFAULT_DELETE_JOB_LOAD- See Also:
-
userDirectoryService
protected org.opencastproject.security.api.UserDirectoryService userDirectoryServiceThe user directory service -
organizationDirectory
protected org.opencastproject.security.api.OrganizationDirectoryService organizationDirectoryThe organization directory service
-
-
Constructor Details
-
SearchServiceImpl
public SearchServiceImpl()Creates a new instance of the search service.
-
-
Method Details
-
activate
Service activator, called via declarative services configuration.- Overrides:
activatein classorg.opencastproject.job.api.AbstractJobProducer- Parameters:
cc- the component context- Throws:
IllegalStateException
-
add
public org.opencastproject.job.api.Job add(org.opencastproject.mediapackage.MediaPackage mediaPackage) throws org.opencastproject.search.api.SearchException, IllegalArgumentException - Specified by:
addin interfaceorg.opencastproject.search.api.SearchService- Throws:
org.opencastproject.search.api.SearchExceptionIllegalArgumentException- See Also:
-
addSynchronously
public void addSynchronously(org.opencastproject.mediapackage.MediaPackage mediaPackage) throws org.opencastproject.search.api.SearchException, IllegalArgumentException, org.opencastproject.security.api.UnauthorizedException - Specified by:
addSynchronouslyin interfaceorg.opencastproject.search.api.SearchService- Throws:
org.opencastproject.search.api.SearchExceptionIllegalArgumentExceptionorg.opencastproject.security.api.UnauthorizedException
-
getSeries
public Collection<org.apache.commons.lang3.tuple.Pair<org.opencastproject.security.api.Organization,org.opencastproject.mediapackage.MediaPackage>> getSeries(String seriesId) - Specified by:
getSeriesin interfaceorg.opencastproject.search.api.SearchService
-
delete
public org.opencastproject.job.api.Job delete(String mediaPackageId) throws org.opencastproject.search.api.SearchException - Specified by:
deletein interfaceorg.opencastproject.search.api.SearchService- Throws:
org.opencastproject.search.api.SearchException- See Also:
-
deleteSynchronously
public boolean deleteSynchronously(String mediaPackageId) throws org.opencastproject.search.api.SearchException - Specified by:
deleteSynchronouslyin interfaceorg.opencastproject.search.api.SearchService- Throws:
org.opencastproject.search.api.SearchException
-
deleteSeries
public org.opencastproject.job.api.Job deleteSeries(String seriesId) throws org.opencastproject.search.api.SearchException - Specified by:
deleteSeriesin interfaceorg.opencastproject.search.api.SearchService- Throws:
org.opencastproject.search.api.SearchException- See Also:
-
get
public org.opencastproject.mediapackage.MediaPackage get(String mediaPackageId) throws org.opencastproject.util.NotFoundException, org.opencastproject.security.api.UnauthorizedException - Specified by:
getin interfaceorg.opencastproject.search.api.SearchService- Throws:
org.opencastproject.util.NotFoundExceptionorg.opencastproject.security.api.UnauthorizedException
-
search
public org.opencastproject.search.api.SearchResultList search(org.elasticsearch.search.builder.SearchSourceBuilder searchSource) throws org.opencastproject.search.api.SearchException - Specified by:
searchin interfaceorg.opencastproject.search.api.SearchService- Throws:
org.opencastproject.search.api.SearchException
-
process
- Specified by:
processin classorg.opencastproject.job.api.AbstractJobProducer- Throws:
Exception- See Also:
-
setSearchIndex
-
setPersistence
-
setServiceRegistry
public void setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry) -
setSecurityService
public void setSecurityService(org.opencastproject.security.api.SecurityService securityService) Callback for setting the security service.- Parameters:
securityService- the securityService to set
-
setUserDirectoryService
public void setUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService) Callback for setting the user directory service.- Parameters:
userDirectoryService- the userDirectoryService to set
-
setOrganizationDirectoryService
public void setOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService organizationDirectory) Sets a reference to the organization directory service.- Parameters:
organizationDirectory- the organization directory
-
getOrganizationDirectoryService
protected org.opencastproject.security.api.OrganizationDirectoryService getOrganizationDirectoryService()- Specified by:
getOrganizationDirectoryServicein classorg.opencastproject.job.api.AbstractJobProducer- See Also:
-
getSecurityService
protected org.opencastproject.security.api.SecurityService getSecurityService()- Specified by:
getSecurityServicein classorg.opencastproject.job.api.AbstractJobProducer- See Also:
-
getServiceRegistry
protected org.opencastproject.serviceregistry.api.ServiceRegistry getServiceRegistry()- Specified by:
getServiceRegistryin classorg.opencastproject.job.api.AbstractJobProducer- See Also:
-
getUserDirectoryService
protected org.opencastproject.security.api.UserDirectoryService getUserDirectoryService()- Specified by:
getUserDirectoryServicein classorg.opencastproject.job.api.AbstractJobProducer- See Also:
-
modified
-
getProtectedUrlPattern
- Specified by:
getProtectedUrlPatternin interfaceorg.opencastproject.security.api.StaticFileAuthorization
-
verifyUrlAccess
- Specified by:
verifyUrlAccessin interfaceorg.opencastproject.security.api.StaticFileAuthorization
-