Class EngineContext

java.lang.Object
se.swedenconnect.signservice.engine.session.EngineContext

public class EngineContext extends Object
The EngineContext is a wrapper for the SignServiceContext that declares methods for context elements that are used by the SignService engine.
  • Constructor Details

    • EngineContext

      public EngineContext(SignServiceContext context)
      Constructor.
      Parameters:
      context - the context that we wrap
  • Method Details

    • createSignServiceContext

      public static SignServiceContext createSignServiceContext()
      Creates and initializes a new SignServiceContext object.
      Returns:
      a SignServiceContext object
    • terminateContext

      public void terminateContext()
      Marks the context as non-active, i.e., terminated.
    • resetContext

      public void resetContext()
      Will reset the context to a new context.
    • getId

      public String getId()
      Gets the ID of the wrapped SignService context.
      Returns:
      the ID
    • getContext

      public SignServiceContext getContext()
      Gets the wrapped context.
      Returns:
      the SignService context
    • getState

      public SignOperationState getState()
      Gets the operation state.
      Returns:
      the state
    • updateState

      public void updateState(SignOperationState newState) throws IllegalStateException
      Updates the operation state.
      Parameters:
      newState - the new state to set
      Throws:
      IllegalStateException - if an illegal state transition is performed
    • putSignRequest

      public void putSignRequest(SignRequestMessage signRequest)
      Adds a SignRequestMessage to the context.
      Parameters:
      signRequest - the SignRequest to add
    • getSignRequest

      public SignRequestMessage getSignRequest()
      Gets the SignRequestMessage from the context.
      Returns:
      the SignRequest
    • putIdentityAssertion

      public void putIdentityAssertion(IdentityAssertion identityAssertion)
      Adds a IdentityAssertion to the context.
      Parameters:
      identityAssertion - the identity assertion to add
    • getIdentityAssertion

      public IdentityAssertion getIdentityAssertion()
      Gets the IdentityAssertion from the context.
      Returns:
      the identity assertion
    • putSignMessageDisplayed

      public void putSignMessageDisplayed(Boolean signMessageDisplayed)
      Adds whether the SignMessage was displayed.
      Parameters:
      signMessageDisplayed - whether SignMessage was displayed
    • getSignMessageDisplayed

      public Boolean getSignMessageDisplayed()
      Gets whether the SignMessage was displayed.
      Returns:
      whether the SignMessage was displayed