Interface RuntimeExtension

All Known Implementing Classes:
FormatFilterExtension, I18nRuntimeExtension, IncludeRuntimeExtension, JoinFilterExtension, ResourceRuntimeExtension, URIManipulationFilterExtension, UseRuntimeExtension, XSSRuntimeExtension

@ConsumerType public interface RuntimeExtension
A RuntimeExtension represents a HTL runtime construct that provides some processing capabilities for the various data-sly-* block elements.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The name of the runtime function that will process string formatting.
    static final String
    The name of the runtime function that will process i18n.
    static final String
    The name of the runtime function that will perform script execution delegation.
    static final String
    The name of the runtime function that will process join operations on arrays.
    static final String
    For OSGi environments this is the name of the service registration property indicating the RuntimeExtension name.
    static final String
    The name of the runtime function that will perform resource inclusion in the rendering process.
    static final String
    The name of the runtime function that will provide URI manipulation support.
    static final String
    The name of the runtime function that will provide the support for loading Use-API objects.
    static final String
    The name of the runtime function that will provide XSS escaping and filtering support.
  • Method Summary

    Modifier and Type
    Method
    Description
    call(RenderContext renderContext, Object... arguments)
    Call the RuntimeExtension
  • Field Details

    • FORMAT

      static final String FORMAT

      The name of the runtime function that will process string formatting. The function will receive the following parameters:

      1. the format String (e.g. 'Hello {0}, welcome to {1}')
      2. an array of objects that will replace the format placeholders

      For more details check https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/1.2/SPECIFICATION.md#122-format.

      See Also:
    • I18N

      static final String I18N

      The name of the runtime function that will process i18n. The function will receive the following parameters:

      1. the String to translate
      2. optional: locale information
      3. optional: hint information
      4. optional (not part of the specification): basename information; for more details see ResourceBundle.getBundle(String, java.util.Locale)

      For more details check https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/1.2/SPECIFICATION.md#123-i18n.

      See Also:
    • JOIN

      static final String JOIN

      The name of the runtime function that will process join operations on arrays. The function will receive the following parameters:

      1. the array of objects to join (e.g. [1, 2, 3])
      2. the join string (e.g. ';')

      For more details check https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/1.2/SPECIFICATION.md#124-array-join.

      See Also:
    • URI_MANIPULATION

      static final String URI_MANIPULATION

      The name of the runtime function that will provide URI manipulation support. The function will receive the following parameters:

      1. optional: a URI string to process
      2. optional: a Map containing URI manipulation options

      For more details check https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/1.2/SPECIFICATION.md#125-uri-manipulation.

      See Also:
    • XSS

      static final String XSS

      The name of the runtime function that will provide XSS escaping and filtering support. The function will receive the following parameters:

      1. the original string to escape / filter
      2. the context to be applied

      For more details check https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/1.2/SPECIFICATION.md#121-display-context.

      See Also:
    • INCLUDE

      static final String INCLUDE

      The name of the runtime function that will perform script execution delegation. The function will receive the following parameters:

      1. optional: the relative or absolute path of the script to execute
      2. optional: a Map of options to perform script include processing

      For more details about the supported options check https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/1.2/SPECIFICATION.md#228-include.

      See Also:
    • RESOURCE

      static final String RESOURCE

      The name of the runtime function that will perform resource inclusion in the rendering process. The function will receive the following parameters:

      1. optional: a relative or absolute path of the resource to be included
      2. optional: a Map containing the resource processing options

      For more details about the supported options check https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/1.2/SPECIFICATION.md#229-resource.

      See Also:
    • USE

      static final String USE

      The name of the runtime function that will provide the support for loading Use-API objects. The function will receive the following parameters:

      1. an identifier that allows to discover the Use-API object that needs to be loaded
      2. optional: a Map of the arguments that are passed to the Use-API object for initialisation or to provide context

      For more details check https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/1.2/SPECIFICATION.md#221-use.

      See Also:
    • NAME

      static final String NAME
      For OSGi environments this is the name of the service registration property indicating the RuntimeExtension name.
      See Also:
  • Method Details

    • call

      Object call(RenderContext renderContext, Object... arguments)
      Call the RuntimeExtension
      Parameters:
      renderContext - the runtime context
      arguments - the call arguments
      Returns:
      an extension instance