Interface ToggleTileComponent<C extends ToggleTileComponent<C>>

All Superinterfaces:
Comparable<C>, Component<C>, Copyable<C>, CustomCssComponent<C>, Serializable, TileComponent<C>
All Known Implementing Classes:
DefaultToggleTileComponent

public interface ToggleTileComponent<C extends ToggleTileComponent<C>> extends TileComponent<C>
Represents the metadata for a TileComponentTypes.TOGGLE.
Since:
Metadata Service 2.0.8, Release Train 2.3.0
Author:
Julia Lopez-Pozas (jlopezpozas)
  • Method Details

    • icon

      default C icon(String icon)
      Sets the icon to be used for the toggle.

      See the Zondicons Icon list for a list of icon names available.

      Parameters:
      icon - the icon to be used for the toggle
      Returns:
      this
    • submitEndpoint

      default C submitEndpoint(Endpoint<?> endpoint)
      Configures the submit endpoint for the toggle. This endpoint is called when the tile component is clicked in order to submit using the toggle value.
      Parameters:
      endpoint - the submit endpoint
      Returns:
      this
    • submitEndpoint

      default C submitEndpoint(UnaryOperator<Endpoint<?>> fn)
      Configures the submit endpoint for the toggle. This endpoint is called when the tile component is clicked in order to submit using the toggle value.
      Parameters:
      fn - a function to configure the submit endpoint
      Returns:
      this
    • submitUrl

      default C submitUrl(String url)
      Returns:
      this
    • submitScope

      default C submitScope(String scope)
      Returns:
      this
    • submitUrl

      default C submitUrl(String url, String scope)
      Configures submitEndpoint(UnaryOperator) url and scope.
      Returns:
      this
    • getSubmitEndpoint

      default Endpoint<?> getSubmitEndpoint()
      Returns:
      the submit endpoint
    • findSubmitEndpoint

      default Optional<Endpoint<?>> findSubmitEndpoint()
      Returns:
      an optional with submit endpoint, or empty