Interface Record<T>

  • Type Parameters:
    T - the type of values for this record
    All Known Implementing Classes:
    RenderUnit

    @ConsumerType
    public interface Record<T>
    A Record is a key-value immutable object understood by the HTL runtime, used for abstracting complex objects like Sightly templates (declared with the data-sly-template block element) or objects that need to be translated from Java to JavaScript and back.
    • Method Detail

      • getProperty

        T getProperty​(java.lang.String name)
        Gets the value of a specified property.
        Parameters:
        name - the name of the property
        Returns:
        the value of the property or null if this record does not have the specified property
      • getPropertyNames

        java.util.Set<java.lang.String> getPropertyNames()
        Gets the set of names for this record's properties.
        Returns:
        this record's properties' names