Class ActivityDefinition.Builder

java.lang.Object
dev.learning.xapi.model.ActivityDefinition.Builder
Enclosing class:
ActivityDefinition

public static class ActivityDefinition.Builder extends Object
Builder for ActivityDefinition.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • addName

      public ActivityDefinition.Builder addName(Locale key, String value)
      Adds a human readable name of the Activity.
      Parameters:
      key - The key of the entry.
      value - The value of the entry.
      Returns:
      This builder
      See Also:
      • ActivityDefinition.name
    • addDescription

      public ActivityDefinition.Builder addDescription(Locale key, String value)
      Adds a description of the Activity.
      Parameters:
      key - The key of the entry.
      value - The value of the entry.
      Returns:
      This builder
      See Also:
      • ActivityDefinition.description
    • addChoice

      public ActivityDefinition.Builder addChoice(Consumer<InteractionComponent.Builder> interactionComponent)
      Consumer Builder for adding a choice option.
      Parameters:
      interactionComponent - The Consumer Builder for interactionComponent.
      Returns:
      This builder
      See Also:
      • ActivityDefinition.choices
    • addChoice

      public ActivityDefinition.Builder addChoice(InteractionComponent interactionComponent)
      Adds a choice option.
      Parameters:
      interactionComponent - The interactionComponent to add.
      Returns:
      This builder
      See Also:
      • ActivityDefinition.choices