public interface MediaConversionService
int deleteConvertedMedias(MediaContainerModel container)
MediaContainerModel.container - the MediaContainerModel to clean upIllegalArgumentException - 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'.IllegalArgumentException - if the specified container is null.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.IllegalArgumentException - if the specified container is null.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 MediaContainerModelIllegalArgumentException - 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.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.IllegalArgumentException - if any of the specified parameters is null.ModelNotFoundException - if the media could neither be retrieved nor converted.Copyright © 2017 SAP SE. All Rights Reserved.