Class 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 the StartController 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 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 configuration
        authorisationManager - the authorisation manager
        sessionManager - the session manager
        flowStarter - the flowstarter
        shortcutsManager - the shortcut manager
        productionProperties - holds production properties
        redirectHelper - 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)