org.infoglue.cms.util.workflow
Class InfoGlueJDBCWorkflowStore
java.lang.Object
com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
org.infoglue.cms.util.workflow.InfoGlueJDBCWorkflowStore
- All Implemented Interfaces:
- com.opensymphony.workflow.spi.WorkflowStore
- Direct Known Subclasses:
- InfoGlueMySQLJDBCWorkflowStore
public class InfoGlueJDBCWorkflowStore
- extends com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
JDBC implementation just overiding the init-method of the default JDBCWorkflowStore as it demanded DataStores.
The following properties are all required:
- datasource - the JNDI location for the DataSource that is to be used.
- entry.sequence - SQL query that returns the next ID for a workflow entry
- entry.table - table name for workflow entry
- entry.id - column name for workflow entry ID field
- entry.name - column name for workflow entry name field
- entry.state - column name for workflow entry state field
- step.sequence - SQL query that returns the next ID for a workflow step
- history.table - table name for steps in history
- current.table - table name for current steps
- step.id - column name for step ID field
- step.entryId - column name for workflow entry ID field (foreign key relationship to [entry.table].[entry.id])
- step.stepId - column name for step workflow definition step field
- step.actionId - column name for step action field
- step.owner - column name for step owner field
- step.caller - column name for step caller field
- step.startDate - column name for step start date field
- step.dueDate - column name for optional step due date field
- step.finishDate - column name for step finish date field
- step.status - column name for step status field
- currentPrev.table - table name for the previous IDs for current steps
- historyPrev.table - table name for the previous IDs for history steps
- step.previousId - column name for step ID field (foreign key relation to [history.table].[step.id] or [current.table].[step.id])
- Author:
- Mattias Bogeblad
| Fields inherited from class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore |
closeConnWhenDone, currentPrevTable, currentTable, ds, entryId, entryName, entrySequence, entryState, entryTable, historyPrevTable, historyTable, stepActionId, stepCaller, stepDueDate, stepEntryId, stepFinishDate, stepId, stepOwner, stepPreviousId, stepSequence, stepStartDate, stepStatus, stepStepId |
|
Method Summary |
com.opensymphony.workflow.spi.Step |
createCurrentStep(long entryId,
int wfStepId,
java.lang.String owner,
java.util.Date startDate,
java.util.Date dueDate,
java.lang.String status,
long[] previousIds)
|
com.opensymphony.workflow.spi.WorkflowEntry |
createEntry(java.lang.String workflowName)
|
java.util.List |
findCurrentSteps(long entryId)
|
com.opensymphony.workflow.spi.WorkflowEntry |
findEntry(long theEntryId)
|
java.util.List |
findHistorySteps(long entryId)
|
protected java.sql.Connection |
getConnection()
|
void |
init(java.util.Map props)
|
com.opensymphony.workflow.spi.Step |
markFinished(com.opensymphony.workflow.spi.Step step,
int actionId,
java.util.Date finishDate,
java.lang.String status,
java.lang.String caller)
|
void |
moveToHistory(com.opensymphony.workflow.spi.Step step)
|
java.util.List |
query(com.opensymphony.workflow.query.WorkflowQuery query)
|
void |
setEntryState(long id,
int state)
|
| Methods inherited from class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore |
addPreviousSteps, checkIfORExists, cleanup, createCurrentStep, getNextEntrySequence, getNextStepSequence, getPropertySet, query |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InfoGlueJDBCWorkflowStore
public InfoGlueJDBCWorkflowStore()
init
public void init(java.util.Map props)
throws com.opensymphony.workflow.StoreException
- Specified by:
init in interface com.opensymphony.workflow.spi.WorkflowStore- Overrides:
init in class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
- Throws:
com.opensymphony.workflow.StoreException
getConnection
protected java.sql.Connection getConnection()
throws java.sql.SQLException
- Overrides:
getConnection in class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
- Throws:
java.sql.SQLException
setEntryState
public void setEntryState(long id,
int state)
throws com.opensymphony.workflow.StoreException
- Specified by:
setEntryState in interface com.opensymphony.workflow.spi.WorkflowStore- Overrides:
setEntryState in class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
- Throws:
com.opensymphony.workflow.StoreException
createCurrentStep
public com.opensymphony.workflow.spi.Step createCurrentStep(long entryId,
int wfStepId,
java.lang.String owner,
java.util.Date startDate,
java.util.Date dueDate,
java.lang.String status,
long[] previousIds)
throws com.opensymphony.workflow.StoreException
- Specified by:
createCurrentStep in interface com.opensymphony.workflow.spi.WorkflowStore- Overrides:
createCurrentStep in class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
- Throws:
com.opensymphony.workflow.StoreException
createEntry
public com.opensymphony.workflow.spi.WorkflowEntry createEntry(java.lang.String workflowName)
throws com.opensymphony.workflow.StoreException
- Specified by:
createEntry in interface com.opensymphony.workflow.spi.WorkflowStore- Overrides:
createEntry in class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
- Throws:
com.opensymphony.workflow.StoreException
findCurrentSteps
public java.util.List findCurrentSteps(long entryId)
throws com.opensymphony.workflow.StoreException
- Specified by:
findCurrentSteps in interface com.opensymphony.workflow.spi.WorkflowStore- Overrides:
findCurrentSteps in class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
- Throws:
com.opensymphony.workflow.StoreException
findEntry
public com.opensymphony.workflow.spi.WorkflowEntry findEntry(long theEntryId)
throws com.opensymphony.workflow.StoreException
- Specified by:
findEntry in interface com.opensymphony.workflow.spi.WorkflowStore- Overrides:
findEntry in class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
- Throws:
com.opensymphony.workflow.StoreException
findHistorySteps
public java.util.List findHistorySteps(long entryId)
throws com.opensymphony.workflow.StoreException
- Specified by:
findHistorySteps in interface com.opensymphony.workflow.spi.WorkflowStore- Overrides:
findHistorySteps in class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
- Throws:
com.opensymphony.workflow.StoreException
markFinished
public com.opensymphony.workflow.spi.Step markFinished(com.opensymphony.workflow.spi.Step step,
int actionId,
java.util.Date finishDate,
java.lang.String status,
java.lang.String caller)
throws com.opensymphony.workflow.StoreException
- Specified by:
markFinished in interface com.opensymphony.workflow.spi.WorkflowStore- Overrides:
markFinished in class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
- Throws:
com.opensymphony.workflow.StoreException
moveToHistory
public void moveToHistory(com.opensymphony.workflow.spi.Step step)
throws com.opensymphony.workflow.StoreException
- Specified by:
moveToHistory in interface com.opensymphony.workflow.spi.WorkflowStore- Overrides:
moveToHistory in class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
- Throws:
com.opensymphony.workflow.StoreException
query
public java.util.List query(com.opensymphony.workflow.query.WorkflowQuery query)
throws com.opensymphony.workflow.StoreException
- Specified by:
query in interface com.opensymphony.workflow.spi.WorkflowStore- Overrides:
query in class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
- Throws:
com.opensymphony.workflow.StoreException
Copyright © 2005 InfoGlue.org All Rights Reserved.