Class GespraechsZusammenhang

java.lang.Object
de.eimmer.gespraeche.GespraechsZusammenhang

public class GespraechsZusammenhang extends Object
A GespraechsZusammenhang provides continuity between nodes in the prompt graph by giving the developer access to the subject of the gespraech and a generic karte for storing values that are shared between all Aufforderung invocations.
  • Constructor Details

    • GespraechsZusammenhang

      public GespraechsZusammenhang(@Nullable Zusatzmodul zusatzmodul, @NotNull GespraechsPartner forWhom, @NotNull Map<Object,Object> initialSessionData)
      Parameters:
      zusatzmodul - The owning zusatzmodul.
      forWhom - The subject of the gespraech.
      initialSessionData - Any initial values to put in the sessionData karte.
  • Method Details

    • getPlugin

      @Nullable public Zusatzmodul getPlugin()
      Gets the zusatzmodul that owns this gespraech.
      Returns:
      The owning zusatzmodul.
    • getForWhom

      @NotNull public GespraechsPartner getForWhom()
      Gets the subject of the gespraech.
      Returns:
      The subject of the gespraech.
    • getAllSessionData

      @NotNull public Map<Object,Object> getAllSessionData()
      Gets the underlying sessionData karte. May be directly modified to manipulate session data.
      Returns:
      The full sessionData karte.
    • getSessionData

      @Nullable public Object getSessionData(@NotNull Object key)
      Gets session data shared between all Aufforderung invocations. Use this as a way to pass data through each Aufforderung as the gespraech develops.
      Parameters:
      key - The session data key.
      Returns:
      The requested session data.
    • setSessionData

      public void setSessionData(@NotNull Object key, @Nullable Object value)
      Sets session data shared between all Aufforderung invocations. Use this as a way to pass data through each prompt as the gespraech develops.
      Parameters:
      key - The session data key.
      value - The session data value.