Class CaptureNowProlongingService

java.lang.Object
org.opencastproject.scheduler.impl.CaptureNowProlongingService
All Implemented Interfaces:
org.osgi.service.cm.ManagedService

public class CaptureNowProlongingService extends Object implements org.osgi.service.cm.ManagedService
Prolong immediate recordings before reaching the end, as long as there are no conflicts
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Quartz work horse.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    activate(org.osgi.service.component.ComponentContext cc)
    Activates the component
    void
    deactivate(org.osgi.service.component.ComponentContext cc)
    Deactivates the component
    protected void
     
    org.osgi.service.component.ComponentContext
     
    org.opencastproject.mediapackage.MediaPackage
    Returns the current event for the given capture agent.
    int
    Returns the initial time duration (in milliseconds) of a recording started by the CaptureNow service
    org.opencastproject.security.api.OrganizationDirectoryService
     
    int
    Returns the time duration (in milliseconds) a recording is prolonged by the prolonging job.
    org.opencastproject.security.api.SecurityService
     
    org.opencastproject.serviceregistry.api.ServiceRegistry
     
    org.opencastproject.workspace.api.Workspace
     
    void
    prolongEvent(org.opencastproject.mediapackage.MediaPackage event, org.opencastproject.metadata.dublincore.DublinCoreCatalog dublinCore, String agentId)
    Extends the current recording.
    void
    schedule(String agentId)
    Set the schedule and start or restart the scheduler.
    void
    setOrgDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService orgDirectoryService)
    Sets the organization directory service
    void
    setSchedulerService(org.opencastproject.scheduler.api.SchedulerService schedulerService)
    Sets the scheduler service
    void
    setSecurityService(org.opencastproject.security.api.SecurityService securityService)
    Sets the security service
    void
    setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
    Sets the service registry
    void
    setWorkspace(org.opencastproject.workspace.api.Workspace workspace)
    Sets the workspace
    void
    Shutdown the scheduler.
    void
    stop(String agentId)
     
    void
    updated(Dictionary<String,?> properties)
     

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CaptureNowProlongingService

      public CaptureNowProlongingService()
  • Method Details

    • setSchedulerService

      public void setSchedulerService(org.opencastproject.scheduler.api.SchedulerService schedulerService)
      Sets the scheduler service
    • setSecurityService

      public void setSecurityService(org.opencastproject.security.api.SecurityService securityService)
      Sets the security service
    • setServiceRegistry

      public void setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
      Sets the service registry
    • setOrgDirectoryService

      public void setOrgDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService orgDirectoryService)
      Sets the organization directory service
    • setWorkspace

      public void setWorkspace(org.opencastproject.workspace.api.Workspace workspace)
      Sets the workspace
    • activate

      public void activate(org.osgi.service.component.ComponentContext cc)
      Activates the component
      Parameters:
      cc - the component's context
    • deactivate

      public void deactivate(org.osgi.service.component.ComponentContext cc)
      Deactivates the component
    • updated

      public void updated(Dictionary<String,?> properties) throws org.osgi.service.cm.ConfigurationException
      Specified by:
      updated in interface org.osgi.service.cm.ManagedService
      Throws:
      org.osgi.service.cm.ConfigurationException
    • schedule

      public void schedule(String agentId) throws org.quartz.SchedulerException
      Set the schedule and start or restart the scheduler.
      Throws:
      org.quartz.SchedulerException
    • stop

      public void stop(String agentId)
    • shutdown

      public void shutdown()
      Shutdown the scheduler.
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • getInitialTime

      public int getInitialTime()
      Returns the initial time duration (in milliseconds) of a recording started by the CaptureNow service
      Returns:
      the initial time
    • getProlongingTime

      public int getProlongingTime()
      Returns the time duration (in milliseconds) a recording is prolonged by the prolonging job.
      Returns:
      the prolonging time
    • getSecurityService

      public org.opencastproject.security.api.SecurityService getSecurityService()
    • getComponentContext

      public org.osgi.service.component.ComponentContext getComponentContext()
    • getServiceRegistry

      public org.opencastproject.serviceregistry.api.ServiceRegistry getServiceRegistry()
    • getOrgDirectoryService

      public org.opencastproject.security.api.OrganizationDirectoryService getOrgDirectoryService()
    • getWorkspace

      public org.opencastproject.workspace.api.Workspace getWorkspace()
    • getCurrentRecording

      public org.opencastproject.mediapackage.MediaPackage getCurrentRecording(String agentId) throws org.opencastproject.util.NotFoundException, org.opencastproject.security.api.UnauthorizedException, org.opencastproject.scheduler.api.SchedulerException
      Returns the current event for the given capture agent.
      Parameters:
      agentId - the capture agent
      Returns:
      the recording
      Throws:
      org.opencastproject.util.NotFoundException - if the there is no current recording
      org.opencastproject.security.api.UnauthorizedException - if the event cannot be read due to a lack of access rights
      org.opencastproject.scheduler.api.SchedulerException - if accessing the scheduling database fails
    • prolongEvent

      public void prolongEvent(org.opencastproject.mediapackage.MediaPackage event, org.opencastproject.metadata.dublincore.DublinCoreCatalog dublinCore, String agentId) throws org.opencastproject.security.api.UnauthorizedException, org.opencastproject.util.NotFoundException, org.opencastproject.scheduler.api.SchedulerException, IllegalArgumentException, IOException
      Extends the current recording.
      Parameters:
      event - the recording's media package
      dublinCore - the recording's dublin core catalog
      agentId - the agent
      Throws:
      org.opencastproject.security.api.UnauthorizedException - if the event cannot be updated due to a lack of access rights
      org.opencastproject.util.NotFoundException - if the event cannot be found
      org.opencastproject.scheduler.api.SchedulerException - if updating the scheduling data fails
      IOException - if updating the calendar to the worksapce fails
      IllegalArgumentException - if a URI cannot be created using the arguments provided