Class DefaultMediaContainerService

    • Constructor Detail

      • DefaultMediaContainerService

        public DefaultMediaContainerService()
    • Method Detail

      • addMediaToContainer

        public void addMediaToContainer​(MediaContainerModel mediaContainerModel,
                                        java.util.List<MediaModel> mediaModels)
        Adds the medias to the given container. If the media with the same format already exists in the container the existent media will be replaced.
        Specified by:
        addMediaToContainer in interface MediaContainerService
        Parameters:
        mediaContainerModel - the media container object that we will add media to
        mediaModels - the media list that will be added to the container. If media has no format specified IllegalArgumentException will be thrown
      • removeMediaFromContainer

        public void removeMediaFromContainer​(MediaContainerModel mediaContainerModel,
                                             java.util.List<MediaModel> mediaModels)
        Removes the medias from given container.
        Specified by:
        removeMediaFromContainer in interface MediaContainerService
        Parameters:
        mediaContainerModel - the media container
        mediaModels - the medias that will be removed from the container
      • getMediaFormatForSourceFormat

        public MediaFormatModel getMediaFormatForSourceFormat​(MediaContextModel contextModel,
                                                              MediaFormatModel sourceFormatModel)
        Gets the media format for source format from the given media context. Returns null if the required source media format does not exist in the context.
        Specified by:
        getMediaFormatForSourceFormat in interface MediaContainerService
        Parameters:
        contextModel - the context model that should contain target media format we are looking for
        sourceFormatModel - the source format model that we are looking for target
        Returns:
        the media format for source format or null if the specified source format has no target mapping assigned
      • getMediaContextForQualifier

        public MediaContextModel getMediaContextForQualifier​(java.lang.String qualifier)
        Gets the media context for the specified qualifier.
        Specified by:
        getMediaContextForQualifier in interface MediaContainerService
        Parameters:
        qualifier - the qualifier
        Returns:
        the media context for qualifier
      • getMediaContainerDao

        @Deprecated
        protected MediaContainerDao getMediaContainerDao()
        Deprecated.
        since 4.4
      • setMediaContainerDao

        public void setMediaContainerDao​(MediaContainerDao mediaContainerDao)
      • getMediaService

        public MediaService getMediaService()
        Returns:
        the mediaService
      • setMediaService

        public void setMediaService​(MediaService mediaService)
        Parameters:
        mediaService - the mediaService to set