Interface ObjectPreviewService

  • All Known Implementing Classes:
    DefaultObjectPreviewService

    public interface ObjectPreviewService
    Service which allows to display preview of the media files
    • 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 returned
        context - 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 returned
        configuration - 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 returned
        configuration - Base configuration for the type
        context - context to resolve the preview
        Returns:
        the preview object