public interface MediaConversionService
| Modifier and Type | Method and Description |
|---|---|
void |
convertMedias(MediaContainerModel container)
Converts the
MediaContainerModel's master media to all formats which are currently not present in the
given MediaContainerModel. |
int |
deleteConvertedMedias(MediaContainerModel container)
Removes all converted medias within the specified
MediaContainerModel. |
java.util.Collection<ConversionMediaFormatModel> |
getAllConversionFormats()
Retrieves all configured
ConversionMediaFormatModel from database. |
ConversionStatus |
getConversionStatus(MediaContainerModel model)
Computes the current
ConversionStatus for the given MediaContainerModel. |
java.util.Collection<MediaModel> |
getConvertedMedias(MediaContainerModel container)
Retrieves all converted medias in the given
MediaContainerModel, i.e. |
MediaModel |
getMaster(MediaContainerModel model)
Retrieves the current 'master'
MediaModel of the given MediaContainerModel. |
MediaModel |
getOrConvert(MediaContainerModel container,
MediaFormatModel format)
Retrieves the
MediaModel in the specified MediaFormatModel associated with the given
MediaContainerModel. |
int deleteConvertedMedias(MediaContainerModel container)
MediaContainerModel.container - the MediaContainerModel to clean upjava.lang.IllegalArgumentException - if the specified container is null.void convertMedias(MediaContainerModel container)
MediaContainerModel's master media to all formats which are currently not present in the
given MediaContainerModel.container - the MediaContainerModel to 'fill up'.java.lang.IllegalArgumentException - if the specified container is null.java.util.Collection<MediaModel> getConvertedMedias(MediaContainerModel container)
MediaContainerModel, i.e. all medias within this container
which have a parent and a format set.container - the MediaContainerModel in question.MediaContainerModel.java.lang.IllegalArgumentException - if the specified container is null.java.util.Collection<ConversionMediaFormatModel> getAllConversionFormats()
ConversionMediaFormatModel from database.ConversionMediaFormatModels.ConversionStatus getConversionStatus(MediaContainerModel model)
ConversionStatus for the given MediaContainerModel. The conversion status is
ConversionStatus.EMPTY, if the container has no master, orConversionStatus.UNCONVERTED, if there are none of the target formats available,ConversionStatus.PARTIALLY_CONVERTED, if there are some of the target formats available, orConversionStatus.CONVERTED, if all of the target formats are available.supportedFormat of the assigned ConversionGroupModel orConversionMediaFormatModel instances in the system, if no ConversionGroupModel is set on
the given MediaContainerModelmodel - the MediaContainerModel to compute the conversion status forConversionStatus for the given MediaContainerModeljava.lang.IllegalArgumentException - if the specified model is null.MediaModel getMaster(MediaContainerModel model)
MediaModel of the given MediaContainerModel. The master media is
defined as the MediaModel within the MediaContainerModel which has no original and no original
data pk set (attributes MediaModel.ORIGINAL and MediaModel.ORIGINALDATAPK).model - the MediaContainerModel in questionnull if no such media exists.java.lang.IllegalArgumentException - if the specified model is null.MediaContainerModel.getMaster(),
MediaModel.getOriginal()MediaModel getOrConvert(MediaContainerModel container, MediaFormatModel format)
MediaModel in the specified MediaFormatModel associated with the given
MediaContainerModel. If no such media exists the service will try to convert the media to that format
automatically (synchronous). The conversion will also be performed if the converted media is outdated, i.e. if the
binary data of the converted media's original is not the same anymore.container - the MediaContainerModel to search.format - the MediaFormatModel to retrieve.MediaModel of the given MediaContainerModel in the given MediaFormatModel.java.lang.IllegalArgumentException - if any of the specified parameters is null.ModelNotFoundException - if the media could neither be retrieved nor converted.Copyright © 2018 SAP SE. All Rights Reserved.