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
FieldsModifier and TypeFieldDescriptionstatic final floatThe load on the system introduced by creating a publish jobstatic final floatThe load on the system introduced by creating a retract jobprotected org.opencastproject.serviceregistry.api.ServiceRegistryThe remote service registryprotected org.opencastproject.workspace.api.Workspaceworkspace instancestatic final Stringstatic final StringThe key to look for in the service configuration file to override theDEFAULT_YOUTUBE_PUBLISH_JOB_LOADstatic final StringThe key to look for in the service configuration file to override theDEFAULT_YOUTUBE_RETRACT_JOB_LOADFields inherited from class org.opencastproject.job.api.AbstractJobProducer
ACCEPT_JOB_LOADS_EXCEEDING_PROPERTY, acceptJobLoadsExeedingMaxLoad, DEFAULT_ACCEPT_JOB_LOADS_EXCEEDING, executor, jobTypeFields inherited from interface org.opencastproject.publication.api.YouTubePublicationService
JOB_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of the youtube publication service. -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) Called when service activates.protected org.opencastproject.security.api.OrganizationDirectoryServiceprotected org.opencastproject.security.api.SecurityServiceprotected org.opencastproject.serviceregistry.api.ServiceRegistryprotected org.opencastproject.security.api.UserDirectoryServiceprotected Stringprocess(org.opencastproject.job.api.Job job) org.opencastproject.job.api.Jobpublish(org.opencastproject.mediapackage.MediaPackage mediaPackage, org.opencastproject.mediapackage.Track track) org.opencastproject.job.api.Jobretract(org.opencastproject.mediapackage.MediaPackage mediaPackage) voidsetOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService organizationDirectory) Sets a reference to the organization directory service.voidsetSecurityService(org.opencastproject.security.api.SecurityService securityService) Callback for setting the security service.protected voidsetServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry) Callback for the OSGi environment to set the service registry reference.voidsetUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService) Callback for setting the user directory service.protected voidsetWorkspace(org.opencastproject.workspace.api.Workspace workspace) Callback for the OSGi environment to set the workspace reference.voidupdated(Dictionary props) Methods inherited from class org.opencastproject.job.api.AbstractJobProducer
acceptJob, countJobs, finallyUpdateJob, getJobType, incident, isReadyToAccept, isReadyToAcceptJobs
-
Field Details
-
DEFAULT_YOUTUBE_PUBLISH_JOB_LOAD
public static final float DEFAULT_YOUTUBE_PUBLISH_JOB_LOADThe 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_LOADThe load on the system introduced by creating a retract job- See Also:
-
YOUTUBE_PUBLISH_LOAD_KEY
The key to look for in the service configuration file to override theDEFAULT_YOUTUBE_PUBLISH_JOB_LOAD- See Also:
-
YOUTUBE_RETRACT_LOAD_KEY
The key to look for in the service configuration file to override theDEFAULT_YOUTUBE_RETRACT_JOB_LOAD- See Also:
-
YOUTUBE_ENABLED_KEY
- See Also:
-
workspace
protected org.opencastproject.workspace.api.Workspace workspaceworkspace instance -
serviceRegistry
protected org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistryThe remote service registry
-
-
Constructor Details
-
YouTubeV3PublicationServiceImpl
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:
activatein classorg.opencastproject.job.api.AbstractJobProducer
-
updated
- Specified by:
updatedin interfaceorg.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:
publishin interfaceorg.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:
retractin interfaceorg.opencastproject.publication.api.YouTubePublicationService- Throws:
org.opencastproject.publication.api.PublicationException
-
process
- Specified by:
processin classorg.opencastproject.job.api.AbstractJobProducer- Throws:
Exception- See Also:
-
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:
getServiceRegistryin classorg.opencastproject.job.api.AbstractJobProducer- See Also:
-
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:
getSecurityServicein classorg.opencastproject.job.api.AbstractJobProducer- See Also:
-
getUserDirectoryService
protected org.opencastproject.security.api.UserDirectoryService getUserDirectoryService()- Specified by:
getUserDirectoryServicein classorg.opencastproject.job.api.AbstractJobProducer- See Also:
-
getOrganizationDirectoryService
protected org.opencastproject.security.api.OrganizationDirectoryService getOrganizationDirectoryService()- Specified by:
getOrganizationDirectoryServicein classorg.opencastproject.job.api.AbstractJobProducer- See Also:
-