nl.innovationinvestments.cheyenne.engine
Class Dialog

java.lang.Object
  extended by nl.innovationinvestments.cheyenne.engine.Dialog

public abstract class Dialog
extends java.lang.Object

This is the base class for every Cheyenne dialog. Legacy mode: - JDBC: autoCommit - SQL: strings, no binding Default mode: - JDBC: transaction (autocommit upon dialog exit) - SQL: all parameters through binding


Nested Class Summary
static class Dialog.ESCAPING
           
 
Field Summary
static java.lang.String SOURCECODE_VERSION
          Standard variable for determining version of a class file.
 
Constructor Summary
Dialog()
           
 
Method Summary
 java.sql.Connection borrowJdbcConnection(java.lang.String id)
          JdbcConnection
 void commit()
          commit all connections and return them to the pool
protected  java.lang.String convertToString(java.lang.Object o)
           
protected  void dialogSection()
           
 void enteringLoop(Loop loop)
           
 java.util.List<DataSet> fillAndRememberFlashContext()
           
 DataSet findDataSetById(java.lang.String id)
          Find the data set by ID
 void generateDialog()
           
 void generateDialog(boolean clearData)
          generate a dialog
 void generateDialogInit()
          prepare running the generate dialog This is a separate method because logically this code belongs in the generateDialog method, however due to multithreading issues it must be run prior to spawning the two thread (generateDialog & XSLT).
 void generateDialogThroughXSLT(java.lang.String id)
          generate a dialog (using a new thread)
 java.lang.String getApp()
           
 java.lang.String getContentType()
           
 Context getContext()
           
 Loop getCurrentLoop()
           
 java.lang.String getDefaultJdbcConnectionName()
           
 java.lang.String getDiagMode()
           
 java.lang.String getEncoding()
           
 Dialog.ESCAPING getEscaping()
           
 java.lang.String getId()
          Id
 java.lang.String getIdFull()
           
 java.lang.String getLanguage()
           
 int getLanguageIdx(java.lang.String[] languages)
           
 boolean getLegacyMode()
           
 Loop getLoop(int level)
          Get the loop
 java.util.List<Loop> getLoops()
          Return all loops, index = 0 is current loop
 java.lang.String getNextUrl()
           
 java.io.PrintWriter getPrintWriter()
           
 java.lang.String getRole()
           
 java.lang.String getTarget()
           
 java.lang.String getUser()
           
protected  void initialize()
           
 void leavingLoop(Loop loop)
           
 void loadDialog()
           
 void loadDialog(boolean clearData)
           
protected  void loadSection()
           
 Assign newAssign()
          Return a instance of this tag (optionally from a pool)
 DatasetAction newDatasetAction()
           
 If newIf()
          Return a instance of this tag (optionally from a pool)
 Loop newLoop()
          Return a instance of this tag (optionally from a pool)
 Redirect newRedirect()
          Return a instance of this tag (optionally from a pool)
 Sql newSql()
          Return a instance of this tag (optionally from a pool)
 Textfile newTextfile()
          Return a instance of this tag (optionally from a pool)
 java.util.Map<java.lang.String,java.lang.String> outParameters()
          outParameters is used for requesting the output parameters and the content for example the soap message receiver
 void pickupFlashContext()
          Pick up an existing flash dataset from the session and move it to the old-flashcontext
protected  void print(java.lang.String x)
          Output to writer
 void registerDataSet(DataSet dataSet)
          Newest dataset is put at #0
 void rememberFlashContext(java.util.List<DataSet> flashDataSets)
          Also used by the CheyenneServlet
 java.lang.String resolve(java.lang.String input)
           
 java.lang.String resolve(java.lang.String input, Dialog.ESCAPING escaping)
          This will resolve all variables (or even nested variables) in the input string.
 java.lang.String resolveColumnName(java.lang.String input)
           
 java.lang.Object resolveInAssign(java.lang.String name)
           
 java.lang.Object resolveInDataset(java.lang.String name)
           
 java.lang.String resolveInParent(java.lang.String variableName)
           
 java.lang.String resolveSingleVariable(java.lang.String variableName)
          This will resolve a single variable (% are already stripped) First the data set is searched Secondly the input parameters Thirdly the configuration parameters
 java.lang.String resolveWithoutEscapingTheResult(java.lang.String input)
          This will resolve all variables (or even nested variables) in the input string
 void returnConnection(java.lang.String id, java.sql.Connection connection)
           
 void rollback()
          rollback all connections and return them to the pool
 void setApp(java.lang.String value)
          App
 void setAssign(java.lang.String id, java.lang.Object value)
           
 void setContentType(java.lang.String value)
          ContentType
 void setContext(Context value)
          Context
 void setDefaultJdbcConnectionName(java.lang.String value)
          DefaultJdbcConnectionName
 void setDiagMode(java.lang.String value)
           
 void setEncoding(java.lang.String value)
          Encoding @see http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html
 void setEscaping(Dialog.ESCAPING value)
          Escaping
 void setLanguage(java.lang.String value)
          Language
 void setLegacyMode(boolean value)
          LegacyMode
 void setNextUrl(java.lang.String value)
          NextUrl
 void setPrintWriter(java.io.PrintWriter value)
          PrintWriter
 void setRole(java.lang.String value)
          Role
 void setTarget(java.lang.String value)
          Target
protected  void setupFromContext()
           
 void setUser(java.lang.String value)
          User
 void submitDialog()
           
 void submitDialog(boolean clearData)
          submit a dialog Use this method to optionally clear the data (for unittests)
protected  void submitSection()
           
 void unregisterAllDataSets()
           
 void unregisterDataSet(DataSet dataSet)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCECODE_VERSION

public static final java.lang.String SOURCECODE_VERSION
Standard variable for determining version of a class file.

See Also:
Constant Field Values
Constructor Detail

Dialog

public Dialog()
Method Detail

setupFromContext

protected void setupFromContext()

setContext

public void setContext(Context value)
Context


getContext

public Context getContext()

setEncoding

public void setEncoding(java.lang.String value)
Encoding @see http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html


getEncoding

public java.lang.String getEncoding()

setContentType

public void setContentType(java.lang.String value)
ContentType


getContentType

public java.lang.String getContentType()

setDefaultJdbcConnectionName

public void setDefaultJdbcConnectionName(java.lang.String value)
DefaultJdbcConnectionName


getDefaultJdbcConnectionName

public java.lang.String getDefaultJdbcConnectionName()

setNextUrl

public void setNextUrl(java.lang.String value)
NextUrl


getNextUrl

public java.lang.String getNextUrl()

getId

public java.lang.String getId()
Id


getIdFull

public java.lang.String getIdFull()

setPrintWriter

public void setPrintWriter(java.io.PrintWriter value)
PrintWriter


getPrintWriter

public java.io.PrintWriter getPrintWriter()

setLegacyMode

public void setLegacyMode(boolean value)
LegacyMode


getLegacyMode

public boolean getLegacyMode()

setEscaping

public void setEscaping(Dialog.ESCAPING value)
Escaping


getEscaping

public Dialog.ESCAPING getEscaping()

setTarget

public void setTarget(java.lang.String value)
Target


getTarget

public java.lang.String getTarget()

setApp

public void setApp(java.lang.String value)
App


getApp

public java.lang.String getApp()

setRole

public void setRole(java.lang.String value)
Role


getRole

public java.lang.String getRole()

setUser

public void setUser(java.lang.String value)
User


getUser

public java.lang.String getUser()

setLanguage

public void setLanguage(java.lang.String value)
Language


getLanguage

public java.lang.String getLanguage()

setDiagMode

public void setDiagMode(java.lang.String value)

getDiagMode

public java.lang.String getDiagMode()

borrowJdbcConnection

public java.sql.Connection borrowJdbcConnection(java.lang.String id)
JdbcConnection


returnConnection

public void returnConnection(java.lang.String id,
                             java.sql.Connection connection)

commit

public void commit()
commit all connections and return them to the pool


rollback

public void rollback()
rollback all connections and return them to the pool


initialize

protected void initialize()

loadSection

protected void loadSection()

dialogSection

protected void dialogSection()

submitSection

protected void submitSection()

loadDialog

public void loadDialog(boolean clearData)
Parameters:
clearData -

loadDialog

public void loadDialog()

generateDialogInit

public void generateDialogInit()
prepare running the generate dialog This is a separate method because logically this code belongs in the generateDialog method, however due to multithreading issues it must be run prior to spawning the two thread (generateDialog & XSLT).


generateDialog

public void generateDialog(boolean clearData)
generate a dialog


generateDialog

public void generateDialog()

generateDialogThroughXSLT

public void generateDialogThroughXSLT(java.lang.String id)
generate a dialog (using a new thread)


submitDialog

public void submitDialog(boolean clearData)
submit a dialog Use this method to optionally clear the data (for unittests)


submitDialog

public void submitDialog()

pickupFlashContext

public void pickupFlashContext()
Pick up an existing flash dataset from the session and move it to the old-flashcontext


fillAndRememberFlashContext

public java.util.List<DataSet> fillAndRememberFlashContext()

rememberFlashContext

public void rememberFlashContext(java.util.List<DataSet> flashDataSets)
Also used by the CheyenneServlet


newIf

public If newIf()
Return a instance of this tag (optionally from a pool)


newLoop

public Loop newLoop()
Return a instance of this tag (optionally from a pool)


newSql

public Sql newSql()
Return a instance of this tag (optionally from a pool)


newTextfile

public Textfile newTextfile()
Return a instance of this tag (optionally from a pool)


newRedirect

public Redirect newRedirect()
Return a instance of this tag (optionally from a pool)


newAssign

public Assign newAssign()
Return a instance of this tag (optionally from a pool)


newDatasetAction

public DatasetAction newDatasetAction()

registerDataSet

public void registerDataSet(DataSet dataSet)
Newest dataset is put at #0


unregisterDataSet

public void unregisterDataSet(DataSet dataSet)

findDataSetById

public DataSet findDataSetById(java.lang.String id)
Find the data set by ID

Parameters:
id -
Returns:

unregisterAllDataSets

public void unregisterAllDataSets()

resolveInDataset

public java.lang.Object resolveInDataset(java.lang.String name)
Parameters:
name -
Returns:

setAssign

public void setAssign(java.lang.String id,
                      java.lang.Object value)

resolveInAssign

public java.lang.Object resolveInAssign(java.lang.String name)
Parameters:
name -
Returns:

resolve

public java.lang.String resolve(java.lang.String input,
                                Dialog.ESCAPING escaping)
This will resolve all variables (or even nested variables) in the input string.


resolve

public java.lang.String resolve(java.lang.String input)

resolveColumnName

public java.lang.String resolveColumnName(java.lang.String input)
                                   throws CheyenneEngineException
Throws:
CheyenneEngineException

resolveWithoutEscapingTheResult

public java.lang.String resolveWithoutEscapingTheResult(java.lang.String input)
This will resolve all variables (or even nested variables) in the input string


resolveSingleVariable

public java.lang.String resolveSingleVariable(java.lang.String variableName)
This will resolve a single variable (% are already stripped) First the data set is searched Secondly the input parameters Thirdly the configuration parameters


resolveInParent

public java.lang.String resolveInParent(java.lang.String variableName)
Parameters:
variableName -
Returns:

convertToString

protected java.lang.String convertToString(java.lang.Object o)
Parameters:
o -
Returns:

enteringLoop

public void enteringLoop(Loop loop)

leavingLoop

public void leavingLoop(Loop loop)

getCurrentLoop

public Loop getCurrentLoop()
Returns:

getLoop

public Loop getLoop(int level)
Get the loop

Parameters:
level - 0 = current loop, 1 = one level below current, etc
Returns:

getLoops

public java.util.List<Loop> getLoops()
Return all loops, index = 0 is current loop

Returns:

print

protected void print(java.lang.String x)
Output to writer


getLanguageIdx

public int getLanguageIdx(java.lang.String[] languages)

outParameters

public java.util.Map<java.lang.String,java.lang.String> outParameters()
outParameters is used for requesting the output parameters and the content for example the soap message receiver



Copyright © 2010 InnovationInvestments. All Rights Reserved.