Class MediaFormatProvider

  • All Implemented Interfaces:
    io.wcm.sling.commons.caservice.ContextAwareService

    @ConsumerType
    public abstract class MediaFormatProvider
    extends java.lang.Object
    implements io.wcm.sling.commons.caservice.ContextAwareService
    MediaFormatProvider OSGi services provide media formats for the media handler. Applications can set service properties or bundle headers as defined in ContextAwareService to apply this configuration only for resources that match the relevant resource paths.
    • Field Summary

      • Fields inherited from interface io.wcm.sling.commons.caservice.ContextAwareService

        PROPERTY_ACCEPTS_CONTEXT_PATH_EMPTY, PROPERTY_CONTEXT_PATH_BLACKLIST_PATTERN, PROPERTY_CONTEXT_PATH_PATTERN
    • Constructor Detail

      • MediaFormatProvider

        protected MediaFormatProvider​(java.util.Set<MediaFormat> mediaFormats)
        Parameters:
        mediaFormats - Set of media formats for parameter provider
      • MediaFormatProvider

        protected MediaFormatProvider​(java.lang.Class<?> type)
        Parameters:
        type - Type containing media format definitions as public static fields.
    • Method Detail

      • getMediaFormats

        @NotNull
        public @NotNull java.util.Set<MediaFormat> getMediaFormats()
        Returns:
        Media formats that the application defines
      • finalize

        @Deprecated(since="2.0.0")
        protected final void finalize()
        Deprecated.
        Prevent finalize attack (PMD CT_CONSTRUCTOR_THROW / SEI CERT Rule OBJ-11)
        Overrides:
        finalize in class java.lang.Object