Class 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 Detail

      • LOG

        public static final org.slf4j.Logger LOG
      • 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
    • Constructor Detail

      • DefaultObjectPreviewService

        public DefaultObjectPreviewService()
    • Method Detail

      • getPreview

        public ObjectPreview getPreview​(java.lang.String mime)
        Description copied from interface: ObjectPreviewService
        Gets preview for the given mime
        Specified by:
        getPreview in interface ObjectPreviewService
        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: ObjectPreviewService
        Gets preview for the given mime
        Specified by:
        getPreview in interface ObjectPreviewService
        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

        public ObjectPreview getPreview​(java.lang.Object data,
                                        Base configuration)
        Description copied from interface: ObjectPreviewService
        Gets preview for the given object
        Specified by:
        getPreview in interface ObjectPreviewService
        Parameters:
        data - object for which preview URL should be returned
        configuration - 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: ObjectPreviewService
        Gets preview for the given object
        Specified by:
        getPreview in interface ObjectPreviewService
        Parameters:
        target - object for which preview URL should be returned
        configuration - Base configuration for the type
        context - 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)
      • setUrlResolutionStrategies

        public void setUrlResolutionStrategies​(java.util.List<PreviewResolutionStrategy> urlResolutionStrategies)