Class YouTubeV3PublicationServiceImpl
java.lang.Object
org.opencastproject.job.api.AbstractJobProducer
org.opencastproject.publication.youtube.YouTubeV3PublicationServiceImpl
- All Implemented Interfaces:
JobProducer,YouTubePublicationService,org.osgi.service.cm.ManagedService
public class YouTubeV3PublicationServiceImpl
extends AbstractJobProducer
implements 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 ServiceRegistryThe remote service registryprotected 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 OrganizationDirectoryServiceReturns a reference to the organization directory service.protected SecurityServiceReturns a reference to the security serviceprotected ServiceRegistryReturns a reference to the service registry.protected UserDirectoryServiceReturns a reference to the user directory serviceprotected StringAsks the overriding class to process the arguments using the given operation.publish(MediaPackage mediaPackage, Track track) Publishes a media package element.retract(MediaPackage mediaPackage) Retract a media package element from the distribution channel.voidsetOrganizationDirectoryService(OrganizationDirectoryService organizationDirectory) Sets a reference to the organization directory service.voidsetSecurityService(SecurityService securityService) Callback for setting the security service.protected voidsetServiceRegistry(ServiceRegistry serviceRegistry) Callback for the OSGi environment to set the service registry reference.voidsetUserDirectoryService(UserDirectoryService userDirectoryService) Callback for setting the user directory service.protected voidsetWorkspace(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
workspace instance -
serviceRegistry
The 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 classAbstractJobProducer- Parameters:
cc- OSGI component context
-
updated
- Specified by:
updatedin interfaceorg.osgi.service.cm.ManagedService- Throws:
org.osgi.service.cm.ConfigurationException
-
publish
Description copied from interface:YouTubePublicationServicePublishes a media package element.- Specified by:
publishin interfaceYouTubePublicationService- Parameters:
mediaPackage- the media packagetrack- the track of the media package to publish- Returns:
- The job
- Throws:
PublicationException- if there was a problem publishing the media
-
retract
Description copied from interface:YouTubePublicationServiceRetract a media package element from the distribution channel.- Specified by:
retractin interfaceYouTubePublicationService- Parameters:
mediaPackage- the media package- Throws:
PublicationException- if there was a problem retracting the mediapackage
-
process
Asks the overriding class to process the arguments using the given operation. The result will be added to the associated job as the payload.- Specified by:
processin classAbstractJobProducer- Parameters:
job- the job to process- Returns:
- the operation result
- Throws:
Exception- See Also:
-
setWorkspace
Callback for the OSGi environment to set the workspace reference.- Parameters:
workspace- the workspace
-
setServiceRegistry
Callback for the OSGi environment to set the service registry reference.- Parameters:
serviceRegistry- the service registry
-
getServiceRegistry
Returns a reference to the service registry.- Specified by:
getServiceRegistryin classAbstractJobProducer- Returns:
- the service registry
- See Also:
-
setSecurityService
Callback for setting the security service.- Parameters:
securityService- the securityService to set
-
setUserDirectoryService
Callback for setting the user directory service.- Parameters:
userDirectoryService- the userDirectoryService to set
-
setOrganizationDirectoryService
Sets a reference to the organization directory service.- Parameters:
organizationDirectory- the organization directory
-
getSecurityService
Returns a reference to the security service- Specified by:
getSecurityServicein classAbstractJobProducer- Returns:
- the security service
- See Also:
-
getUserDirectoryService
Returns a reference to the user directory service- Specified by:
getUserDirectoryServicein classAbstractJobProducer- Returns:
- the user directory service
- See Also:
-
getOrganizationDirectoryService
Returns a reference to the organization directory service.- Specified by:
getOrganizationDirectoryServicein classAbstractJobProducer- Returns:
- the organization directory service
- See Also:
-