Interface AMImageValidator


public interface AMImageValidator
Validates image size for Adaptive Media.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> boolean
    isProcessingRequired(com.liferay.adaptive.media.AdaptiveMedia<T> adaptiveMedia, com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
     
    default boolean
    isProcessingSupported(com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
    Returns true if the provided file version supports image processing.
    boolean
    Returns true if the provided mimeType supports image processing.
    boolean
    isValid(com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
    Returns true if the provided file version is valid for Adaptive Media.
  • Method Details

    • isProcessingRequired

      <T> boolean isProcessingRequired(com.liferay.adaptive.media.AdaptiveMedia<T> adaptiveMedia, com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
    • isProcessingSupported

      default boolean isProcessingSupported(com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
      Returns true if the provided file version supports image processing. Adaptive Media works with some media types where the content doesn't need to be processed or doesn't support processing at all (e.g. SVG).
      Returns:
      true if the file version supports image processing.
    • isProcessingSupported

      boolean isProcessingSupported(String mimeType)
      Returns true if the provided mimeType supports image processing. Adaptive Media works with some media types where the content doesn't need to be processed or doesn't support processing at all (e.g. SVG).
      Returns:
      true if the file version supports image processing.
    • isValid

      boolean isValid(com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
      Returns true if the provided file version is valid for Adaptive Media.
      Returns:
      true if the file version is valid for Adaptive Media