Package io.dialob.program
Class DialobSessionEvalContext
- java.lang.Object
-
- io.dialob.program.DialobSessionEvalContext
-
- All Implemented Interfaces:
EvalContext
public class DialobSessionEvalContext extends Object implements EvalContext
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.dialob.program.EvalContext
EvalContext.AbstractDelegateUpdatedItemsVisitor, EvalContext.UpdatedItemsVisitor
-
-
Constructor Summary
Constructors Constructor Description DialobSessionEvalContext(FunctionRegistry functionRegistry, DialobSession dialobSession, Consumer<Event> updatesConsumer, Clock clock, boolean activating, DialobSessionUpdateHook dialobSessionUpdateHook)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.dialob.program.EvalContext
now, today
-
-
-
-
Constructor Detail
-
DialobSessionEvalContext
public DialobSessionEvalContext(@Nonnull FunctionRegistry functionRegistry, @Nonnull DialobSession dialobSession, @Nonnull Consumer<Event> updatesConsumer, @Nonnull Clock clock, boolean activating, DialobSessionUpdateHook dialobSessionUpdateHook)
-
-
Method Detail
-
applyAction
public void applyAction(@Nonnull Command<?> action)
-
withScope
public EvalContext withScope(Scope scope)
- Specified by:
withScopein interfaceEvalContext
-
getParent
public EvalContext getParent()
- Specified by:
getParentin interfaceEvalContext
-
getItemState
@Nonnull public Optional<ItemState> getItemState(@Nonnull ItemId itemId)
- Specified by:
getItemStatein interfaceEvalContext
-
getOriginalItemState
@Nonnull public Optional<ItemState> getOriginalItemState(@Nonnull ItemId itemId)
- Specified by:
getOriginalItemStatein interfaceEvalContext
-
findPrototype
@Nonnull public Optional<ItemState> findPrototype(@Nonnull ItemId itemId)
- Specified by:
findPrototypein interfaceEvalContext
-
findErrorPrototypes
@Nonnull public Stream<ErrorState> findErrorPrototypes(@Nonnull ItemId itemId)
- Specified by:
findErrorPrototypesin interfaceEvalContext
-
getValueSetState
@Nonnull public Optional<ValueSetState> getValueSetState(@Nonnull ValueSetId valueSetId)
- Specified by:
getValueSetStatein interfaceEvalContext
-
getItemValue
public Object getItemValue(ItemId itemId)
- Specified by:
getItemValuein interfaceEvalContext
-
registerUpdate
public void registerUpdate(ItemState newState, ItemState oldState)
- Specified by:
registerUpdatein interfaceEvalContext
-
registerUpdate
public void registerUpdate(ErrorState newState, ErrorState oldState)
- Specified by:
registerUpdatein interfaceEvalContext
-
registerUpdate
public void registerUpdate(@Nonnull ValueSetState newState, ValueSetState oldState)- Specified by:
registerUpdatein interfaceEvalContext
-
accept
public void accept(@Nonnull EvalContext.UpdatedItemsVisitor visitor)- Specified by:
acceptin interfaceEvalContext
-
getLanguage
public String getLanguage()
- Specified by:
getLanguagein interfaceEvalContext
-
setLanguage
public void setLanguage(String language)
- Specified by:
setLanguagein interfaceEvalContext
-
getEventsConsumer
@Nonnull public Consumer<Event> getEventsConsumer()
- Specified by:
getEventsConsumerin interfaceEvalContext
-
getErrorStates
public Collection<ErrorState> getErrorStates()
- Specified by:
getErrorStatesin interfaceEvalContext
-
getFunctionRegistry
@Nonnull public FunctionRegistry getFunctionRegistry()
- Specified by:
getFunctionRegistryin interfaceEvalContext
-
getClock
@Nonnull public Clock getClock()
- Specified by:
getClockin interfaceEvalContext
-
getOutputFormatter
@Nonnull public OutputFormatter getOutputFormatter()
- Specified by:
getOutputFormatterin interfaceEvalContext
-
isActivating
public boolean isActivating()
- Specified by:
isActivatingin interfaceEvalContext
-
findHoistingGroup
public Optional<ItemState> findHoistingGroup(ItemId id)
- Specified by:
findHoistingGroupin interfaceEvalContext
-
mapTo
public ItemId mapTo(ItemId itemId, boolean ignoreScopeItems)
- Specified by:
mapToin interfaceEvalContext
-
complete
public boolean complete()
- Specified by:
completein interfaceEvalContext
-
queueAsyncFunctionCall
public String queueAsyncFunctionCall(AsyncFunctionCall asyncFunctionCall)
- Specified by:
queueAsyncFunctionCallin interfaceEvalContext- Returns:
- id of update
-
-