public abstract class AbstractManageMediaService extends Object implements ManageMediaService, CockpitImageMediaService
ManageMediaService and CockpitImageMediaService| Modifier and Type | Field and Description |
|---|---|
protected CatalogVersionModel |
catalogVersion |
protected static String |
CODE_PREFIX |
protected static String |
CODE_TEMP_PREFIX |
protected AbstractCMSComponentModel |
component |
protected ImageResizePlugin |
imageResizePlugin |
protected List<ProductImageModelListener> |
listeners |
protected MediaContainerModel |
mediaContainerModel |
protected Map<String,String> |
mediaFormatMap |
protected Map<String,MediaModel> |
mediaModelMap |
protected MediaService |
mediaService |
protected ModelService |
modelService |
protected String |
serverPath |
protected String |
siteUid |
protected String |
THUMBNAIL_FORMAT |
| Constructor and Description |
|---|
AbstractManageMediaService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ProductImageModelListener listener)
Add a product image listener
|
protected void |
convertMediasToMap(Collection<MediaModel> medias,
Map<String,MediaModel> map) |
protected void |
fireChangeEvents() |
AbstractCMSComponentModel |
getComponent() |
ImageResizePlugin |
getImageResizePlugin() |
MediaModel |
getMasterMedia(Collection<MediaModel> medias)
Find a master media from a given collection of medias
|
MediaContainerModel |
getMediaContainerModel() |
Map<String,String> |
getMediaFormatMap() |
String |
getMediaPathForFormat(String format)
Find a media path for a given media format
|
MediaService |
getMediaService() |
ModelService |
getModelService() |
String |
getServerPath()
Find a server path
|
boolean |
isReadyForSave()
Determines if a media can be saved
|
boolean |
isResizePluginIncluded()
Determines if the resize plugin is included or not
|
void |
removeMediaByFormat(String format)
Remove a media for a given media format
|
abstract void |
save()
Save an image
|
void |
setComponent(AbstractCMSComponentModel component) |
void |
setImagesFromZip(List<byte[]> zipEntryBytes,
ImageTile container)
Set an image from zip
|
void |
setImageWithAutoResize(byte[] bytes,
ImageTile tile)
Set an image to a given auto resize format
|
void |
setImageWithFormat(byte[] bytes,
ImageTile tile)
Set an image to a given format
|
void |
setServerPath(String serverPath) |
protected static final String CODE_PREFIX
protected static final String CODE_TEMP_PREFIX
protected String serverPath
protected final String THUMBNAIL_FORMAT
protected ModelService modelService
protected MediaService mediaService
protected ImageResizePlugin imageResizePlugin
protected CatalogVersionModel catalogVersion
protected String siteUid
protected AbstractCMSComponentModel component
protected MediaContainerModel mediaContainerModel
protected final Map<String,MediaModel> mediaModelMap
protected List<ProductImageModelListener> listeners
protected void convertMediasToMap(Collection<MediaModel> medias, Map<String,MediaModel> map)
public void setImageWithFormat(byte[] bytes,
ImageTile tile)
ManageMediaServicesetImageWithFormat in interface CockpitImageMediaServicesetImageWithFormat in interface ManageMediaServicepublic void setImageWithAutoResize(byte[] bytes,
ImageTile tile)
ManageMediaServicesetImageWithAutoResize in interface CockpitImageMediaServicesetImageWithAutoResize in interface ManageMediaServicepublic abstract void save()
ManageMediaServicesave in interface ManageMediaServicepublic void setServerPath(String serverPath)
public String getServerPath()
ManageMediaServicegetServerPath in interface ManageMediaServicepublic String getMediaPathForFormat(String format)
ManageMediaServicegetMediaPathForFormat in interface ManageMediaServicepublic MediaModel getMasterMedia(Collection<MediaModel> medias)
ManageMediaServicegetMasterMedia in interface ManageMediaServicepublic boolean isReadyForSave()
ManageMediaServiceisReadyForSave in interface ManageMediaServicepublic void removeMediaByFormat(String format)
ManageMediaServiceremoveMediaByFormat in interface ManageMediaServicepublic MediaService getMediaService()
public ModelService getModelService()
public ImageResizePlugin getImageResizePlugin()
public void setImagesFromZip(List<byte[]> zipEntryBytes, ImageTile container)
CockpitImageMediaServicesetImagesFromZip in interface CockpitImageMediaServicepublic boolean isResizePluginIncluded()
CockpitImageMediaServiceisResizePluginIncluded in interface CockpitImageMediaServiceprotected void fireChangeEvents()
public void addListener(ProductImageModelListener listener)
ManageMediaServiceaddListener in interface ManageMediaServicepublic AbstractCMSComponentModel getComponent()
public void setComponent(AbstractCMSComponentModel component)
component - the component to setpublic MediaContainerModel getMediaContainerModel()
Copyright © 2017 SAP SE. All Rights Reserved.