Interface MediaFacade
-
- All Known Implementing Classes:
DefaultMediaFacade
public interface MediaFacadeFacade for managing Media.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description MediaDataaddMedia(MediaData media, MediaFileDto mediaFile)Create a media item from anInputStream.MediaDatagetMediaByCode(java.lang.String code)Deprecated, for removal: This API element is subject to removal in a future version.since 1905, please usegetMediaByUUID(String)insteadjava.util.List<MediaData>getMediaByNamedQuery(NamedQueryData namedQuery)Search for a single page of media using a named query.MediaDatagetMediaByUUID(java.lang.String uuid)Get a media DTO by uuid.java.util.List<MediaData>getMediaByUUIDs(java.util.List<java.lang.String> uuids)Get a list of media DTO by their universally unique identifiers (uuids).
-
-
-
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 usegetMediaByUUID(String)insteadGet 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 anInputStream.- Parameters:
media- - the attributes required to create a new media itemmediaFile- - the actual file and anInputStreamand its properties- Returns:
- the newly created media
- Throws:
ValidationException- when the input contains validation errorsConversionException- when unable to convert the DTOs to a hybris model
-
-