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
  • Constructor Details

    • CaptureNowProlongingService

      public CaptureNowProlongingService()
  • Method Details

    • setSchedulerService

      public void setSchedulerService(SchedulerService schedulerService)
      Sets the scheduler service
    • setSecurityService

      public void setSecurityService(SecurityService securityService)
      Sets the security service
    • setServiceRegistry

      public void setServiceRegistry(ServiceRegistry serviceRegistry)
      Sets the service registry
    • setOrgDirectoryService

      public void setOrgDirectoryService(OrganizationDirectoryService orgDirectoryService)
      Sets the organization directory service
    • setWorkspace

      public void setWorkspace(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 SecurityService getSecurityService()
    • getComponentContext

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

      public ServiceRegistry getServiceRegistry()
    • getOrgDirectoryService

      public OrganizationDirectoryService getOrgDirectoryService()
    • getWorkspace

      public Workspace getWorkspace()
    • getCurrentRecording

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

      Extends the current recording.
      Parameters:
      event - the recording's media package
      dublinCore - the recording's dublin core catalog
      agentId - the agent
      Throws:
      UnauthorizedException - if the event cannot be updated due to a lack of access rights
      NotFoundException - if the event cannot be found
      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