Class VideoServiceImpl
- java.lang.Object
-
- org.nuxeo.runtime.model.DefaultComponent
-
- org.nuxeo.ecm.platform.video.service.VideoServiceImpl
-
- All Implemented Interfaces:
VideoService
,Adaptable
,Component
,Extensible
,TimestampedService
public class VideoServiceImpl extends DefaultComponent implements VideoService
Default implementation ofVideoService
.- Since:
- 5.5
-
-
Field Summary
Fields Modifier and Type Field Description protected AutomaticVideoConversionContributionHandler
automaticVideoConversions
protected Configuration
configuration
static String
CONFIGURATION_EP
static String
DEFAULT_VIDEO_CONVERSIONS_EP
protected static Log
log
static String
VIDEO_CONVERSIONS_EP
protected VideoConversionContributionHandler
videoConversions
-
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
-
Constructor Summary
Constructors Constructor Description VideoServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate(ComponentContext context)
Activates the component.TranscodedVideo
convert(Video originalVideo, String conversionName)
Convert theoriginalVideo
using the givenconversionName
.void
deactivate(ComponentContext context)
Deactivates the component.Collection<VideoConversion>
getAvailableVideoConversions()
Returns the available registered video conversions that can be run on a Video document.List<String>
getAvailableVideoConversionsNames()
Configuration
getConfiguration()
VideoConversionStatus
getProgressStatus(String repositoryName, String docId, String conversionName)
Returns the status of the video conversion with the given conversion name on the given document.VideoConversion
getVideoConversion(String conversionName)
void
launchAutomaticConversions(DocumentModel doc, boolean onlyMissing)
Launch registered automatic video conversions on the givendoc
.void
launchConversion(DocumentModel doc, String conversionName)
Launch an asynchronously video conversion of the givendoc
.void
registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
void
unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
-
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
addRuntimeMessage, addRuntimeMessage, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterExtension
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.runtime.model.Component
applicationStarted, getApplicationStartedOrder
-
Methods inherited from interface org.nuxeo.ecm.platform.video.service.VideoService
launchAutomaticConversions
-
-
-
-
Field Detail
-
log
protected static final Log log
-
VIDEO_CONVERSIONS_EP
public static final String VIDEO_CONVERSIONS_EP
- See Also:
- Constant Field Values
-
DEFAULT_VIDEO_CONVERSIONS_EP
public static final String DEFAULT_VIDEO_CONVERSIONS_EP
- See Also:
- Constant Field Values
-
CONFIGURATION_EP
public static final String CONFIGURATION_EP
- Since:
- 7.4
- See Also:
- Constant Field Values
-
videoConversions
protected VideoConversionContributionHandler videoConversions
-
automaticVideoConversions
protected AutomaticVideoConversionContributionHandler automaticVideoConversions
-
configuration
protected Configuration configuration
- Since:
- 7.4
-
-
Method Detail
-
activate
public void activate(ComponentContext context)
Description copied from interface:Component
Activates the component.This method is called by the runtime when a component is activated.
- Specified by:
activate
in interfaceComponent
- Overrides:
activate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
deactivate
public void deactivate(ComponentContext context)
Description copied from interface:Component
Deactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivate
in interfaceComponent
- Overrides:
deactivate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
registerContribution
in classDefaultComponent
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
unregisterContribution
in classDefaultComponent
-
getAvailableVideoConversions
public Collection<VideoConversion> getAvailableVideoConversions()
Description copied from interface:VideoService
Returns the available registered video conversions that can be run on a Video document.- Specified by:
getAvailableVideoConversions
in interfaceVideoService
-
getAvailableVideoConversionsNames
public List<String> getAvailableVideoConversionsNames()
- Specified by:
getAvailableVideoConversionsNames
in interfaceVideoService
-
launchConversion
public void launchConversion(DocumentModel doc, String conversionName)
Description copied from interface:VideoService
Launch an asynchronously video conversion of the givendoc
.- Specified by:
launchConversion
in interfaceVideoService
- Parameters:
doc
- the video document to be convertedconversionName
- the video conversion to use
-
launchAutomaticConversions
public void launchAutomaticConversions(DocumentModel doc, boolean onlyMissing)
Description copied from interface:VideoService
Launch registered automatic video conversions on the givendoc
.If
onlyMissing
istrue
, launch only the automatic video conversions that are not on the video document, otherwise launch all the registered automatic video conversions- Specified by:
launchAutomaticConversions
in interfaceVideoService
- Parameters:
doc
- the video document to be convertedonlyMissing
- whether to launch only the missing video conversions
-
convert
public TranscodedVideo convert(Video originalVideo, String conversionName)
Description copied from interface:VideoService
Convert theoriginalVideo
using the givenconversionName
.- Specified by:
convert
in interfaceVideoService
- Parameters:
originalVideo
- the video to convertconversionName
- the video conversion to use- Returns:
- a
TranscodedVideo
object of the converted video.
-
getProgressStatus
public VideoConversionStatus getProgressStatus(String repositoryName, String docId, String conversionName)
Description copied from interface:VideoService
Returns the status of the video conversion with the given conversion name on the given document.- Specified by:
getProgressStatus
in interfaceVideoService
-
getVideoConversion
public VideoConversion getVideoConversion(String conversionName)
- Specified by:
getVideoConversion
in interfaceVideoService
-
getConfiguration
public Configuration getConfiguration()
- Specified by:
getConfiguration
in interfaceVideoService
-
-