Class TransactionIdContext

java.lang.Object
org.forgerock.services.context.AbstractContext
org.forgerock.services.context.TransactionIdContext
All Implemented Interfaces:
Context

public class TransactionIdContext extends AbstractContext
This context aims to hold the TransactionId.
  • Constructor Details

    • TransactionIdContext

      public TransactionIdContext(Context parent, TransactionId transactionId)
      Constructs a new TransactionIdContext.
      Parameters:
      parent - The parent context
      transactionId - The transaction id to use in this context
    • TransactionIdContext

      public TransactionIdContext(JsonValue savedContext, ClassLoader classLoader)
      Restores a saved context.
      Parameters:
      savedContext - The saved state.
      classLoader - The ClassLoader to use.
  • Method Details

    • getTransactionId

      public TransactionId getTransactionId()
      Returns the transaction id.
      Returns:
      the transaction id
    • toJsonValue

      public JsonValue toJsonValue()
      Updates the data object to have the current transactionId state. Return this Context as a JsonValue (for persistence).
      Specified by:
      toJsonValue in interface Context
      Overrides:
      toJsonValue in class AbstractContext
      Returns:
      the Context data as a JsonValue.