Package io.wcm.handler.media
Class MediaComponentPropertyResolver
- java.lang.Object
-
- io.wcm.handler.media.MediaComponentPropertyResolver
-
- All Implemented Interfaces:
AutoCloseable
@ProviderType public final class MediaComponentPropertyResolver extends Object implements AutoCloseable
Resolves Media Handler component properties for the component associated with the given resource from content policies and properties defined in the component resource. Please make sure toclose()instances of this class after usage.
-
-
Constructor Summary
Constructors Constructor Description MediaComponentPropertyResolver(@NotNull org.apache.sling.api.resource.Resource resource)Deprecated.MediaComponentPropertyResolver(@NotNull org.apache.sling.api.resource.Resource resource, @NotNull io.wcm.wcm.commons.component.ComponentPropertyResolverFactory componentPropertyResolverFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()@Nullable MediaArgs.ImageSizesgetImageSizes()@NotNull String @Nullable []getMandatoryMediaFormatNames()@NotNull String @Nullable []getMediaFormatNames()@NotNull MediaArgs.MediaFormatOption @Nullable []getMediaFormatOptions()@NotNull MediaArgs.PictureSource @Nullable []getPictureSources()booleanisAutoCrop()
-
-
-
Constructor Detail
-
MediaComponentPropertyResolver
public MediaComponentPropertyResolver(@NotNull @NotNull org.apache.sling.api.resource.Resource resource, @NotNull @NotNull io.wcm.wcm.commons.component.ComponentPropertyResolverFactory componentPropertyResolverFactory)- Parameters:
resource- ResourcecomponentPropertyResolverFactory- Component property resolver factory
-
MediaComponentPropertyResolver
@Deprecated public MediaComponentPropertyResolver(@NotNull @NotNull org.apache.sling.api.resource.Resource resource)
Deprecated.- Parameters:
resource- Resource
-
-
Method Detail
-
isAutoCrop
public boolean isAutoCrop()
- Returns:
- AutoCrop state
-
getMediaFormatOptions
@NotNull public @NotNull MediaArgs.MediaFormatOption @Nullable [] getMediaFormatOptions()
- Returns:
- List of media formats with and without mandatory setting.
-
getMediaFormatNames
@NotNull public @NotNull String @Nullable [] getMediaFormatNames()
- Returns:
- List of media formats with and without mandatory setting.
-
getMandatoryMediaFormatNames
@NotNull public @NotNull String @Nullable [] getMandatoryMediaFormatNames()
- Returns:
- List of media formats with and without mandatory setting.
-
getImageSizes
@Nullable public @Nullable MediaArgs.ImageSizes getImageSizes()
- Returns:
- Image sizes
-
getPictureSources
@NotNull public @NotNull MediaArgs.PictureSource @Nullable [] getPictureSources()
- Returns:
- List of picture sources
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-