Interface ObjectPreviewService
-
- All Known Implementing Classes:
DefaultObjectPreviewService
public interface ObjectPreviewServiceService which allows to display preview of the media files
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPREFERRED_PREVIEW_SUFFIX
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ObjectPreviewgetPreview(java.lang.Object data, Base configuration)Gets preview for the given objectdefault ObjectPreviewgetPreview(java.lang.Object data, Base configuration, CockpitContext context)Gets preview for the given objectObjectPreviewgetPreview(java.lang.String mime)Gets preview for the given mimedefault ObjectPreviewgetPreview(java.lang.String mime, CockpitContext context)Gets preview for the given mime
-
-
-
Field Detail
-
PREFERRED_PREVIEW_SUFFIX
static final java.lang.String PREFERRED_PREVIEW_SUFFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPreview
ObjectPreview getPreview(java.lang.String mime)
Gets preview for the given mime- 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
default ObjectPreview getPreview(java.lang.String mime, CockpitContext context)
Gets preview for the given mime- 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
ObjectPreview getPreview(java.lang.Object data, Base configuration)
Gets preview for the given object- Parameters:
data- object for which preview URL should be returnedconfiguration- Base configuration for the type- Returns:
- the preview object
-
getPreview
default ObjectPreview getPreview(java.lang.Object data, Base configuration, CockpitContext context)
Gets preview for the given object- Parameters:
data- object for which preview URL should be returnedconfiguration- Base configuration for the typecontext- context to resolve the preview- Returns:
- the preview object
-
-