|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Definitions of all required workflow driver methods.
Field Summary | |
static int |
DRIVER_TYPE_ID
The type ID to identify workflow driver implementations. |
Method Summary | |
CmsTask |
createTask(CmsDbContext dbc,
int rootId,
int parentId,
int tasktype,
CmsUUID ownerId,
CmsUUID agentId,
CmsUUID roleId,
java.lang.String taskname,
java.sql.Timestamp wakeuptime,
java.sql.Timestamp timeout,
int priority)
Creates a new task. |
void |
destroy()
Destroys this driver. |
void |
endTask(CmsDbContext dbc,
int taskId)
Ends a task. |
void |
forwardTask(CmsDbContext dbc,
int taskId,
CmsUUID newRoleId,
CmsUUID newUserId)
Forwards a task to a new user. |
CmsSqlManager |
getSqlManager()
Returns the SqlManager of this driver. |
CmsSqlManager |
initSqlManager(java.lang.String classname)
Initializes the SQL manager for this driver. |
CmsUUID |
readAgent(CmsDbContext dbc,
CmsUUID roleId)
Finds an agent for a given role (group). |
CmsProject |
readProject(CmsDbContext dbc,
CmsTask task)
Reads a project of a given task. |
java.util.List |
readProjectLogs(CmsDbContext dbc,
int projectId)
Reads all task log entries for a project. |
CmsTask |
readTask(CmsDbContext dbc,
int id)
Reads the task with the given id. |
CmsTaskLog |
readTaskLog(CmsDbContext dbc,
int id)
Reads a log for a task. |
java.util.List |
readTaskLogs(CmsDbContext dbc,
int taskId)
Reads log entries for a task. |
java.lang.String |
readTaskParameter(CmsDbContext dbc,
int taskId,
java.lang.String parName)
Returns the value of the given parameter for the given task. |
java.util.List |
readTasks(CmsDbContext dbc,
CmsProject project,
CmsUser agent,
CmsUser owner,
CmsGroup role,
int taskType,
java.lang.String orderBy,
java.lang.String sort)
Reads all given tasks from a user for a project. |
int |
readTaskType(CmsDbContext dbc,
java.lang.String taskName)
Get the template task id fo a given taskname. |
void |
writeSystemTaskLog(CmsDbContext dbc,
int taskid,
java.lang.String comment)
Writes a system task log entry. |
CmsTask |
writeTask(CmsDbContext dbc,
CmsTask task)
Writes a task. |
void |
writeTaskLog(CmsDbContext dbc,
int taskId,
CmsUUID userId,
java.sql.Timestamp starttime,
java.lang.String comment,
int type)
Writes new log for a task. |
void |
writeTaskParameter(CmsDbContext dbc,
int taskId,
java.lang.String parname,
java.lang.String parvalue)
Set a Parameter for a task. |
void |
writeTaskType(CmsDbContext dbc,
int autofinish,
int escalationtyperef,
java.lang.String htmllink,
java.lang.String name,
java.lang.String permission,
int priorityref,
int roleref)
Creates a new tasktype set in the database. |
Field Detail |
public static final int DRIVER_TYPE_ID
Method Detail |
public CmsTask createTask(CmsDbContext dbc, int rootId, int parentId, int tasktype, CmsUUID ownerId, CmsUUID agentId, CmsUUID roleId, java.lang.String taskname, java.sql.Timestamp wakeuptime, java.sql.Timestamp timeout, int priority) throws CmsDataAccessException
dbc
- the current database contextrootId
- id of the root task projectparentId
- id of the parent tasktasktype
- type of the taskownerId
- id of the owneragentId
- id of the agentroleId
- id of the roletaskname
- name of the taskwakeuptime
- time when the task will be wake uptimeout
- time when the task times outpriority
- priority of the task
CmsDataAccessException
- if something goes wrongpublic void destroy() throws java.lang.Throwable
java.lang.Throwable
- if something goes wrongpublic void endTask(CmsDbContext dbc, int taskId) throws CmsDataAccessException
dbc
- the current database contexttaskId
- Id of the task to end
CmsDataAccessException
- if something goes wrongpublic void forwardTask(CmsDbContext dbc, int taskId, CmsUUID newRoleId, CmsUUID newUserId) throws CmsDataAccessException
dbc
- the current database contexttaskId
- the Id of the task to forwardnewRoleId
- the new group name for the tasknewUserId
- the new user who gets the task
CmsDataAccessException
- if something goes wrongpublic CmsSqlManager getSqlManager()
public CmsSqlManager initSqlManager(java.lang.String classname)
To obtain JDBC connections from different pools, further {online|offline|backup} pool Urls have to be specified.
classname
- the classname of the SQL manager
public CmsUUID readAgent(CmsDbContext dbc, CmsUUID roleId) throws CmsDataAccessException
dbc
- the current database contextroleId
- The Id for the role (group)
CmsDataAccessException
- if something goes wrongpublic CmsProject readProject(CmsDbContext dbc, CmsTask task) throws CmsDataAccessException
dbc
- the current database contexttask
- the task to read the project of
CmsDataAccessException
- if something goes wrongpublic java.util.List readProjectLogs(CmsDbContext dbc, int projectId) throws CmsDataAccessException
dbc
- the current database contextprojectId
- the id of the project for which the tasklog will be read
CmsTaskLog
objects
CmsDataAccessException
- if something goes wrongpublic CmsTask readTask(CmsDbContext dbc, int id) throws CmsDataAccessException
dbc
- the current database contextid
- the id for the task to read
CmsDataAccessException
- if something goes wrongpublic CmsTaskLog readTaskLog(CmsDbContext dbc, int id) throws CmsDataAccessException
dbc
- the current database contextid
- The id for the tasklog
CmsDataAccessException
- if something goes wrongpublic java.util.List readTaskLogs(CmsDbContext dbc, int taskId) throws CmsDataAccessException
dbc
- the current satabase contexttaskId
- the task for the tasklog to read
CmsTaskLog
objects
CmsDataAccessException
- if something goes wrongpublic java.lang.String readTaskParameter(CmsDbContext dbc, int taskId, java.lang.String parName) throws CmsDataAccessException
dbc
- the current database contexttaskId
- the Id of the taskparName
- name of the parameter
CmsDataAccessException
- if something goes wrongpublic java.util.List readTasks(CmsDbContext dbc, CmsProject project, CmsUser agent, CmsUser owner, CmsGroup role, int taskType, java.lang.String orderBy, java.lang.String sort) throws CmsDataAccessException
Most parameters can be null
,
if you do not want to filter the tasks by them.
The tasktype
parameter will filter the tasks.
The possible values for this parameter are:
CmsTaskService.TASKS_ALL
: Reads all tasksCmsTaskService.TASKS_OPEN
: Reads all open tasksCmsTaskService.TASKS_DONE
: Reads all finished tasksCmsTaskService.TASKS_NEW
: Reads all new tasks
dbc
- the current database contextproject
- the id of the project in which the tasks are definedagent
- the owner of the taskowner
- the owner of the taskrole
- the owner of the tasktaskType
- the type of task you want to readorderBy
- specifies how to order the taskssort
- sorting of the tasks
CmsTask
objects for a user for a project
CmsDataAccessException
- if operation was not successfulpublic int readTaskType(CmsDbContext dbc, java.lang.String taskName) throws CmsDataAccessException
dbc
- the current database contexttaskName
- Name of the Task
CmsDataAccessException
- if something goes wrongpublic void writeSystemTaskLog(CmsDbContext dbc, int taskid, java.lang.String comment) throws CmsDataAccessException
dbc
- the current database contexttaskid
- the id of the taskcomment
- the log entry
CmsDataAccessException
- if something goes wrongpublic CmsTask writeTask(CmsDbContext dbc, CmsTask task) throws CmsDataAccessException
dbc
- the current database contexttask
- the task to write
CmsDataAccessException
- if something goes wrongpublic void writeTaskLog(CmsDbContext dbc, int taskId, CmsUUID userId, java.sql.Timestamp starttime, java.lang.String comment, int type) throws CmsDataAccessException
dbc
- the current database contexttaskId
- The id of the taskuserId
- User who added the Logstarttime
- Time when the log is createdcomment
- Description for the logtype
- Type of the log. 0 = Sytem log, 1 = User Log
CmsDataAccessException
- if something goes wrongpublic void writeTaskParameter(CmsDbContext dbc, int taskId, java.lang.String parname, java.lang.String parvalue) throws CmsDataAccessException
dbc
- the current database contexttaskId
- the taskparname
- the name of the parameterparvalue
- the value of the parameter
CmsDataAccessException
- if something goes wrongpublic void writeTaskType(CmsDbContext dbc, int autofinish, int escalationtyperef, java.lang.String htmllink, java.lang.String name, java.lang.String permission, int priorityref, int roleref) throws CmsDataAccessException
dbc
- the current database contextautofinish
- tbdescalationtyperef
- tbdhtmllink
- tbdname
- tbdpermission
- tbdpriorityref
- tbdroleref
- tbd
CmsDataAccessException
- if something goes wrong
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |