Package com.aquima.web.api.service
Class SessionService
- java.lang.Object
-
- com.aquima.web.api.service.SessionService
-
@Service public class SessionService extends Object
Implementation helper for the SessionController which performs actions such as flowing.- Since:
- 9.2
- Author:
- A.Pragt
-
-
Constructor Summary
Constructors Constructor Description SessionService(ModelFactory modelFactory, IRuntimeKeyMapper runtimeKeyMapper)
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PageModel
getPageModel(com.blueriq.component.api.IAquimaSession session)
Subscribes a session with the specified session id to the specified subscription.void
handleEvent(com.aquima.interactions.portal.IPortalSession session, PageEvent event)
Handles page events using the specifiedPageEvent
.void
handleEvent(com.aquima.interactions.portal.IPortalSession session, PageEvent event, com.aquima.interactions.foundation.IValueFormatter formatter)
Handles page events using the specifiedPageEvent
.void
startFlow(com.aquima.interactions.portal.IPortalSession session, String flowName)
Starts a flow using the specified flowName.
-
-
-
Constructor Detail
-
SessionService
@Autowired public SessionService(ModelFactory modelFactory, IRuntimeKeyMapper runtimeKeyMapper)
Default constructor- Parameters:
modelFactory
- Model factory to use in this instance, cannot be null.
-
-
Method Detail
-
getPageModel
public PageModel getPageModel(com.blueriq.component.api.IAquimaSession session)
Subscribes a session with the specified session id to the specified subscription.- Parameters:
session
- The session to subscribe.- Returns:
- A
PageModel
instance with the the current page contents and language settings.
-
handleEvent
public void handleEvent(com.aquima.interactions.portal.IPortalSession session, PageEvent event)
Handles page events using the specifiedPageEvent
.- Parameters:
session
- Current portal session instance, not null.event
- Event data submitted by the page, not null.
-
handleEvent
public void handleEvent(com.aquima.interactions.portal.IPortalSession session, PageEvent event, com.aquima.interactions.foundation.IValueFormatter formatter)
Handles page events using the specifiedPageEvent
.- Parameters:
session
- Current portal session instance, not null.event
- Event data submitted by the page, not null.formatter
- The value formatter.
-
startFlow
public void startFlow(com.aquima.interactions.portal.IPortalSession session, String flowName)
Starts a flow using the specified flowName.- Parameters:
session
- Session instance to start the flow on, cannot be null.flowName
- Name of the flow to start, cannot be null or empty.
-
-