Package com.adobe.cq.wcm.spi
Interface AssetDelivery
-
@ConsumerType public interface AssetDelivery
Implementations of this service interface declare themselves capable of handling asset delivery, primarily by accepting aResource
and an optionalMap
of desired transformations to be applied while delivering it.
Implementations must provide agetDeliveryURL(org.apache.sling.api.resource.Resource, java.util.Map<java.lang.String, java.lang.Object>)
method for this purpose, which should return a URL if it can handle the asset and its requested transforms, ornull
otherwise.
Multiple implementations of this service may exist at any given time, potentially with different service rankings; consumers of this service may choose to handle them as they deem fit.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getDeliveryURL(Resource resource, java.util.Map<java.lang.String,java.lang.Object> parameterMap)
This method returns the url to retrieve a specific asset with provided collection of Parameters.
-
-
-
Method Detail
-
getDeliveryURL
@Nullable java.lang.String getDeliveryURL(@Nonnull Resource resource, @Nullable java.util.Map<java.lang.String,java.lang.Object> parameterMap)
This method returns the url to retrieve a specific asset with provided collection of Parameters.- Parameters:
resource
- Resource for which delivery URL is neededparameterMap
- Collection of parameters that are required to fetch the url such as width, height quality etc.- Returns:
- delivery url from which asset can be retrieved, null if delivery url cannot be generated.
-
-