Class YouTubeV3PublicationServiceImpl

java.lang.Object
org.opencastproject.job.api.AbstractJobProducer
org.opencastproject.publication.youtube.YouTubeV3PublicationServiceImpl
All Implemented Interfaces:
org.opencastproject.job.api.JobProducer, org.opencastproject.publication.api.YouTubePublicationService, org.osgi.service.cm.ManagedService

public class YouTubeV3PublicationServiceImpl extends org.opencastproject.job.api.AbstractJobProducer implements org.opencastproject.publication.api.YouTubePublicationService, org.osgi.service.cm.ManagedService
Publishes media to a YouTube play list.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final float
    The load on the system introduced by creating a publish job
    static final float
    The load on the system introduced by creating a retract job
    protected org.opencastproject.serviceregistry.api.ServiceRegistry
    The remote service registry
    protected org.opencastproject.workspace.api.Workspace
    workspace instance
    static final String
     
    static final String
    The key to look for in the service configuration file to override the DEFAULT_YOUTUBE_PUBLISH_JOB_LOAD
    static final String
    The key to look for in the service configuration file to override the DEFAULT_YOUTUBE_RETRACT_JOB_LOAD

    Fields inherited from class org.opencastproject.job.api.AbstractJobProducer

    ACCEPT_JOB_LOADS_EXCEEDING_PROPERTY, acceptJobLoadsExeedingMaxLoad, DEFAULT_ACCEPT_JOB_LOADS_EXCEEDING, executor, jobType

    Fields inherited from interface org.opencastproject.publication.api.YouTubePublicationService

    JOB_TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance of the youtube publication service.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    activate(org.osgi.service.component.ComponentContext cc)
    Called when service activates.
    protected org.opencastproject.security.api.OrganizationDirectoryService
    protected org.opencastproject.security.api.SecurityService
    protected org.opencastproject.serviceregistry.api.ServiceRegistry
    protected org.opencastproject.security.api.UserDirectoryService
    protected String
    process(org.opencastproject.job.api.Job job)
    org.opencastproject.job.api.Job
    publish(org.opencastproject.mediapackage.MediaPackage mediaPackage, org.opencastproject.mediapackage.Track track)
     
    org.opencastproject.job.api.Job
    retract(org.opencastproject.mediapackage.MediaPackage mediaPackage)
     
    void
    setOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService organizationDirectory)
    Sets a reference to the organization directory service.
    void
    setSecurityService(org.opencastproject.security.api.SecurityService securityService)
    Callback for setting the security service.
    protected void
    setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
    Callback for the OSGi environment to set the service registry reference.
    void
    setUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService)
    Callback for setting the user directory service.
    protected void
    setWorkspace(org.opencastproject.workspace.api.Workspace workspace)
    Callback for the OSGi environment to set the workspace reference.
    void
     

    Methods inherited from class org.opencastproject.job.api.AbstractJobProducer

    acceptJob, countJobs, finallyUpdateJob, getJobType, incident, isReadyToAccept, isReadyToAcceptJobs

    Methods inherited from class java.lang.Object

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

    • DEFAULT_YOUTUBE_PUBLISH_JOB_LOAD

      public static final float DEFAULT_YOUTUBE_PUBLISH_JOB_LOAD
      The load on the system introduced by creating a publish job
      See Also:
    • DEFAULT_YOUTUBE_RETRACT_JOB_LOAD

      public static final float DEFAULT_YOUTUBE_RETRACT_JOB_LOAD
      The load on the system introduced by creating a retract job
      See Also:
    • YOUTUBE_PUBLISH_LOAD_KEY

      public static final String YOUTUBE_PUBLISH_LOAD_KEY
      The key to look for in the service configuration file to override the DEFAULT_YOUTUBE_PUBLISH_JOB_LOAD
      See Also:
    • YOUTUBE_RETRACT_LOAD_KEY

      public static final String YOUTUBE_RETRACT_LOAD_KEY
      The key to look for in the service configuration file to override the DEFAULT_YOUTUBE_RETRACT_JOB_LOAD
      See Also:
    • YOUTUBE_ENABLED_KEY

      public static final String YOUTUBE_ENABLED_KEY
      See Also:
    • workspace

      protected org.opencastproject.workspace.api.Workspace workspace
      workspace instance
    • serviceRegistry

      protected org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry
      The remote service registry
  • Constructor Details

    • YouTubeV3PublicationServiceImpl

      public YouTubeV3PublicationServiceImpl() throws Exception
      Creates a new instance of the youtube publication service.
      Throws:
      Exception
  • Method Details

    • activate

      public void activate(org.osgi.service.component.ComponentContext cc)
      Called when service activates. Defined in OSGi resource file.
      Overrides:
      activate in class org.opencastproject.job.api.AbstractJobProducer
    • updated

      public void updated(Dictionary props) throws org.osgi.service.cm.ConfigurationException
      Specified by:
      updated in interface org.osgi.service.cm.ManagedService
      Throws:
      org.osgi.service.cm.ConfigurationException
    • publish

      public org.opencastproject.job.api.Job publish(org.opencastproject.mediapackage.MediaPackage mediaPackage, org.opencastproject.mediapackage.Track track) throws org.opencastproject.publication.api.PublicationException
      Specified by:
      publish in interface org.opencastproject.publication.api.YouTubePublicationService
      Throws:
      org.opencastproject.publication.api.PublicationException
    • retract

      public org.opencastproject.job.api.Job retract(org.opencastproject.mediapackage.MediaPackage mediaPackage) throws org.opencastproject.publication.api.PublicationException
      Specified by:
      retract in interface org.opencastproject.publication.api.YouTubePublicationService
      Throws:
      org.opencastproject.publication.api.PublicationException
    • process

      protected String process(org.opencastproject.job.api.Job job) throws Exception
      Specified by:
      process in class org.opencastproject.job.api.AbstractJobProducer
      Throws:
      Exception
      See Also:
      • AbstractJobProducer.process(org.opencastproject.job.api.Job)
    • setWorkspace

      protected void setWorkspace(org.opencastproject.workspace.api.Workspace workspace)
      Callback for the OSGi environment to set the workspace reference.
      Parameters:
      workspace - the workspace
    • setServiceRegistry

      protected void setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
      Callback for the OSGi environment to set the service registry reference.
      Parameters:
      serviceRegistry - the service registry
    • getServiceRegistry

      protected org.opencastproject.serviceregistry.api.ServiceRegistry getServiceRegistry()
      Specified by:
      getServiceRegistry in class org.opencastproject.job.api.AbstractJobProducer
      See Also:
      • AbstractJobProducer.getServiceRegistry()
    • setSecurityService

      public void setSecurityService(org.opencastproject.security.api.SecurityService securityService)
      Callback for setting the security service.
      Parameters:
      securityService - the securityService to set
    • setUserDirectoryService

      public void setUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService)
      Callback for setting the user directory service.
      Parameters:
      userDirectoryService - the userDirectoryService to set
    • setOrganizationDirectoryService

      public void setOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService organizationDirectory)
      Sets a reference to the organization directory service.
      Parameters:
      organizationDirectory - the organization directory
    • getSecurityService

      protected org.opencastproject.security.api.SecurityService getSecurityService()
      Specified by:
      getSecurityService in class org.opencastproject.job.api.AbstractJobProducer
      See Also:
      • AbstractJobProducer.getSecurityService()
    • getUserDirectoryService

      protected org.opencastproject.security.api.UserDirectoryService getUserDirectoryService()
      Specified by:
      getUserDirectoryService in class org.opencastproject.job.api.AbstractJobProducer
      See Also:
      • AbstractJobProducer.getUserDirectoryService()
    • getOrganizationDirectoryService

      protected org.opencastproject.security.api.OrganizationDirectoryService getOrganizationDirectoryService()
      Specified by:
      getOrganizationDirectoryService in class org.opencastproject.job.api.AbstractJobProducer
      See Also:
      • AbstractJobProducer.getOrganizationDirectoryService()