Interface MediaFacade

  • All Known Implementing Classes:
    DefaultMediaFacade

    public interface MediaFacade
    Facade for managing Media.
    • Method Detail

      • getMediaByCode

        @Deprecated(since="1905",
                    forRemoval=true)
        MediaData getMediaByCode​(java.lang.String code)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 1905, please use getMediaByUUID(String) instead
        Get a media DTO by code.
        Parameters:
        code - - the code to search for
        Returns:
        the media
        Throws:
        MediaNotFoundException - when the media cannot be found
      • getMediaByUUID

        MediaData getMediaByUUID​(java.lang.String uuid)
        Get a media DTO by uuid.
        Parameters:
        uuid - - the uuid to search for
        Returns:
        the media
        Throws:
        MediaNotFoundException - when the media cannot be found
      • getMediaByUUIDs

        java.util.List<MediaData> getMediaByUUIDs​(java.util.List<java.lang.String> uuids)
        Get a list of media DTO by their universally unique identifiers (uuids).
        Parameters:
        uuids - - the list of uuids of the media to search for
        Returns:
        list of media
        Throws:
        MediaNotFoundException - when one of the media cannot be found
      • getMediaByNamedQuery

        java.util.List<MediaData> getMediaByNamedQuery​(NamedQueryData namedQuery)
        Search for a single page of media using a named query.
        Parameters:
        namedQuery - - the named query
        Returns:
        the list of search results or empty collection
        Throws:
        ValidationException - when the input contains validation errors
      • addMedia

        MediaData addMedia​(MediaData media,
                           MediaFileDto mediaFile)
        Create a media item from an InputStream.
        Parameters:
        media - - the attributes required to create a new media item
        mediaFile - - the actual file and an InputStream and its properties
        Returns:
        the newly created media
        Throws:
        ValidationException - when the input contains validation errors
        ConversionException - when unable to convert the DTOs to a hybris model