Class DefaultObjectPreviewService
- java.lang.Object
-
- com.hybris.cockpitng.services.media.impl.DefaultObjectPreviewService
-
- All Implemented Interfaces:
ObjectPreviewService
public class DefaultObjectPreviewService extends java.lang.Object implements ObjectPreviewService
Service which allows to display preview of the media files
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringDEFAULT_PREVIEW_ICONprotected static java.lang.StringEMPTY_PREVIEW_ICONstatic java.lang.StringIMAGE_PNG_MIMEstatic org.slf4j.LoggerLOGprotected static java.lang.StringMIME_PREVIEW_ICONS_PATH-
Fields inherited from interface com.hybris.cockpitng.services.media.ObjectPreviewService
PREFERRED_PREVIEW_SUFFIX
-
-
Constructor Summary
Constructors Constructor Description DefaultObjectPreviewService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectPreviewgetPreview(java.lang.Object data, Base configuration)Gets preview for the given objectObjectPreviewgetPreview(java.lang.Object target, Base configuration, CockpitContext context)Gets preview for the given objectObjectPreviewgetPreview(java.lang.String mime)Gets preview for the given mimeObjectPreviewgetPreview(java.lang.String mime, CockpitContext context)Gets preview for the given mimejava.util.List<PreviewResolutionStrategy>getUrlResolutionStrategies()voidsetMediaGroups(java.util.Properties mediaGroups)voidsetMediaIcons(java.util.Properties mediaIcons)voidsetPermissionFacade(PermissionFacade permissionFacade)voidsetPropertyValueService(PropertyValueService propertyValueService)voidsetUrlResolutionStrategies(java.util.List<PreviewResolutionStrategy> urlResolutionStrategies)voidsetWebMimes(java.util.Properties webMimes)
-
-
-
Field Detail
-
LOG
public static final org.slf4j.Logger LOG
-
IMAGE_PNG_MIME
public static final java.lang.String IMAGE_PNG_MIME
- See Also:
- Constant Field Values
-
DEFAULT_PREVIEW_ICON
protected static final java.lang.String DEFAULT_PREVIEW_ICON
- See Also:
- Constant Field Values
-
MIME_PREVIEW_ICONS_PATH
protected static final java.lang.String MIME_PREVIEW_ICONS_PATH
- See Also:
- Constant Field Values
-
EMPTY_PREVIEW_ICON
protected static final java.lang.String EMPTY_PREVIEW_ICON
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPreview
public ObjectPreview getPreview(java.lang.String mime)
Description copied from interface:ObjectPreviewServiceGets preview for the given mime- Specified by:
getPreviewin interfaceObjectPreviewService- Parameters:
mime- type for which a default preview URL should be returned- Returns:
- the preview object or null if no URL matches the given mime type
-
getPreview
public ObjectPreview getPreview(java.lang.String mime, CockpitContext context)
Description copied from interface:ObjectPreviewServiceGets preview for the given mime- Specified by:
getPreviewin interfaceObjectPreviewService- Parameters:
mime- type for which a default preview URL should be returnedcontext- context to resolve the preview- Returns:
- the preview object or null if no URL matches the given mime type
-
getPreview
public ObjectPreview getPreview(java.lang.Object data, Base configuration)
Description copied from interface:ObjectPreviewServiceGets preview for the given object- Specified by:
getPreviewin interfaceObjectPreviewService- Parameters:
data- object for which preview URL should be returnedconfiguration- Base configuration for the type- Returns:
- the preview object
-
getPreview
public ObjectPreview getPreview(java.lang.Object target, Base configuration, CockpitContext context)
Description copied from interface:ObjectPreviewServiceGets preview for the given object- Specified by:
getPreviewin interfaceObjectPreviewService- Parameters:
target- object for which preview URL should be returnedconfiguration- Base configuration for the typecontext- context to resolve the preview- Returns:
- the preview object
-
setMediaIcons
public void setMediaIcons(java.util.Properties mediaIcons)
-
setMediaGroups
public void setMediaGroups(java.util.Properties mediaGroups)
-
setWebMimes
public void setWebMimes(java.util.Properties webMimes)
-
setPropertyValueService
public void setPropertyValueService(PropertyValueService propertyValueService)
-
setPermissionFacade
public void setPermissionFacade(PermissionFacade permissionFacade)
-
getUrlResolutionStrategies
public java.util.List<PreviewResolutionStrategy> getUrlResolutionStrategies()
-
setUrlResolutionStrategies
public void setUrlResolutionStrategies(java.util.List<PreviewResolutionStrategy> urlResolutionStrategies)
-
-