InteractionLayerTracker

Provides access to the current InteractionLayer .

The bottom-most interaction "layer" can be thought of as a short-lived session with the database. A new layer can be started, for example using the org.apache.causeway.applib.services.sudo.SudoService , or the InteractionService . These allow the user (or the clock or other environmental aspects) to be temporarily altered - similar to a "su" command in Unix.

API

InteractionLayerTracker.java
interface InteractionLayerTracker {
  Optional<InteractionLayer> currentInteractionLayer()     (1)
  InteractionLayer currentInteractionLayerElseFail()
  Optional<InteractionContext> currentInteractionContext()     (2)
  Optional<Interaction> currentInteraction()     (3)
}
1 currentInteractionLayer()
2 currentInteractionContext()

Returns the InteractionContext wrapped by the #currentInteractionLayer() (if within an InteractionLayer ).

3 currentInteraction()

Returns the Interaction wrapped by the #currentInteractionLayer() (if within an InteractionLayer ).

Members

currentInteractionLayer()

currentInteractionContext()

Returns the InteractionContext wrapped by the #currentInteractionLayer() (if within an InteractionLayer ).

currentInteraction()

Returns the Interaction wrapped by the #currentInteractionLayer() (if within an InteractionLayer ).

Implementation

The Core Runtime Services module provides a default implementation, InteractionServiceDefault.