Interface AssetDelivery


@ConsumerType public interface AssetDelivery
Implementations of this service interface declare themselves capable of handling asset delivery, primarily by accepting a 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

    Modifier and Type
    Method
    Description
    getDeliveryURL(Resource resource, Map<String,Object> parameterMap)
    This method returns the url to retrieve a specific asset with provided collection of Parameters.
  • 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 needed
      parameterMap - 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.