Class JdbcWorkflowStore
java.lang.Object
com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
org.ametys.plugins.workflow.store.JdbcWorkflowStore
- All Implemented Interfaces:
com.opensymphony.workflow.spi.WorkflowStore
,AmetysWorkflowStore
,Disposable
,Initializable
,Component
,Configurable
,Serviceable
public class JdbcWorkflowStore
extends com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
implements AmetysWorkflowStore, Component, Serviceable, Configurable, Initializable, Disposable
Ametys JDBC workflow store
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
Configured data source typeprotected String
Configured datasource idprotected String
from com.opensymphony.workflow.spi.jdbc.MySQLWorkflowStoreprotected String
from com.opensymphony.workflow.spi.jdbc.MySQLWorkflowStoreprotected Logger
Loggerprotected SQLDataSourceManager
The manager for SQL data sourceprotected String
from com.opensymphony.workflow.spi.jdbc.MySQLWorkflowStoreprotected String
from com.opensymphony.workflow.spi.jdbc.MySQLWorkflowStorestatic final String
Avalon role.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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
cleanup
(Connection connection, Statement statement, ResultSet result) void
clearHistory
(long idWorkflow) Removes all history steps of an instance from the database.
All future calls to the history will return an empty List of Step.void
configure
(Configuration configuration) void
deleteInstance
(long idWorkflow) Deletes a workflow instance from the database.
All future calls from the workflow to this instance will failed.void
dispose()
Database type getterprotected long
protected long
com.opensymphony.module.propertyset.PropertySet
getPropertySet
(long id) void
void
query
(com.opensymphony.workflow.query.WorkflowExpressionQuery e) void
service
(ServiceManager manager) boolean
Returns true if the history steps have to be removed when the workflow reaches its final stepMethods inherited from class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
addPreviousSteps, checkIfORExists, createCurrentStep, createCurrentStep, createEntry, findCurrentSteps, findEntry, findHistorySteps, getConnection, markFinished, moveToHistory, query, setEntryState
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.opensymphony.workflow.spi.WorkflowStore
createCurrentStep, createEntry, findCurrentSteps, findEntry, findHistorySteps, markFinished, moveToHistory, query, setEntryState
-
Field Details
-
ROLE
Avalon role. -
_logger
Logger -
_sqlDataSourceManager
The manager for SQL data source -
_dataSourceId
Configured datasource id -
_databaseType
Configured data source type -
_entrySequenceIncrement
from com.opensymphony.workflow.spi.jdbc.MySQLWorkflowStore -
_entrySequenceRetrieve
from com.opensymphony.workflow.spi.jdbc.MySQLWorkflowStore -
_stepSequenceIncrement
from com.opensymphony.workflow.spi.jdbc.MySQLWorkflowStore -
_stepSequenceRetrieve
from com.opensymphony.workflow.spi.jdbc.MySQLWorkflowStore
-
-
Constructor Details
-
JdbcWorkflowStore
public JdbcWorkflowStore()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
dispose
- Specified by:
dispose
in interfaceDisposable
-
init
- Specified by:
init
in interfacecom.opensymphony.workflow.spi.WorkflowStore
- Overrides:
init
in classcom.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
- Throws:
com.opensymphony.workflow.StoreException
-
getDatabaseType
Database type getter- Returns:
- The database type
- Throws:
SQLException
- on error
-
getPropertySet
- Specified by:
getPropertySet
in interfacecom.opensymphony.workflow.spi.WorkflowStore
- Overrides:
getPropertySet
in classcom.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
-
shouldClearHistory
Description copied from interface:AmetysWorkflowStore
Returns true if the history steps have to be removed when the workflow reaches its final step- Specified by:
shouldClearHistory
in interfaceAmetysWorkflowStore
- Returns:
- true if the history history has to be cleared.
-
cleanup
- Overrides:
cleanup
in classcom.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
-
deleteInstance
Description copied from interface:AmetysWorkflowStore
Deletes a workflow instance from the database.
All future calls from the workflow to this instance will failed.- Specified by:
deleteInstance
in interfaceAmetysWorkflowStore
- Parameters:
idWorkflow
- The id of a workflow instance.
-
clearHistory
Description copied from interface:AmetysWorkflowStore
Removes all history steps of an instance from the database.
All future calls to the history will return an empty List of Step.- Specified by:
clearHistory
in interfaceAmetysWorkflowStore
- Parameters:
idWorkflow
- the id of a workflow instance.
-
query
public List query(com.opensymphony.workflow.query.WorkflowExpressionQuery e) throws com.opensymphony.workflow.StoreException - Specified by:
query
in interfacecom.opensymphony.workflow.spi.WorkflowStore
- Overrides:
query
in classcom.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
- Throws:
com.opensymphony.workflow.StoreException
-
getNextEntrySequence
- Overrides:
getNextEntrySequence
in classcom.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
- Throws:
SQLException
-
getNextStepSequence
- Overrides:
getNextStepSequence
in classcom.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
- Throws:
SQLException
-