You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2021/06/09 13:37:57 UTC

[isis] 02/04: ISIS-2727: javadoc only

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch ISIS-2727
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 5afc51ccbdde47de459c6d08f15e76628fb130b9
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Jun 9 14:12:38 2021 +0100

    ISIS-2727: javadoc only
---
 .../core/interaction/session/InteractionLayer.java | 27 +++++++++++++++++-----
 1 file changed, 21 insertions(+), 6 deletions(-)

diff --git a/core/interaction/src/main/java/org/apache/isis/core/interaction/session/InteractionLayer.java b/core/interaction/src/main/java/org/apache/isis/core/interaction/session/InteractionLayer.java
index a548290..80c9560 100644
--- a/core/interaction/src/main/java/org/apache/isis/core/interaction/session/InteractionLayer.java
+++ b/core/interaction/src/main/java/org/apache/isis/core/interaction/session/InteractionLayer.java
@@ -23,28 +23,43 @@ import org.apache.isis.applib.services.iactnlayer.InteractionContext;
 
 import lombok.Getter;
 import lombok.NonNull;
+import lombok.RequiredArgsConstructor;
 
 /**
- * Provides the environment for an (or parts of an) user interaction to be executed.
+ * Binds the {@link Interaction} (&quot;what&quot; is being executed) with
+ * an {@link InteractionContext} (&quot;who&quot; is executing, &quot;when&quot; and &quot;where&quot;).
  *
  * <p>
- * These may be nested (held in a stack), for example for the {@link org.apache.isis.applib.services.sudo.SudoService},
- * or for fixtures that mock the clock.
+ * {@link InteractionLayer}s are so called because they may be nested (held in a stack).  For example the
+ * {@link org.apache.isis.applib.services.sudo.SudoService} creates a new temporary layer with a different
+ * {@link InteractionContext#getUser() user}, while fixtures that mock the clock switch out the
+ * {@link InteractionContext#getClock() clock}.
+ * </p>
  *
- * @since 2.0
+ * <p>
+ * The stack of layers is per-thread, managed by {@link InteractionFactory} as a thread-local).
+ * </p>
  *
+ * @since 2.0
  */
+@RequiredArgsConstructor
 public class InteractionLayer {
 
+	/**
+	 *
+	 * Current thread's {@link Interaction} which this layer belongs to.
+	 */
 	@Getter private final Interaction interaction;
+	/**
+	 * Represents the 		// binds given interaction context (which normally would hold the Authentication in its attribute map)
+	 * 		// to this layer
+	 */
 	@Getter private final InteractionContext interactionContext;
 
 	public InteractionLayer(
 			final @NonNull IsisInteraction interaction,
 			final @NonNull InteractionContext interactionContext) {
 
-		// current thread's Interaction which this layer belongs to,
-		// meaning the Interaction that holds the stack containing this layer
 		this.interaction = interaction;
 
 		// binds given interaction context (which normally would hold the Authentication in its attribute map)