com.adeptia.indigo.utils
Class TransactionInformation

java.lang.Object
  extended by com.adeptia.indigo.utils.TransactionInformation

public class TransactionInformation
extends java.lang.Object

Dec 26, 2006 This is a facade to process runtime and provides easy to use methods to access process runtime information. A developer can use it to write custom code.


Field Summary
static java.lang.String AdvanceDatabaseSchema
           
static java.lang.String AdvanceDatabaseSource
           
static java.lang.String AdvanceDatabaseTarget
           
static java.lang.String AdvancePositionalSchema
           
static java.lang.String BusinessRole
           
static java.lang.String CalendarEvent
           
static java.lang.String ContextUpload
           
static java.lang.String CustomPlugin
           
static java.lang.String CustomReport
           
static java.lang.String DashboardComponent
           
static java.lang.String DashboardDesign
           
static java.lang.String DataBaseDriver
           
static java.lang.String DatabaseEvent
           
static java.lang.String DataBaseInfo
           
static java.lang.String DatabaseSchema
           
static java.lang.String DatabaseSource
           
static java.lang.String DatabaseTarget
           
static java.lang.String DataMapping
           
static java.lang.String Decoder
           
static java.lang.String EdiSchema
           
static java.lang.String Encoder
           
static java.lang.String EventRegistery
           
static java.lang.String ExcelSchema
           
static java.lang.String FileEvent
           
static java.lang.String FileSource
           
static java.lang.String FileTarget
           
static java.lang.String FtpEvent
           
static java.lang.String FtpSource
           
static java.lang.String FtpTarget
           
static java.lang.String Group
           
static java.lang.String HttpSource
           
static java.lang.String HttpTarget
           
static java.lang.String HttpTrigger
           
static java.lang.String HumanWorkFlow
           
static java.lang.String HumanWorkFlowTasks
           
static java.lang.String JmsEvent
           
static java.lang.String JMSProvider
           
static java.lang.String JmsSource
           
static java.lang.String JmsTarget
           
static java.lang.String LanSource
           
static java.lang.String LanTarget
           
static java.lang.String MailEvent
           
static java.lang.String MailNotification
           
static java.lang.String MailPolling
           
static java.lang.String MailSource
           
static java.lang.String MailTarget
           
static java.lang.String NativeCall
           
static java.lang.String PositionalDataDictionary
           
static java.lang.String PositionalSchema
           
static java.lang.String ProcessFlow
           
static java.lang.String RecordToRecord
           
static java.lang.String SecretKey
           
static java.lang.String SecurityPolicy
           
static java.lang.String TextSchema
           
static java.lang.String TimerEvent
           
static java.lang.String User
           
static java.lang.String WebdavSource
           
static java.lang.String WebdavTarget
           
static java.lang.String XmlSchema
           
static java.lang.String XmlValidator
           
 
Constructor Summary
TransactionInformation(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpSession session)
          Parameterized Constructor It retrieves transaction domainId from request object, subject from current session and sets transaction information
TransactionInformation(java.lang.String domainId, javax.security.auth.Subject subject)
          Parameterized Constructor
 
Method Summary
 void abortTransaction()
          Method to abort the current transaction
 java.util.List fetchActivityList(java.lang.String className)
          Method to fetch activity list for given service class.
 java.util.List fetchActivityListById(java.lang.String className, java.lang.String id)
          Method to fetch activity list for given service class based on criteria of given activity id
 java.util.List fetchActivityListByName(java.lang.String className, java.lang.String activityName)
          Method to fetch activity list for given service class based on criteria of given activity name
 java.lang.String getContextVarValue(java.lang.String paramName)
          Returns the value to which the specified paramName is mapped in context.
 java.lang.String getDomainId()
          Get domain id for current transaction
 java.util.Map getSystemVariable()
          Return map view for system defined context variables i.e.'TransactionAddress', 'currentState' and 'LoggingLevel'.
 java.lang.String getTransactionID()
          Get transaction id
 java.lang.String getTransactionName()
          Returns current transaction name
 java.lang.String getTransactionPID()
          Get current transaction pid
 java.util.Map getUserDefinedVariable()
          Return map view for all user defined context variables
 boolean isParamExist(java.lang.String paramName)
          Method to check mapping for the specified parameter name in context map
 void logDebugMessage(java.lang.String message)
          Log a message string with the DEBUG level.
 void logErrorMessage(java.lang.String message)
          Log a message string with the ERROR level.
 void logErrorMessage(java.lang.String message, java.lang.Throwable e)
          Log a message string with the ERROR level including the stack trace of the Throwable e passed as parameter.
 void logInfoMessage(java.lang.String message)
          Log a message string with the INFO level.
 void putVarInContext(java.util.Map paramsMap)
          Copies all of the mappings from the specified map to context map
 void putVarInContext(java.lang.String paramName, java.lang.String paramValue)
          Associates the specified parameter value with the specified parameter name in context map
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FileSource

public static java.lang.String FileSource

FileTarget

public static java.lang.String FileTarget

FtpSource

public static java.lang.String FtpSource

FtpTarget

public static java.lang.String FtpTarget

MailSource

public static java.lang.String MailSource

MailTarget

public static java.lang.String MailTarget

HttpSource

public static java.lang.String HttpSource

HttpTarget

public static java.lang.String HttpTarget

WebdavSource

public static java.lang.String WebdavSource

WebdavTarget

public static java.lang.String WebdavTarget

LanSource

public static java.lang.String LanSource

LanTarget

public static java.lang.String LanTarget

JmsSource

public static java.lang.String JmsSource

JmsTarget

public static java.lang.String JmsTarget

DatabaseSource

public static java.lang.String DatabaseSource

DatabaseTarget

public static java.lang.String DatabaseTarget

AdvanceDatabaseSource

public static java.lang.String AdvanceDatabaseSource

AdvanceDatabaseTarget

public static java.lang.String AdvanceDatabaseTarget

MailPolling

public static java.lang.String MailPolling

ProcessFlow

public static java.lang.String ProcessFlow

PositionalDataDictionary

public static java.lang.String PositionalDataDictionary

TextSchema

public static java.lang.String TextSchema

ExcelSchema

public static java.lang.String ExcelSchema

XmlSchema

public static java.lang.String XmlSchema

EdiSchema

public static java.lang.String EdiSchema

DatabaseSchema

public static java.lang.String DatabaseSchema

PositionalSchema

public static java.lang.String PositionalSchema

AdvancePositionalSchema

public static java.lang.String AdvancePositionalSchema

XmlValidator

public static java.lang.String XmlValidator

AdvanceDatabaseSchema

public static java.lang.String AdvanceDatabaseSchema

CalendarEvent

public static java.lang.String CalendarEvent

DatabaseEvent

public static java.lang.String DatabaseEvent

EventRegistery

public static java.lang.String EventRegistery

FileEvent

public static java.lang.String FileEvent

FtpEvent

public static java.lang.String FtpEvent

HttpTrigger

public static java.lang.String HttpTrigger

JmsEvent

public static java.lang.String JmsEvent

MailEvent

public static java.lang.String MailEvent

TimerEvent

public static java.lang.String TimerEvent

HumanWorkFlow

public static java.lang.String HumanWorkFlow

HumanWorkFlowTasks

public static java.lang.String HumanWorkFlowTasks

User

public static java.lang.String User

Group

public static java.lang.String Group

BusinessRole

public static java.lang.String BusinessRole

CustomPlugin

public static java.lang.String CustomPlugin

ContextUpload

public static java.lang.String ContextUpload

CustomReport

public static java.lang.String CustomReport

NativeCall

public static java.lang.String NativeCall

MailNotification

public static java.lang.String MailNotification

SecurityPolicy

public static java.lang.String SecurityPolicy

Decoder

public static java.lang.String Decoder

Encoder

public static java.lang.String Encoder

DataBaseDriver

public static java.lang.String DataBaseDriver

DataBaseInfo

public static java.lang.String DataBaseInfo

JMSProvider

public static java.lang.String JMSProvider

SecretKey

public static java.lang.String SecretKey

DashboardComponent

public static java.lang.String DashboardComponent

DashboardDesign

public static java.lang.String DashboardDesign

DataMapping

public static java.lang.String DataMapping

RecordToRecord

public static java.lang.String RecordToRecord
Constructor Detail

TransactionInformation

public TransactionInformation(java.lang.String domainId,
                              javax.security.auth.Subject subject)
                       throws java.lang.Exception
Parameterized Constructor

Parameters:
domainId - string containig current transaction id and pid information. It is present as a parameter with name 'PID' in request object
subject - subject representing a group of related information for BPM User
Throws:
java.lang.Exception

TransactionInformation

public TransactionInformation(javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpSession session)
                       throws java.lang.Exception
Parameterized Constructor It retrieves transaction domainId from request object, subject from current session and sets transaction information

Parameters:
request - request object
session - session object
Throws:
java.lang.Exception
Method Detail

fetchActivityListByName

public java.util.List fetchActivityListByName(java.lang.String className,
                                              java.lang.String activityName)
                                       throws java.lang.Exception
Method to fetch activity list for given service class based on criteria of given activity name

Parameters:
className - service class name whose activities list needs to be fetched. These class name are present as static fields in this class
activityName - criteria based on which service activities list is fetched. It will fetch activities list based on given activity name criteria.
Returns:
activities list for given service class based on given criteria
Throws:
java.lang.Exception

fetchActivityListById

public java.util.List fetchActivityListById(java.lang.String className,
                                            java.lang.String id)
                                     throws java.lang.Exception
Method to fetch activity list for given service class based on criteria of given activity id

Parameters:
className - service class name whose activities list needs to be fetched. These class name are present as static fields in this class
id - criteria based on which service activities list is fetched. It will fetch activities list based on given activity id.
Returns:
activities list for given service class based on given criteria
Throws:
java.lang.Exception

fetchActivityList

public java.util.List fetchActivityList(java.lang.String className)
                                 throws java.lang.Exception
Method to fetch activity list for given service class. No criteria is used while fetching activity list for given service class.

Parameters:
className - service class name whose activities list needs to be fetched. These class name are present as static fields in this class
Returns:
activities list for given service class
Throws:
java.lang.Exception

getDomainId

public java.lang.String getDomainId()
Get domain id for current transaction

Returns:
domain id for current transaction

getTransactionID

public java.lang.String getTransactionID()
Get transaction id

Returns:
current transaction id

getTransactionPID

public java.lang.String getTransactionPID()
Get current transaction pid

Returns:
current transaction pid

getUserDefinedVariable

public java.util.Map getUserDefinedVariable()
                                     throws java.lang.Exception
Return map view for all user defined context variables

Returns:
map containing user defined context variables
Throws:
java.lang.Exception

getSystemVariable

public java.util.Map getSystemVariable()
                                throws java.lang.Exception
Return map view for system defined context variables i.e.'TransactionAddress', 'currentState' and 'LoggingLevel'.

Returns:
map containing user defined context variables
Throws:
java.lang.Exception

getTransactionName

public java.lang.String getTransactionName()
                                    throws java.lang.Exception
Returns current transaction name

Returns:
current transaction name
Throws:
java.lang.Exception

logInfoMessage

public void logInfoMessage(java.lang.String message)
Log a message string with the INFO level. The INFO level designates informational messages that highlight the progress of the application at coarse-grained level.

Parameters:
message - message to log

logErrorMessage

public void logErrorMessage(java.lang.String message)
Log a message string with the ERROR level. The ERROR level designates error events that might still allow the application to continue running.

Parameters:
message - message to log

logErrorMessage

public void logErrorMessage(java.lang.String message,
                            java.lang.Throwable e)
Log a message string with the ERROR level including the stack trace of the Throwable e passed as parameter. The ERROR level designates error events that might still allow the application to continue running.

Parameters:
message - message to log
e - the exception to log, including its stack trace.

logDebugMessage

public void logDebugMessage(java.lang.String message)
Log a message string with the DEBUG level. The DEBUG Level designates fine-grained informational events that are most useful to debug an application.

Parameters:
message - message to log

abortTransaction

public void abortTransaction()
                      throws java.lang.Exception
Method to abort the current transaction

Throws:
java.lang.Exception

putVarInContext

public void putVarInContext(java.util.Map paramsMap)
                     throws java.lang.Exception
Copies all of the mappings from the specified map to context map

Parameters:
paramsMap - Mappings to be stored in context map.
Throws:
java.lang.Exception

putVarInContext

public void putVarInContext(java.lang.String paramName,
                            java.lang.String paramValue)
                     throws java.lang.Exception
Associates the specified parameter value with the specified parameter name in context map

Parameters:
paramName - name with which the specified value is to be associated
paramValue - value to be associated with the specified name
Throws:
java.lang.Exception

isParamExist

public boolean isParamExist(java.lang.String paramName)
                     throws java.lang.Exception
Method to check mapping for the specified parameter name in context map

Parameters:
paramName - parameter name whose presence in context map is to be tested.
Returns:
true if context map contains a mapping for the specified parameter name.
Throws:
java.lang.Exception

getContextVarValue

public java.lang.String getContextVarValue(java.lang.String paramName)
                                    throws java.lang.Exception
Returns the value to which the specified paramName is mapped in context. This method is used to read parameters that have String value.

Parameters:
paramName - parameter whose associated value is to be returned.
Returns:
the value to which context map maps the specified parameter, or null if the map contains no mapping for this parameter
Throws:
java.lang.Exception