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 AutomaticVideoConversionContributionHandlerautomaticVideoConversionsprotected Configurationconfigurationstatic StringCONFIGURATION_EPstatic StringDEFAULT_VIDEO_CONVERSIONS_EPprotected static Loglogstatic StringVIDEO_CONVERSIONS_EPprotected VideoConversionContributionHandlervideoConversions-
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 voidactivate(ComponentContext context)Activates the component.TranscodedVideoconvert(Video originalVideo, String conversionName)Convert theoriginalVideousing the givenconversionName.voiddeactivate(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()ConfigurationgetConfiguration()VideoConversionStatusgetProgressStatus(String repositoryName, String docId, String conversionName)Returns the status of the video conversion with the given conversion name on the given document.VideoConversiongetVideoConversion(String conversionName)voidlaunchAutomaticConversions(DocumentModel doc, boolean onlyMissing)Launch registered automatic video conversions on the givendoc.voidlaunchConversion(DocumentModel doc, String conversionName)Launch an asynchronously video conversion of the givendoc.voidregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)voidunregisterContribution(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:ComponentActivates the component.This method is called by the runtime when a component is activated.
- Specified by:
activatein interfaceComponent- Overrides:
activatein classDefaultComponent- Parameters:
context- the runtime context
-
deactivate
public void deactivate(ComponentContext context)
Description copied from interface:ComponentDeactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivatein interfaceComponent- Overrides:
deactivatein classDefaultComponent- Parameters:
context- the runtime context
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
registerContributionin classDefaultComponent
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
unregisterContributionin classDefaultComponent
-
getAvailableVideoConversions
public Collection<VideoConversion> getAvailableVideoConversions()
Description copied from interface:VideoServiceReturns the available registered video conversions that can be run on a Video document.- Specified by:
getAvailableVideoConversionsin interfaceVideoService
-
getAvailableVideoConversionsNames
public List<String> getAvailableVideoConversionsNames()
- Specified by:
getAvailableVideoConversionsNamesin interfaceVideoService
-
launchConversion
public void launchConversion(DocumentModel doc, String conversionName)
Description copied from interface:VideoServiceLaunch an asynchronously video conversion of the givendoc.- Specified by:
launchConversionin 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:VideoServiceLaunch registered automatic video conversions on the givendoc.If
onlyMissingistrue, launch only the automatic video conversions that are not on the video document, otherwise launch all the registered automatic video conversions- Specified by:
launchAutomaticConversionsin 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:VideoServiceConvert theoriginalVideousing the givenconversionName.- Specified by:
convertin interfaceVideoService- Parameters:
originalVideo- the video to convertconversionName- the video conversion to use- Returns:
- a
TranscodedVideoobject of the converted video.
-
getProgressStatus
public VideoConversionStatus getProgressStatus(String repositoryName, String docId, String conversionName)
Description copied from interface:VideoServiceReturns the status of the video conversion with the given conversion name on the given document.- Specified by:
getProgressStatusin interfaceVideoService
-
getVideoConversion
public VideoConversion getVideoConversion(String conversionName)
- Specified by:
getVideoConversionin interfaceVideoService
-
getConfiguration
public Configuration getConfiguration()
- Specified by:
getConfigurationin interfaceVideoService
-
-