Package com.aquima.web.controller
Class StartController
- java.lang.Object
-
- com.aquima.web.controller.StartController
-
@Controller @ServerContext public class StartController extends Object
This class is the main controller for creating an Aquima session and executing a flow. Note: in 9.7 theStartController
is introduced for Blueriq Mobile. This controller maps the same requests, but returns JSON messages instead of HTML as this controller does. To determine which controller to use, the Accept request header is checked to see if "application/json" is expected, in which case the JsonStartController will be used. In all other cases this controller will be used.- Since:
- 8.0
- Author:
- Danny Roest
-
-
Constructor Summary
Constructors Constructor Description StartController(com.blueriq.component.api.IAquimaEngineConfiguration config, com.blueriq.component.api.security.IAuthorisationManager authorisationManager, com.blueriq.component.api.IAquimaSessionsMap sessionManager, FlowStarter flowStarter, com.blueriq.component.api.shortcut.IShortcutManager shortcutsManager, ProductionProperties productionProperties, MvcRedirectHelper redirectHelper)
Creates a start which is the main controller for starting a aquima-interactions flow.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
closeSession(String sessionId)
void
createSession(org.springframework.web.context.request.WebRequest request, String projectName, String flow, String version, String languageCode, String aquimaUi, String theme, String channel, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse response)
String
getDefaultEntryPoint()
String
loginSuccess(org.springframework.web.context.request.WebRequest request, javax.servlet.http.HttpServletRequest servletRequest)
Object
logout(Boolean logout)
This method closes all Aquima sessions and redirects to the logout.html.void
setDefaultEntryPoint(String defaultEntryPoint)
void
setOpenIdConnectSettings(OpenIdConnectSettings openIdConnectSettings)
Object
startDefault(javax.servlet.http.HttpServletRequest request)
Object
startSession(org.springframework.web.context.request.WebRequest request, String projectName, String flow, String version, String languageCode, String aquimaUi, String theme, String channel, String testPath, String devTools)
Object
startShortcut(javax.servlet.http.HttpServletRequest request, String unsafeShortcut)
-
-
-
Field Detail
-
ROLES
public static final String ROLES
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StartController
@Autowired public StartController(com.blueriq.component.api.IAquimaEngineConfiguration config, com.blueriq.component.api.security.IAuthorisationManager authorisationManager, com.blueriq.component.api.IAquimaSessionsMap sessionManager, FlowStarter flowStarter, com.blueriq.component.api.shortcut.IShortcutManager shortcutsManager, ProductionProperties productionProperties, MvcRedirectHelper redirectHelper)
Creates a start which is the main controller for starting a aquima-interactions flow.- Parameters:
config
- the Aquima Engine configurationauthorisationManager
- the authorisation managersessionManager
- the session managerflowStarter
- the flowstartershortcutsManager
- the shortcut managerproductionProperties
- holds production propertiesredirectHelper
- the mvc redirect helper
-
-
Method Detail
-
setOpenIdConnectSettings
@Autowired(required=false) public void setOpenIdConnectSettings(OpenIdConnectSettings openIdConnectSettings)
-
startDefault
@RequestMapping(value="/start", params={"!project","!loginSuccess","!close","!logout"}) public Object startDefault(javax.servlet.http.HttpServletRequest request) throws Exception
- Throws:
Exception
-
startShortcut
@RequestMapping(value="/start/{shortcut}", params={"!project","!loginSuccess","!close","!logout"}) public Object startShortcut(javax.servlet.http.HttpServletRequest request, @PathVariable("shortcut") String unsafeShortcut) throws Exception
- Throws:
Exception
-
startSession
@RequestMapping(value="/start", params="project") public Object startSession(org.springframework.web.context.request.WebRequest request, @RequestParam("project") String projectName, @RequestParam(value="flow",required=false) String flow, @RequestParam(value="version",required=false) String version, @RequestParam(value="languageCode",required=false) String languageCode, @RequestParam(value="ui",required=false) String aquimaUi, @RequestParam(value="theme",required=false) String theme, @RequestParam(value="channel",required=false) String channel, @RequestParam(value="testPath",required=false) String testPath, @RequestParam(value="devtools",required=false) String devTools) throws Exception
- Throws:
Exception
-
createSession
@RequestMapping(value="/start", params={"create","project"}) public void createSession(org.springframework.web.context.request.WebRequest request, @RequestParam("project") String projectName, @RequestParam(value="flow",required=false) String flow, @RequestParam(value="version",required=false) String version, @RequestParam(value="languageCode",required=false) String languageCode, @RequestParam(value="ui",required=false) String aquimaUi, @RequestParam(value="theme",required=false) String theme, @RequestParam(value="channel",required=false) String channel, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse response) throws Exception
- Throws:
Exception
-
loginSuccess
@RequestMapping(value="/start", params="loginSuccess") public String loginSuccess(org.springframework.web.context.request.WebRequest request, javax.servlet.http.HttpServletRequest servletRequest) throws Exception
- Throws:
Exception
-
closeSession
@RequestMapping(value="/start", params="close") public String closeSession(@RequestParam(value="sessionId",required=false) String sessionId)
-
logout
@RequestMapping(value="/start", params="logout") public Object logout(@RequestParam("logout") Boolean logout)
This method closes all Aquima sessions and redirects to the logout.html.Note: this method returns a string, but its signature declares Object as return type, so it may be mocked using
MvcUriComponentsBuilder.fromMethodCall(Object)
, which requires that the return type is not final (java.lang.String is final).- Parameters:
logout
- boolean wheter to log out (unused).- Returns:
- The view (string)
-
getDefaultEntryPoint
public String getDefaultEntryPoint()
-
setDefaultEntryPoint
@Autowired(required=false) @Qualifier("defaultEntryPoint") public void setDefaultEntryPoint(String defaultEntryPoint)
-
-