Class AdopterRegistrationServiceImpl

java.lang.Object
java.util.TimerTask
org.opencastproject.adopter.registration.AdopterRegistrationServiceImpl
All Implemented Interfaces:
Runnable

public class AdopterRegistrationServiceImpl extends TimerTask
It collects and sends statistic data of an registered adopter.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.opencastproject.db.DBSession
     
    protected org.opencastproject.db.DBSessionFactory
     
    protected javax.persistence.EntityManagerFactory
    The factory for creating the entity manager.
    protected org.opencastproject.security.api.SecurityService
    The security service
    protected org.opencastproject.userdirectory.JpaUserAndRoleProvider
     
    protected org.opencastproject.security.api.UserProvider
    User and role provider
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    activate(org.osgi.framework.BundleContext ctx)
    Entry point of the scheduler.
    void
     
    void
     
    get()
     
     
    void
     
    void
    run()
    The scheduled method.
    void
    save(Adopter adopter)
    Saves the submitted registration form.
    void
    setAssetManager(org.opencastproject.assetmanager.api.AssetManager assetManager)
    OSGi setter for the asset manager.
    void
    setCaptureAdminService(org.opencastproject.capture.admin.api.CaptureAgentStateService stateService)
     
    void
    setDBSessionFactory(org.opencastproject.db.DBSessionFactory dbSessionFactory)
     
    void
    setEntityManagerFactory(javax.persistence.EntityManagerFactory emf)
    OSGi setter for the entity manager factory.
    void
    setOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService orgDirServ)
    OSGi callback for setting the org directory service.
    void
    setSearchService(org.opencastproject.search.api.SearchService searchService)
     
    void
    setSecurityService(org.opencastproject.security.api.SecurityService securityService)
    OSGi callback for setting the security service.
    void
    setSeriesService(org.opencastproject.series.api.SeriesService seriesService)
    OSGi setter for the series service.
    void
    setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
    OSGi setter for the service registry.
    void
    setUserAndRoleProvider(org.opencastproject.userdirectory.JpaUserAndRoleProvider userProvider)
     
    void
    setUserRefProvider(org.opencastproject.userdirectory.JpaUserReferenceProvider userRefProvider)
    OSGi setter for the userref provider.

    Methods inherited from class java.util.TimerTask

    cancel, scheduledExecutionTime

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • userRefProvider

      protected org.opencastproject.security.api.UserProvider userRefProvider
      User and role provider
    • userProvider

      protected org.opencastproject.userdirectory.JpaUserAndRoleProvider userProvider
    • securityService

      protected org.opencastproject.security.api.SecurityService securityService
      The security service
    • emf

      protected javax.persistence.EntityManagerFactory emf
      The 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

      public void save(Adopter adopter) throws AdopterRegistrationException
      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.
      Specified by:
      run in interface Runnable
      Specified by:
      run in class TimerTask
    • getStatsDataAsString

      public String getStatsDataAsString() throws Exception
      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.