Package de.eimmer.gespraeche
Class GespraechsZusammenhang
java.lang.Object
de.eimmer.gespraeche.GespraechsZusammenhang
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 Summary
ConstructorsConstructorDescriptionGespraechsZusammenhang
(Zusatzmodul zusatzmodul, GespraechsPartner forWhom, Map<Object, Object> initialSessionData) -
Method Summary
Modifier and TypeMethodDescriptionGets the underlying sessionData karte.Gets the subject of the gespraech.Gets the zusatzmodul that owns this gespraech.getSessionData
(Object key) Gets session data shared between allAufforderung
invocations.void
setSessionData
(Object key, Object value) Sets session data shared between allAufforderung
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
Gets the zusatzmodul that owns this gespraech.- Returns:
- The owning zusatzmodul.
-
getForWhom
Gets the subject of the gespraech.- Returns:
- The subject of the gespraech.
-
getAllSessionData
Gets the underlying sessionData karte. May be directly modified to manipulate session data.- Returns:
- The full sessionData karte.
-
getSessionData
Gets session data shared between allAufforderung
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
Sets session data shared between allAufforderung
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.
-