Class EngineContext
java.lang.Object
se.swedenconnect.signservice.engine.session.EngineContext
The
EngineContext
is a wrapper for the SignServiceContext
that declares methods for context elements
that are used by the SignService engine.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SignServiceContext
Creates and initializes a newSignServiceContext
object.Gets the wrapped context.getId()
Gets the ID of the wrapped SignService context.Gets theIdentityAssertion
from the context.Gets whether the SignMessage was displayed.Gets theSignRequestMessage
from the context.getState()
Gets the operation state.void
putIdentityAssertion
(IdentityAssertion identityAssertion) Adds aIdentityAssertion
to the context.void
putSignMessageDisplayed
(Boolean signMessageDisplayed) Adds whether the SignMessage was displayed.void
putSignRequest
(SignRequestMessage signRequest) Adds aSignRequestMessage
to the context.void
Will reset the context to a new context.void
Marks the context as non-active, i.e., terminated.void
updateState
(SignOperationState newState) Updates the operation state.
-
Constructor Details
-
EngineContext
Constructor.- Parameters:
context
- the context that we wrap
-
-
Method Details
-
createSignServiceContext
Creates and initializes a newSignServiceContext
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
Gets the ID of the wrapped SignService context.- Returns:
- the ID
-
getContext
Gets the wrapped context.- Returns:
- the SignService context
-
getState
Gets the operation state.- Returns:
- the state
-
updateState
Updates the operation state.- Parameters:
newState
- the new state to set- Throws:
IllegalStateException
- if an illegal state transition is performed
-
putSignRequest
Adds aSignRequestMessage
to the context.- Parameters:
signRequest
- the SignRequest to add
-
getSignRequest
Gets theSignRequestMessage
from the context.- Returns:
- the SignRequest
-
putIdentityAssertion
Adds aIdentityAssertion
to the context.- Parameters:
identityAssertion
- the identity assertion to add
-
getIdentityAssertion
Gets theIdentityAssertion
from the context.- Returns:
- the identity assertion
-
putSignMessageDisplayed
Adds whether the SignMessage was displayed.- Parameters:
signMessageDisplayed
- whether SignMessage was displayed
-
getSignMessageDisplayed
Gets whether the SignMessage was displayed.- Returns:
- whether the SignMessage was displayed
-