biz.hammurapi.web.interaction
Class InterActions

java.lang.Object
  extended bybiz.hammurapi.web.ActionsBase
      extended bybiz.hammurapi.web.interaction.InterActions

public class InterActions
extends ActionsBase


Nested Class Summary
 
Nested classes inherited from class biz.hammurapi.web.ActionsBase
ActionsBase.ErrorMessage
 
Field Summary
 
Fields inherited from class biz.hammurapi.web.ActionsBase
compositeDomSerializer, converter, REFERRER_HEADER
 
Constructor Summary
InterActions()
           
 
Method Summary
static java.util.Map createActionContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Creates web action context.
 java.lang.Object generate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Menu/interaction path
 void get(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static InteractionInstance.StepInstance getCurrentStep(biz.hammurapi.config.Context ctx)
          Retrieves current interaction step from the interaction factory and request parameters.
protected static biz.hammurapi.web.interaction.sql.InteractionEngine getEngine(javax.servlet.http.HttpServletRequest request)
           
 void getImage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static InteractionInstance getInstance(biz.hammurapi.config.Context ctx)
          Retrieves interaction instance using interaction factory and request parameters
 java.lang.Object getInstanceXml(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Returns XML-ized interaction instance for rendering.
 java.lang.Object getMenu(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Returns list of menus with interactions for AJAX tree.
 java.lang.Object getXml(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Retrieves interaction with steps and transitions to be XML-ized and rendered for viewing
 java.lang.Object next(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Proceeds to the next interaction step.
 java.lang.String path(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Menu/interaction path
 void save(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Stores interaction in the database.
 java.lang.Object start(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Starts interaction.
 java.lang.Object updateBindings(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class biz.hammurapi.web.ActionsBase
getGlobal, getMatched, getMenu, getReferrer, getRemoted, getUid, hasPermission, includeThisInPath, invoke, isBlank, java, request2xml, setReferrer, sql
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterActions

public InterActions()
Method Detail

getEngine

protected static biz.hammurapi.web.interaction.sql.InteractionEngine getEngine(javax.servlet.http.HttpServletRequest request)

save

public void save(javax.servlet.http.HttpServletRequest request,
                 javax.servlet.http.HttpServletResponse response)
          throws java.io.IOException
Stores interaction in the database.

Parameters:
request -
response -
Throws:
java.io.IOException

get

public void get(javax.servlet.http.HttpServletRequest request,
                javax.servlet.http.HttpServletResponse response)
         throws java.io.IOException
Throws:
java.io.IOException

getXml

public java.lang.Object getXml(javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse response)
                        throws java.lang.NumberFormatException,
                               java.sql.SQLException
Retrieves interaction with steps and transitions to be XML-ized and rendered for viewing

Parameters:
request -
response -
Returns:
Throws:
java.sql.SQLException
java.lang.NumberFormatException
java.sql.SQLException
java.lang.NumberFormatException

getImage

public void getImage(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws java.lang.NumberFormatException,
                     java.sql.SQLException,
                     java.io.IOException
Throws:
java.lang.NumberFormatException
java.sql.SQLException
java.io.IOException

start

public java.lang.Object start(javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response)
                       throws java.sql.SQLException,
                              HammurapiWebException
Starts interaction. Parameters: interaction_id - ID of interaction to start. EXIT_URL - URL to redirect to after finishing interaction.

Parameters:
request -
response -
Throws:
java.sql.SQLException
HammurapiWebException
java.lang.NumberFormatException

next

public java.lang.Object next(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)
                      throws java.lang.NumberFormatException,
                             java.sql.SQLException,
                             HammurapiWebException
Proceeds to the next interaction step. Parameters: step_id - ID of step instance which has been processed.

Parameters:
request -
response -
Throws:
java.sql.SQLException
java.lang.NumberFormatException
HammurapiWebException

createActionContext

public static java.util.Map createActionContext(javax.servlet.http.HttpServletRequest request,
                                                javax.servlet.http.HttpServletResponse response)
Creates web action context.

Parameters:
request -
response -
Returns:

getMenu

public java.lang.Object getMenu(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response)
                         throws java.sql.SQLException
Returns list of menus with interactions for AJAX tree.

Parameters:
request -
response -
Returns:
Throws:
java.sql.SQLException
java.sql.SQLException
biz.hammurapi.config.ConfigurationException

path

public java.lang.String path(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)
                      throws java.lang.NumberFormatException,
                             java.sql.SQLException
Menu/interaction path

Parameters:
request -
response -
Returns:
Throws:
java.lang.NumberFormatException
java.sql.SQLException

updateBindings

public java.lang.Object updateBindings(javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response)
                                throws java.lang.NumberFormatException,
                                       java.sql.SQLException
Throws:
java.lang.NumberFormatException
java.sql.SQLException

getInstanceXml

public java.lang.Object getInstanceXml(javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response)
                                throws java.sql.SQLException
Returns XML-ized interaction instance for rendering. Parameters: ID - instance ID.

Parameters:
request -
response -
Throws:
java.sql.SQLException
java.lang.NumberFormatException

getInstance

public static InteractionInstance getInstance(biz.hammurapi.config.Context ctx)
                                       throws HammurapiWebException,
                                              java.sql.SQLException
Retrieves interaction instance using interaction factory and request parameters

Returns:
Throws:
HammurapiWebException
java.lang.NumberFormatException
java.sql.SQLException

getCurrentStep

public static InteractionInstance.StepInstance getCurrentStep(biz.hammurapi.config.Context ctx)
                                                       throws HammurapiWebException,
                                                              java.lang.NumberFormatException,
                                                              java.sql.SQLException
Retrieves current interaction step from the interaction factory and request parameters.

Returns:
Throws:
HammurapiWebException
java.sql.SQLException
java.lang.NumberFormatException

generate

public java.lang.Object generate(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response)
                          throws java.sql.SQLException,
                                 java.io.IOException
Menu/interaction path

Parameters:
request -
response -
Returns:
Throws:
java.lang.NumberFormatException
java.sql.SQLException
java.io.IOException


Copyright © 2006 Hammurapi Group. All Rights Reserved.