Package io.wcm.handler.media
Class MediaRequest
- java.lang.Object
-
- io.wcm.handler.media.MediaRequest
-
@ProviderType public final class MediaRequest extends Object
Holds all properties that are part of a media handling request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMediaRequest.MediaPropertyNamesDefines property names to read media parameters from for this media request.
-
Constructor Summary
Constructors Constructor Description MediaRequest(@NotNull String mediaRef, @Nullable MediaArgs mediaArgs)MediaRequest(@NotNull org.apache.sling.api.resource.Resource resource, @Nullable MediaArgs mediaArgs)MediaRequest(@Nullable org.apache.sling.api.resource.Resource resource, @Nullable String mediaRef, @Nullable MediaArgs mediaArgs, @Nullable MediaRequest.MediaPropertyNames mediaPropertyNames)MediaRequest(@Nullable org.apache.sling.api.resource.Resource resource, @Nullable String mediaRef, @Nullable MediaArgs mediaArgs, @Nullable String refProperty, @Nullable String cropProperty)Deprecated.MediaRequest(@Nullable org.apache.sling.api.resource.Resource resource, @Nullable String mediaRef, @Nullable MediaArgs mediaArgs, @Nullable String refProperty, @Nullable String cropProperty, @Nullable String rotationProperty)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description @Nullable StringgetCropProperty()Deprecated.Please usegetMediaPropertyNames().@NotNull MediaArgsgetMediaArgs()@NotNull MediaRequest.MediaPropertyNamesgetMediaPropertyNames()@Nullable StringgetMediaRef()@Nullable StringgetRefProperty()Deprecated.Please usegetMediaPropertyNames().@Nullable org.apache.sling.api.resource.ResourcegetResource()@NotNull org.apache.sling.api.resource.ValueMapgetResourceProperties()@Nullable StringgetRotationProperty()Deprecated.Please usegetMediaPropertyNames().StringtoString()
-
-
-
Constructor Detail
-
MediaRequest
public MediaRequest(@NotNull @NotNull org.apache.sling.api.resource.Resource resource, @Nullable @Nullable MediaArgs mediaArgs)- Parameters:
resource- Resource containing reference to media assetmediaArgs- Additional arguments affection media resolving
-
MediaRequest
public MediaRequest(@NotNull @NotNull String mediaRef, @Nullable @Nullable MediaArgs mediaArgs)- Parameters:
mediaRef- Reference to media itemmediaArgs- Additional arguments affection media resolving
-
MediaRequest
@Deprecated public MediaRequest(@Nullable @Nullable org.apache.sling.api.resource.Resource resource, @Nullable @Nullable String mediaRef, @Nullable @Nullable MediaArgs mediaArgs, @Nullable @Nullable String refProperty, @Nullable @Nullable String cropProperty)
Deprecated.- Parameters:
resource- Resource containing reference to media assetmediaRef- Reference to media itemmediaArgs- Additional arguments affection media resolvingrefProperty- Name of the property from which the media reference is readcropProperty- Name of the property which contains the cropping parameters
-
MediaRequest
@Deprecated public MediaRequest(@Nullable @Nullable org.apache.sling.api.resource.Resource resource, @Nullable @Nullable String mediaRef, @Nullable @Nullable MediaArgs mediaArgs, @Nullable @Nullable String refProperty, @Nullable @Nullable String cropProperty, @Nullable @Nullable String rotationProperty)
Deprecated.- Parameters:
resource- Resource containing reference to media assetmediaRef- Reference to media itemmediaArgs- Additional arguments affection media resolvingrefProperty- Name of the property from which the media reference is readcropProperty- Name of the property which contains the cropping parametersrotationProperty- Name of the property which contains the rotation parameter
-
MediaRequest
public MediaRequest(@Nullable @Nullable org.apache.sling.api.resource.Resource resource, @Nullable @Nullable String mediaRef, @Nullable @Nullable MediaArgs mediaArgs, @Nullable @Nullable MediaRequest.MediaPropertyNames mediaPropertyNames)- Parameters:
resource- Resource containing reference to media assetmediaRef- Reference to media itemmediaArgs- Additional arguments affection media resolvingmediaPropertyNames- Defines property names to read media parameters from for this media request.
-
-
Method Detail
-
getResource
@Nullable public @Nullable org.apache.sling.api.resource.Resource getResource()
- Returns:
- Resource containing reference to media asset
-
getMediaRef
@Nullable public @Nullable String getMediaRef()
- Returns:
- Reference to media item
-
getMediaArgs
@NotNull public @NotNull MediaArgs getMediaArgs()
- Returns:
- Additional arguments affection media resolving
-
getMediaPropertyNames
@NotNull public @NotNull MediaRequest.MediaPropertyNames getMediaPropertyNames()
- Returns:
- Defines property names to read media parameters from for this media request.
-
getRefProperty
@Deprecated @Nullable public @Nullable String getRefProperty()
Deprecated.Please usegetMediaPropertyNames().- Returns:
- Name of the property from which the media reference is read
-
getCropProperty
@Deprecated @Nullable public @Nullable String getCropProperty()
Deprecated.Please usegetMediaPropertyNames().- Returns:
- Name of the property which contains the cropping parameters
-
getRotationProperty
@Deprecated @Nullable public @Nullable String getRotationProperty()
Deprecated.Please usegetMediaPropertyNames().- Returns:
- Name of the property which contains the rotation parameter
-
getResourceProperties
@NotNull public @NotNull org.apache.sling.api.resource.ValueMap getResourceProperties()
- Returns:
- Properties from resource containing target link. The value map is a copy of the original map so it is safe to change the property values contained in the map.
-
-