Class AdopterRegistrationServiceImpl
java.lang.Object
java.util.TimerTask
org.opencastproject.adopter.registration.AdopterRegistrationServiceImpl
- All Implemented Interfaces:
Runnable
It collects and sends statistic data of an registered adopter.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.opencastproject.db.DBSessionprotected org.opencastproject.db.DBSessionFactoryprotected javax.persistence.EntityManagerFactoryThe factory for creating the entity manager.protected org.opencastproject.security.api.SecurityServiceThe security serviceprotected org.opencastproject.userdirectory.JpaUserAndRoleProviderprotected org.opencastproject.security.api.UserProviderUser and role provider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.framework.BundleContext ctx) Entry point of the scheduler.voidvoiddelete()get()voidvoidrun()The scheduled method.voidSaves the submitted registration form.voidsetAssetManager(org.opencastproject.assetmanager.api.AssetManager assetManager) OSGi setter for the asset manager.voidsetCaptureAdminService(org.opencastproject.capture.admin.api.CaptureAgentStateService stateService) voidsetDBSessionFactory(org.opencastproject.db.DBSessionFactory dbSessionFactory) voidsetEntityManagerFactory(javax.persistence.EntityManagerFactory emf) OSGi setter for the entity manager factory.voidsetOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService orgDirServ) OSGi callback for setting the org directory service.voidsetSearchService(org.opencastproject.search.api.SearchService searchService) voidsetSecurityService(org.opencastproject.security.api.SecurityService securityService) OSGi callback for setting the security service.voidsetSeriesService(org.opencastproject.series.api.SeriesService seriesService) OSGi setter for the series service.voidsetServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry) OSGi setter for the service registry.voidsetUserAndRoleProvider(org.opencastproject.userdirectory.JpaUserAndRoleProvider userProvider) voidsetUserRefProvider(org.opencastproject.userdirectory.JpaUserReferenceProvider userRefProvider) OSGi setter for the userref provider.Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
Field Details
-
userRefProvider
protected org.opencastproject.security.api.UserProvider userRefProviderUser and role provider -
userProvider
protected org.opencastproject.userdirectory.JpaUserAndRoleProvider userProvider -
securityService
protected org.opencastproject.security.api.SecurityService securityServiceThe security service -
emf
protected javax.persistence.EntityManagerFactory emfThe factory for creating the entity manager. -
dbSessionFactory
protected org.opencastproject.db.DBSessionFactory dbSessionFactory -
db
protected org.opencastproject.db.DBSession db
-
-
Constructor Details
-
AdopterRegistrationServiceImpl
public AdopterRegistrationServiceImpl()
-
-
Method Details
-
setEntityManagerFactory
public void setEntityManagerFactory(javax.persistence.EntityManagerFactory emf) OSGi setter for the entity manager factory. -
setDBSessionFactory
public void setDBSessionFactory(org.opencastproject.db.DBSessionFactory dbSessionFactory) -
activate
public void activate(org.osgi.framework.BundleContext ctx) Entry point of the scheduler. Configured with the activate parameter at OSGi component declaration.- Parameters:
ctx- OSGi component context
-
deactivate
public void deactivate() -
save
Saves the submitted registration form.- Parameters:
adopter- The adopter registration form.- Throws:
AdopterRegistrationException
-
markForDeletion
public void markForDeletion() -
delete
public void delete() -
get
- Throws:
AdopterRegistrationException
-
run
public void run()The scheduled method. It collects statistic data around Opencast and sends it via POST request. -
getRegistrationDataAsString
- Throws:
Exception
-
setServiceRegistry
public void setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry) OSGi setter for the service registry. -
setCaptureAdminService
public void setCaptureAdminService(org.opencastproject.capture.admin.api.CaptureAgentStateService stateService) -
setAssetManager
public void setAssetManager(org.opencastproject.assetmanager.api.AssetManager assetManager) OSGi setter for the asset manager. -
setSeriesService
public void setSeriesService(org.opencastproject.series.api.SeriesService seriesService) OSGi setter for the series service. -
setSearchService
public void setSearchService(org.opencastproject.search.api.SearchService searchService) -
setUserRefProvider
public void setUserRefProvider(org.opencastproject.userdirectory.JpaUserReferenceProvider userRefProvider) OSGi setter for the userref provider. -
setUserAndRoleProvider
public void setUserAndRoleProvider(org.opencastproject.userdirectory.JpaUserAndRoleProvider userProvider) -
setSecurityService
public void setSecurityService(org.opencastproject.security.api.SecurityService securityService) OSGi callback for setting the security service. -
setOrganizationDirectoryService
public void setOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService orgDirServ) OSGi callback for setting the org directory service.
-