public interface ProductImageMediaService
| Modifier and Type | Method and Description |
|---|---|
void |
attachContainerToProductModel(Collection<MediaContainerModel> container,
ProductModel currentProduct)
Attach a given container to a product
|
MediaModel |
getGalleryImage(MediaContainerModel container)
Retrieve a gallery image from a given media container
|
MediaModel |
getMainImage(MediaContainerModel container)
Retrieve a main image from a given media container
|
MediaService |
getMediaService()
Getter
|
ModelService |
getModelService()
Getter
|
SynchronizationServiceImpl |
getSynchronizationService()
Getter
|
boolean |
isResizePluginIncluded()
Determine if a resize plugin is included
|
boolean |
isSynchronizationNeeded(ProductModel currentProduct)
Determine if a given product needs to be synchronized
|
void |
removeGalleryContainer(ProductModel currentProduct,
MediaModel media)
Remove gallery container for a given product
|
void |
removeMediaFromGalleryImages(ProductModel currentProduct,
MediaModel media)
Remove a media from a given product's images gallery
|
void |
setBestMediaToMainPicture(MediaModel model,
ProductModel currentProduct)
Set the best media to the main picture to a given product
|
MediaModel |
setImageWithFormat(byte[] bytes,
ProductModel currentProduct,
String format,
MediaContainerModel tempContainer)
Set an image with a given format
|
void |
setMediaService(MediaService mediaService)
Setter
|
void |
setModelService(ModelService modelService)
Setter
|
void |
setSynchronizationService(SynchronizationServiceImpl synchronizationService)
Setter
|
void |
switchProductImageContainer(MediaContainerModel toRemove,
MediaContainerModel toAdd,
ProductModel currentProduct)
Update the media container for a given product
|
void |
synchronize(ProductModel currentProduct,
Collection<MediaModel> medias)
Synchronize a collection of media for a given product
|
MediaContainerModel |
updateMediaContainerModels(MediaModel uploadedMediaModel,
ProductModel currentProduct,
String siteUid,
List<MediaContainerModel> tempContainers)
Update media containers
|
MediaModel |
updateMediaModels(byte[] bytes,
ProductModel currentProduct)
Update media for the given product
|
MediaModel updateMediaModels(byte[] bytes, ProductModel currentProduct)
bytes - currentProduct - MediaContainerModel updateMediaContainerModels(MediaModel uploadedMediaModel, ProductModel currentProduct, String siteUid, List<MediaContainerModel> tempContainers)
uploadedMediaModel - currentProduct - siteUid - tempContainers - void attachContainerToProductModel(Collection<MediaContainerModel> container, ProductModel currentProduct)
container - currentProduct - boolean isSynchronizationNeeded(ProductModel currentProduct)
currentProduct - MediaModel getGalleryImage(MediaContainerModel container)
container - MediaModel getMainImage(MediaContainerModel container)
container - void setBestMediaToMainPicture(MediaModel model, ProductModel currentProduct)
model - currentProduct - SynchronizationServiceImpl getSynchronizationService()
void setSynchronizationService(SynchronizationServiceImpl synchronizationService)
synchronizationService - ModelService getModelService()
void setModelService(ModelService modelService)
modelService - MediaService getMediaService()
void setMediaService(MediaService mediaService)
mediaService - boolean isResizePluginIncluded()
void synchronize(ProductModel currentProduct, Collection<MediaModel> medias)
currentProduct - medias - void removeMediaFromGalleryImages(ProductModel currentProduct, MediaModel media)
currentProduct - media - MediaModel setImageWithFormat(byte[] bytes, ProductModel currentProduct, String format, MediaContainerModel tempContainer)
bytes - currentProduct - format - tempContainer - void switchProductImageContainer(MediaContainerModel toRemove, MediaContainerModel toAdd, ProductModel currentProduct)
toRemove - source media container which the product should be removed fromtoAdd - target media container which the product should be added tocurrentProduct - void removeGalleryContainer(ProductModel currentProduct, MediaModel media)
currentProduct - media - Copyright © 2017 SAP SE. All Rights Reserved.