Interface ContentVariableProvider


public interface ContentVariableProvider
Extensible interface allowing pluggable content variables to be used in the PropertyAggregatorService to allow for replacement in content responses.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accepts(org.apache.sling.api.SlingHttpServletRequest request)
    Determines whether or not the current ContentVariableProvider will accept the request.
    void
    addProperties(Map<String,Object> map, org.apache.sling.api.SlingHttpServletRequest request)
    Method to add the properties to the passed map.
  • Method Details

    • addProperties

      void addProperties(Map<String,Object> map, org.apache.sling.api.SlingHttpServletRequest request)
      Method to add the properties to the passed map. This will be overridden to run custom logic and add properties to the Map.
      Parameters:
      map - The current set of properties (may or may not be empty)
      request - The request used as the context to add properties.
    • accepts

      boolean accepts(org.apache.sling.api.SlingHttpServletRequest request)
      Determines whether or not the current ContentVariableProvider will accept the request. This can limit what providers to use and allow for more contextual content variables in a multi-tenant situation.
      Parameters:
      request - The current request
      Returns:
      Whether the ContentVariableProvider should add variables to the property map