Package com.adobe.cq.wcm.spi
Interface AssetDelivery
Implementations of this service interface declare themselves capable of handling asset delivery, primarily by accepting a
Implementations must provide a
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.
Resource
and an optional Map
of desired transformations to be applied while delivering it.Implementations must provide a
getDeliveryURL(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, or null
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
-
Method Details
-
getDeliveryURL
@Nullable String getDeliveryURL(@Nonnull Resource resource, @Nullable Map<String, 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.
-