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 DBSessionprotected DBSessionFactoryprotected javax.persistence.EntityManagerFactoryThe factory for creating the entity manager.protected SecurityServiceThe security serviceprotected JpaUserAndRoleProviderprotected 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(AssetManager assetManager) OSGi setter for the asset manager.voidsetCaptureAdminService(CaptureAgentStateService stateService) voidsetDBSessionFactory(DBSessionFactory dbSessionFactory) voidsetEntityManagerFactory(javax.persistence.EntityManagerFactory emf) OSGi setter for the entity manager factory.voidOSGi callback for setting the org directory service.voidsetSearchService(SearchService searchService) voidsetSecurityService(SecurityService securityService) OSGi callback for setting the security service.voidsetSeriesService(SeriesService seriesService) OSGi setter for the series service.voidsetServiceRegistry(ServiceRegistry serviceRegistry) OSGi setter for the service registry.voidsetUserAndRoleProvider(JpaUserAndRoleProvider userProvider) voidsetUserRefProvider(JpaUserReferenceProvider userRefProvider) OSGi setter for the userref provider.Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
Field Details
-
userRefProvider
User and role provider -
userProvider
-
securityService
The security service -
emf
protected javax.persistence.EntityManagerFactory emfThe factory for creating the entity manager. -
dbSessionFactory
-
db
-
-
Constructor Details
-
AdopterRegistrationServiceImpl
public AdopterRegistrationServiceImpl()
-
-
Method Details
-
setEntityManagerFactory
public void setEntityManagerFactory(javax.persistence.EntityManagerFactory emf) OSGi setter for the entity manager factory. -
setDBSessionFactory
-
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
OSGi setter for the service registry. -
setCaptureAdminService
-
setAssetManager
OSGi setter for the asset manager. -
setSeriesService
OSGi setter for the series service. -
setSearchService
-
setUserRefProvider
OSGi setter for the userref provider. -
setUserAndRoleProvider
-
setSecurityService
OSGi callback for setting the security service. -
setOrganizationDirectoryService
OSGi callback for setting the org directory service.
-