biz.hammurapi.web.interaction
Class InteractionFactory

java.lang.Object
  extended bybiz.hammurapi.web.interaction.InteractionFactory
All Implemented Interfaces:
biz.hammurapi.config.Component, biz.hammurapi.sql.DataAccessObject

public class InteractionFactory
extends java.lang.Object
implements biz.hammurapi.sql.DataAccessObject, biz.hammurapi.config.Component

Creates and keeps cache of interaction instances.

Author:
Pavel Vlasov

Nested Class Summary
static class InteractionFactory.InteractionDefinition
          Interaction definition
 
Constructor Summary
InteractionFactory()
           
 
Method Summary
 InteractionInstance createInteractionInstance(int definitionId, java.lang.String exitUrl, java.util.Map context, java.lang.String user)
          Creates and returns interaction instance.
 biz.hammurapi.web.interaction.sql.InteractionEngine getEngine()
           
 biz.hammurapi.sql.IdentityManager getIdentityManager()
           
 InteractionFactory.InteractionDefinition getInteraction(int id)
          Gets instance from cache or loads from the database.
 InteractionInstance getInteractionInstance(int id)
          Gets instance from cache or loads from the database.
 PropertySetFactory getPropertySetFactory()
           
 void setOwner(java.lang.Object owner)
           
 void setSQLProcessor(biz.hammurapi.sql.SQLProcessor processor)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InteractionFactory

public InteractionFactory()
Method Detail

setSQLProcessor

public void setSQLProcessor(biz.hammurapi.sql.SQLProcessor processor)
                     throws java.sql.SQLException
Specified by:
setSQLProcessor in interface biz.hammurapi.sql.DataAccessObject
Throws:
java.sql.SQLException

getInteraction

public InteractionFactory.InteractionDefinition getInteraction(int id)
                                                        throws java.sql.SQLException
Gets instance from cache or loads from the database.

Parameters:
id -
Returns:
InteractionInstance
Throws:
java.sql.SQLException

getInteractionInstance

public InteractionInstance getInteractionInstance(int id)
                                           throws java.sql.SQLException
Gets instance from cache or loads from the database.

Parameters:
id -
Returns:
InteractionInstance
Throws:
java.sql.SQLException

createInteractionInstance

public InteractionInstance createInteractionInstance(int definitionId,
                                                     java.lang.String exitUrl,
                                                     java.util.Map context,
                                                     java.lang.String user)
                                              throws java.sql.SQLException,
                                                     HammurapiWebException
Creates and returns interaction instance.

Parameters:
definitionId - ID of interaction definition.
exitUrl - Url to redirect to after completion of the interaction.
context - evaluation context
Returns:
New interaction instance or null if before code returned false.
Throws:
java.sql.SQLException
HammurapiWebException

setOwner

public void setOwner(java.lang.Object owner)
Specified by:
setOwner in interface biz.hammurapi.config.Component

getPropertySetFactory

public PropertySetFactory getPropertySetFactory()

start

public void start()
           throws biz.hammurapi.config.ConfigurationException
Specified by:
start in interface biz.hammurapi.config.Component
Throws:
biz.hammurapi.config.ConfigurationException

stop

public void stop()
          throws biz.hammurapi.config.ConfigurationException
Specified by:
stop in interface biz.hammurapi.config.Component
Throws:
biz.hammurapi.config.ConfigurationException

getIdentityManager

public biz.hammurapi.sql.IdentityManager getIdentityManager()

getEngine

public biz.hammurapi.web.interaction.sql.InteractionEngine getEngine()


Copyright © 2006 Hammurapi Group. All Rights Reserved.