Interface SnippetAgent


public interface SnippetAgent
Agent providing access to stored element snippet information.
Since:
5.2.180704
  • Field Details

  • Method Details

    • getTypeIcon

      @Nullable @Nullable Image<?> getTypeIcon(@NotNull @NotNull IDProvider element)
      Provides a type image resource for the given element. Maybe null, if no type image is available.
      Parameters:
      element - The element that is to be rendered in report lists.
      Returns:
      An image or null if no image is to be shown.
      Since:
      5.2.180704
    • getSnippetProvider

      @NotNull @NotNull SnippetProvider getSnippetProvider(@NotNull @NotNull IDProvider element)
      Hands out a snippet provider for the given element or null, if no snippet provider is available. This is a convenience method for getSnippetProvider(IDProvider, Fallback) with default fallback configuration.
      Parameters:
      element - The element to provide for.
      Returns:
      A snippet provider or null.
      Since:
      5.2.180704
    • getSnippetProvider

      @NotNull @NotNull SnippetProvider getSnippetProvider(@NotNull @NotNull IDProvider element, @NotNull @NotNull SnippetAgent.Fallback fallback)
      Hands out a snippet provider for the given element applying the given fallback strategy.
      Parameters:
      element - The element to provide for.
      fallback - The fallback configuration.
      Returns:
      A snippet provider.
      Since:
      5.2.180704
    • getSnippetProvider

      @NotNull @NotNull SnippetProvider getSnippetProvider(@NotNull @NotNull FormData formData, @NotNull @NotNull Snippet snippet)
      Serves a snippet provider based on the given snippet and form data. Delegates to getSnippetProvider(FormData, Snippet, SnippetContext) employing the snippet context with its defined default values.
      Parameters:
      formData - The form data to base snippets on.
      snippet - The snippet definition.
      Returns:
      A snippet provider.
      Since:
      5.2.201206
    • getSnippetProvider

      @NotNull @NotNull SnippetProvider getSnippetProvider(@NotNull @NotNull FormData formData, @NotNull @NotNull Snippet snippet, @NotNull @NotNull SnippetContext context)
      Serves a snippet provider based on the given snippet and form data. Takes a mandatory snippet context to enable adding contextual information for the evaluation.
      Parameters:
      formData - The form data to base snippets on.
      snippet - The snippet definition.
      context - A snippet context provider
      Returns:
      A snippet provider.
      Since:
      5.2.201206
    • fallback

      @NotNull @NotNull SnippetAgent.Fallback fallback()
      Creates a new fallback configuration object with its default strategies in place.
      Returns:
      A fallback configuration object.
      Since:
      5.2.180704