//----------------------------BEGIN LICENSE----------------------------
/*
* Willow : the Open Source WorkFlow Project
* Distributable under GNU LGPL license by gun.org
*
* Copyright (C) 2004-2010 huihoo.org
* Copyright (C) 2004-2010 ZosaTapo <dertyang@hotmail.com>
*
* ====================================================================
* Project Homepage : http://www.huihoo.org/willow
* Source Forge : http://sourceforge.net/projects/huihoo
* Mailing list : willow@lists.sourceforge.net
*/
//----------------------------END LICENSE-----------------------------
package org.huihoo.workflow.impl.store.spi;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Iterator;
import org.huihoo.workflow.WorkflowException;
import org.huihoo.workflow.store.SchemaContext;
import org.huihoo.workflow.store.spi.AbstractSpiDatabase;
import org.huihoo.workflow.store.spi.SpiCloneable;
import org.huihoo.workflow.store.spi.SpiUserDatabase;
import org.huihoo.workflow.usermodel.WorkflowCategory;
import org.huihoo.workflow.usermodel.WorkflowDepartment;
import org.huihoo.workflow.usermodel.WorkflowGroup;
import org.huihoo.workflow.usermodel.WorkflowParticipant;
import org.huihoo.workflow.usermodel.WorkflowRank;
import org.huihoo.workflow.usermodel.WorkflowRole;
import org.huihoo.workflow.impl.usermodel.WorkflowCategoryImpl;
import org.huihoo.workflow.impl.usermodel.WorkflowRankImpl;
import org.huihoo.workflow.impl.store.usermodel_rt.WorkflowDepartmentImpl_RT;
import org.huihoo.workflow.impl.store.usermodel_rt.WorkflowGroupImpl_RT;
import org.huihoo.workflow.impl.store.usermodel_rt.WorkflowParticipantImpl_RT;
import org.huihoo.workflow.impl.store.usermodel_rt.WorkflowRoleImpl_RT;
import com.zosatapo.commons.store.ConnUtils;
import com.zosatapo.commons.store.jResultSet;
import com.zosatapo.commons.store.jStatement;
/**
* @author reic
*
* To change the template for this generated type comment go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
public class SpiUserDatabaseImpl_RT extends AbstractSpiDatabase implements SpiUserDatabase,SpiCloneable
{
// ----------------------------------------------------------- Constructors
/**
* Create a new instance with default values.
*/
public SpiUserDatabaseImpl_RT()
{
}
// ------------------------------------------------------------- Properties
/**
* Return the set of {@link Group}s defined in this user database.
*/
public Iterator getGroups()
{
HashMap groups = new HashMap();
genGroupTree(groups, null);
return groups.values().iterator();
}
/**
* Return the set of {@link Department}s defined in this user database.
*/
public Iterator getDepartments()
{
HashMap departments = new HashMap();
genDepartmentTree(departments, null);
return departments.values().iterator();
}
/**
* Return the set of {@link WorkflowRole}s defined in this user database.
*/
public Iterator getRoles()
{
HashMap roles = new HashMap();
genRoleTree(roles);
return roles.values().iterator();
}
/**
* Return the set of {@link WorkflowParticipant}s defined in this user database.
*/
public Iterator getParticipants()
{
HashMap participants = new HashMap();
genParticipantTree(participants);
return participants.values().iterator();
}
/**
* Return the set of {@link Rank}s defined in this user database.
*/
public Iterator getRanks()
{
HashMap participants = new HashMap();
genParticipantTree(participants);
return participants.values().iterator();
}
/**
* Return the set of {@link Category}s defined in this user database.
*/
public Iterator getCategories()
{
HashMap participants = new HashMap();
genParticipantTree(participants);
return participants.values().iterator();
}
/**
* Return the {@link Group} with the specified group id, if any;
* otherwise return <code>null</code>.
*
* @param groupid id of the group to return
*/
public WorkflowGroup findGroup(String groupid)
{
Connection conn = null;
PreparedStatement pstmt = null;
WorkflowGroup group = null;
String strSQL =
"SELECT vc_uuid,vc_name,vc_description,vc_parent,vc_departmentid,vc_presidentid FROM "
+ getSchemaContext().getTableName(SchemaContext.SCHEMA_DEPARTMENT)
+ " WHERE vc_uuid=?";
try
{
conn = ConnUtils.getConnection(getStore());
pstmt = conn.prepareStatement(strSQL);
pstmt.setString(1, groupid);
ResultSet rs = pstmt.executeQuery();
if (rs.next())
{
WorkflowGroup parentGroup = null;
String parentGroup_id = rs.getString("vc_parent");
if (parentGroup_id != null)
{
parentGroup = findGroup(parentGroup_id);
}
group =
createGroup_impl(
rs.getString("vc_uuid"),
rs.getString("vc_name"),
rs.getString("vc_description"),
parentGroup);
group.setDepartment(this.findDepartment(rs.getString("vc_departmentid")));
group.setPresident(this.findParticipant(rs.getString("vc_presidentid")));
}
}
catch (SQLException ex)
{
;
}
finally
{
ConnUtils.cleanupNoThrow(conn, pstmt);
}
return group;
}
/**
* Return the {@link Department} with the specified dept id, if any;
* otherwise return <code>null</code>.
*
* @param deptid id of the dept to return
*/
public WorkflowDepartment findDepartment(String deptid)
{
Connection conn = null;
PreparedStatement pstmt = null;
WorkflowDepartment department = null;
String strSQL =
"SELECT vc_uuid,vc_name,vc_description,vc_parent,vc_categoryid,vc_presidentid FROM "
+ getSchemaContext().getTableName(SchemaContext.SCHEMA_DEPARTMENT)
+ " WHERE vc_uuid=?";
try
{
conn = ConnUtils.getConnection(getStore());
pstmt = conn.prepareStatement(strSQL);
pstmt.setString(1, deptid);
ResultSet rs = pstmt.executeQuery();
if (rs.next())
{
WorkflowDepartment parentDept = null;
String parentDept_id = rs.getString("vc_parent");
if (parentDept_id != null)
{
parentDept = findDepartment(parentDept_id);
}
department =
createDepartment_impl(
rs.getString("vc_uuid"),
rs.getString("vc_name"),
rs.getString("vc_description"),
parentDept);
department.setCategory(findCategory(rs.getString("vc_categoryid")));
department.setPresident(findParticipant(rs.getString("vc_presidentid")));
}
}
catch (SQLException ex)
{
;
}
finally
{
ConnUtils.cleanupNoThrow(conn, pstmt);
}
return department;
}
/**
* Return the {@link WorkflowRole} with the specified role id, if any;
* otherwise return <code>null</code>.
*
* @param roleid id of the role to return
*/
public WorkflowRole findRole(String roleid)
{
Connection conn = null;
PreparedStatement pstmt = null;
WorkflowRole role = null;
String strSQL =
"SELECT vc_uuid,vc_name,vc_description "
+ " FROM "
+ getSchemaContext().getTableName(SchemaContext.SCHEMA_ROLE)
+ " WHERE vc_uuid=?";
try
{
conn = ConnUtils.getConnection(getStore());
pstmt = conn.prepareStatement(strSQL);
pstmt.setString(1, roleid);
ResultSet rs = pstmt.executeQuery();
if (rs.next())
{
role =
createRole_impl(
rs.getString("vc_uuid"),
rs.getString("vc_name"),
rs.getString("vc_description"));
}
}
catch (SQLException ex)
{
;
}
finally
{
ConnUtils.cleanupNoThrow(conn, pstmt);
}
return role;
}
/**
* Return the {@link WorkflowParticipant} with the specified user id, if any;
* otherwise return <code>null</code>.
*
* @param userid id of the user to return
*/
public WorkflowParticipant findParticipant(String userid)
{
Connection conn = null;
PreparedStatement pstmt = null;
WorkflowParticipant participant = null;
String strSQL =
"SELECT vc_uuid,vc_name,vc_password,vc_fullname,vc_description,vc_rankid "
+ " "
+ " FROM "
+ getSchemaContext().getTableName(SchemaContext.SCHEMA_USER)
+ " WHERE vc_uuid=?";
try
{
conn = ConnUtils.getConnection(getStore());
pstmt = conn.prepareStatement(strSQL);
pstmt.setString(1, userid);
ResultSet rs = pstmt.executeQuery();
if (rs.next())
{
participant =
createParticipant_impl(
rs.getString("vc_uuid"),
rs.getString("vc_name"),
rs.getString("vc_password"),
rs.getString("vc_fullname"),
rs.getString("vc_description"));
}
}
catch (SQLException ex)
{
;
}
finally
{
ConnUtils.cleanupNoThrow(conn, pstmt);
}
return participant;
}
/**
* Return the {@link Rank} with the specified rank id, if any;
* otherwise return <code>null</code>.
*
* @param rankid id of the rank to return
*/
public WorkflowRank findRank(String rankid)
{
Connection conn = null;
PreparedStatement pstmt = null;
WorkflowRank rank = null;
String strSQL =
"SELECT vc_uuid,vc_name,vc_description "
+ " FROM "
+ getSchemaContext().getTableName(SchemaContext.SCHEMA_RANK)
+ " WHERE vc_uuid=?";
try
{
conn = ConnUtils.getConnection(getStore());
pstmt = conn.prepareStatement(strSQL);
pstmt.setString(1, rankid);
ResultSet rs = pstmt.executeQuery();
if (rs.next())
{
rank =
new WorkflowRankImpl(
rs.getString("vc_uuid"),
rs.getString("vc_name"),
rs.getString("vc_description"));
}
}
catch (SQLException ex)
{
;
}
finally
{
ConnUtils.cleanupNoThrow(conn, pstmt);
}
return rank;
}
/**
* Return the {@link Category} with the specified rank id, if any;
* otherwise return <code>null</code>.
*
* @param cetegoryid id of the Category to return
*/
public WorkflowCategory findCategory(String cetegoryid)
{
Connection conn = null;
PreparedStatement pstmt = null;
WorkflowCategory cetegory = null;
String strSQL =
"SELECT vc_uuid,vc_name,vc_description "
+ " FROM "
+ getSchemaContext().getTableName(SchemaContext.SCHEMA_CATEGORY)
+ " WHERE vc_uuid=?";
try
{
conn = ConnUtils.getConnection(getStore());
pstmt = conn.prepareStatement(strSQL);
pstmt.setString(1, cetegoryid);
ResultSet rs = pstmt.executeQuery();
if (rs.next())
{
cetegory =
new WorkflowCategoryImpl(
rs.getString("vc_uuid"),
rs.getString("vc_name"),
rs.getString("vc_description"));
}
}
catch (SQLException ex)
{
;
}
finally
{
ConnUtils.cleanupNoThrow(conn, pstmt);
}
return cetegory;
}
/**
* Remove the specified {@link Group} from this user database.
*
* @param group The group to be removed
*/
public void removeGroup(WorkflowGroup group)
{
}
/** Remove the specified {@link Department} from this user database.
*
* @param dept The dept to be removed
*/
public void removeDepartment(WorkflowDepartment dept)
{
}
/** Remove the specified {@link WorkflowRole} from this user database.
*
* @param role The role to be removed
*/
public void removeRole(WorkflowRole role)
{
}
/**
* Remove the specified {@link WorkflowParticipant} from this user database.
*
* @param user The user to be removed
*/
public void removeParticipant(WorkflowParticipant user)
{
}
/** Remove the specified {@link Rank} from this user database.
*
* @param rank The rank to be removed
*/
public void removeRank(WorkflowRank rank)
{
}
/**
* Remove the specified {@link Category} from this user database.
*
* @param category The category to be removed
*/
public void removeCategory(WorkflowCategory category)
{
}
public void start() throws WorkflowException
{
if (opened)
{
return;
}
super.start();
jResultSet jrs = null;
String strSQL = null;
try
{
//---------------------------------------------create user group relation
strSQL =
"SELECT vc_userid,vc_groupid FROM "
+ getSchemaContext().getTableName(SchemaContext.SCHEMA_USER_GROUP);
jrs = jStatement.executeQuery(getStore(), strSQL);
int sizeUserGroup = jrs.getRowCount();
for (int i = 1; i <= sizeUserGroup; ++i)
{
jrs.absolute(i);
String groupid = jrs.getString("vc_groupid");
String userid = jrs.getString("vc_userid");
WorkflowGroup workflowGroup = findGroup(groupid);
WorkflowParticipant workflowUser = findParticipant(userid);
workflowGroup.addPaticipant(workflowUser);
}
jrs.release();
//---------------------------------------------create user department relation
strSQL =
"SELECT vc_userid,vc_departmenetid FROM "
+ getSchemaContext().getTableName(SchemaContext.SCHEMA_USER_DEPARTMENT);
jrs = jStatement.executeQuery(getStore(), strSQL);
int sizeUserDept = jrs.getRowCount();
for (int i = 1; i <= sizeUserDept; ++i)
{
jrs.absolute(i);
String deptid = jrs.getString("vc_departmenetid");
String userid = jrs.getString("vc_userid");
WorkflowDepartment workflowDept = findDepartment(deptid);
WorkflowParticipant workflowUser = findParticipant(userid);
workflowDept.addPaticipant(workflowUser);
}
jrs.release();
//---------------------------------------------create user role relation
strSQL =
"SELECT vc_userid,vc_roleid FROM "
+ getSchemaContext().getTableName(SchemaContext.SCHEMA_USER_ROLE);
jrs = jStatement.executeQuery(getStore(), strSQL);
int sizeUserRole = jrs.getRowCount();
for (int i = 1; i <= sizeUserRole; ++i)
{
jrs.absolute(i);
String roleid = jrs.getString("vc_roleid");
String userid = jrs.getString("vc_userid");
WorkflowRole workflowRole = findRole(roleid);
WorkflowParticipant workflowUser = findParticipant(userid);
workflowRole.addPaticipant(workflowUser);
}
jrs.release();
}
catch (SQLException sqlex)
{
throw new WorkflowException(sqlex);
}
}
//---------------------------------------------------------------------------------
// generate Rank tree
//---------------------------------------------------------------------------------
public void genRankTree(HashMap ranks)
{
String strSQL =
"SELECT vc_uuid,vc_name,vc_description "
+ " FROM "
+ getSchemaContext().getTableName(SchemaContext.SCHEMA_RANK);
jResultSet jrs = null;
try
{
jrs = jStatement.executeQuery(getStore(), strSQL);
int sizeRank = jrs.getRowCount();
for (int i = 1; i <= sizeRank; ++i)
{
jrs.absolute(i);
ranks.put(
jrs.getString("vc_uuid"),
new WorkflowRankImpl(
jrs.getString("vc_uuid"),
jrs.getString("vc_name"),
jrs.getString("vc_description")));
}
jrs.release();
}
catch (SQLException ex)
{
;
}
}
//---------------------------------------------------------------------------------
// generate Category tree
//---------------------------------------------------------------------------------
public void genCategoryTree(HashMap categories)
{
String strSQL =
"SELECT vc_uuid,vc_name,vc_description "
+ " FROM "
+ getSchemaContext().getTableName(SchemaContext.SCHEMA_CATEGORY);
jResultSet jrs = null;
try
{
jrs = jStatement.executeQuery(getStore(), strSQL);
int sizeCategory = jrs.getRowCount();
for (int i = 1; i <= sizeCategory; ++i)
{
jrs.absolute(i);
categories.put(
jrs.getString("vc_uuid"),
new WorkflowCategoryImpl(
jrs.getString("vc_uuid"),
jrs.getString("vc_name"),
jrs.getString("vc_description")));
}
jrs.release();
}
catch (SQLException sqlex)
{
;
}
}
//---------------------------------------------------------------------------------
// generate WorkflowParticipant tree
//---------------------------------------------------------------------------------
public void genParticipantTree(HashMap participants)
{
String strSQL =
"SELECT vc_uuid,vc_name,vc_password,vc_fullname,vc_description,vc_rankid "
+ " "
+ " FROM "
+ getSchemaContext().getTableName(SchemaContext.SCHEMA_USER);
jResultSet jrs = null;
try
{
jrs = jStatement.executeQuery(getStore(), strSQL);
int sizeUser = jrs.getRowCount();
WorkflowParticipant participant = null;
for (int i = 1; i <= sizeUser; ++i)
{
jrs.absolute(i);
participant =
createParticipant_impl(
jrs.getString("vc_uuid"),
jrs.getString("vc_name"),
jrs.getString("vc_password"),
jrs.getString("vc_fullname"),
jrs.getString("vc_description"));
participant.setRank(findRank(jrs.getString("vc_rankid")));
participants.put(jrs.getString("vc_uuid"), participant);
}
jrs.release();
}
catch (SQLException sqlex)
{
;
}
strSQL =
"SELECT vc_userid,vc_packageId "
+ " "
+ " FROM "
+ getSchemaContext().getTableName(SchemaContext.SCHEMA_ADMIN);
try
{
jrs = jStatement.executeQuery(getStore(), strSQL);
int sizeAdmin = jrs.getRowCount();
for (int i = 1; i <= sizeAdmin; ++i)
{
jrs.absolute(i);
WorkflowParticipantImpl_RT participantImpl =
(WorkflowParticipantImpl_RT) this.findParticipant(jrs.getString("vc_userid"));
if ("all".equalsIgnoreCase(jrs.getString("vc_packageId")))
{
participantImpl.setSuperAdministrator(true);
}
else
{
participantImpl.addPackage(jrs.getString("vc_packageId"));
}
}
jrs.release();
}
catch (SQLException sqlex)
{
;
}
}
//---------------------------------------------------------------------------------
// generate WorkflowRole tree
//---------------------------------------------------------------------------------
public void genRoleTree(HashMap roles)
{
String strSQL =
"SELECT vc_uuid,vc_name,vc_description "
+ " FROM "
+ getSchemaContext().getTableName(SchemaContext.SCHEMA_ROLE);
jResultSet jrs = null;
try
{
jrs = jStatement.executeQuery(getStore(), strSQL);
int sizeRole = jrs.getRowCount();
for (int i = 1; i <= sizeRole; ++i)
{
jrs.absolute(i);
roles.put(
jrs.getString("vc_uuid"),
createRole(
jrs.getString("vc_uuid"),
jrs.getString("vc_name"),
jrs.getString("vc_description")));
}
jrs.release();
}
catch (SQLException sqlex)
{
;
}
}
//---------------------------------------------------------------------------------
// generate department tree
//---------------------------------------------------------------------------------
public void genDepartmentTree(HashMap departments, WorkflowDepartment parentDept)
{
String strSQL =
"SELECT vc_uuid,vc_name,vc_description,vc_categoryid,vc_presidentid FROM "
+ getSchemaContext().getTableName(SchemaContext.SCHEMA_DEPARTMENT);
if (parentDept == null)
{
strSQL += " WHERE vc_parent IS NULL";
try
{
jResultSet jrs = jStatement.executeQuery(getStore(), strSQL);
int sizeGroup = jrs.getRowCount();
for (int i = 1; i <= sizeGroup; ++i)
{
jrs.absolute(i);
WorkflowDepartment workflowDepartment =
createDepartment(
jrs.getString("vc_uuid"),
jrs.getString("vc_name"),
jrs.getString("vc_description"),
parentDept);
workflowDepartment.setCategory(findCategory(jrs.getString("vc_categoryid")));
workflowDepartment.setPresident(findParticipant(jrs.getString("vc_presidentid")));
departments.put(jrs.getString("vc_uuid"), workflowDepartment);
genDepartmentTree(departments, workflowDepartment);
}
jrs.release();
}
catch (SQLException sqlex)
{
;
}
}
else
{
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
strSQL += " WHERE vc_parent=?";
conn = ConnUtils.getConnection(getStore());
pstmt = conn.prepareStatement(strSQL);
pstmt.setString(1, parentDept.getUUID());
rs = pstmt.executeQuery();
while (rs.next())
{
WorkflowDepartment workflowDepartment =
createDepartment_impl(
rs.getString("vc_uuid"),
rs.getString("vc_name"),
rs.getString("vc_description"),
parentDept);
workflowDepartment.setCategory(findCategory(rs.getString("vc_categoryid")));
workflowDepartment.setPresident(findParticipant(rs.getString("vc_presidentid")));
departments.put(rs.getString("vc_uuid"), workflowDepartment);
genDepartmentTree(departments, workflowDepartment);
}
}
catch (SQLException sqlex)
{
;
}
finally
{
ConnUtils.cleanupNoThrow(conn, pstmt);
}
}
}
//---------------------------------------------------------------------------------
// generate group tree
//---------------------------------------------------------------------------------
public void genGroupTree(HashMap groups, WorkflowGroup parentGroup)
{
String strSQL =
"SELECT vc_uuid,vc_name,vc_description,vc_departmentid,vc_presidentid FROM "
+ getSchemaContext().getTableName(SchemaContext.SCHEMA_GROUP);
if (parentGroup == null)
{
try
{
strSQL += " WHERE vc_parent IS NULL";
jResultSet jrs = jStatement.executeQuery(getStore(), strSQL);
int sizeGroup = jrs.getRowCount();
for (int i = 1; i <= sizeGroup; ++i)
{
jrs.absolute(i);
WorkflowGroup workflowGroup =
createGroup_impl(
jrs.getString("vc_uuid"),
jrs.getString("vc_name"),
jrs.getString("vc_description"),
parentGroup);
workflowGroup.setDepartment(this.findDepartment(jrs.getString("vc_departmentid")));
workflowGroup.setPresident(this.findParticipant(jrs.getString("vc_presidentid")));
groups.put(jrs.getString("vc_uuid"), workflowGroup);
genGroupTree(groups, workflowGroup);
}
jrs.release();
}
catch (SQLException sqlex)
{
;
}
}
else
{
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
strSQL += " WHERE vc_parent=?";
conn = ConnUtils.getConnection(getStore());
pstmt = conn.prepareStatement(strSQL);
pstmt.setString(1, parentGroup.getName());
rs = pstmt.executeQuery();
while (rs.next())
{
WorkflowGroup workflowGroup =
createGroup_impl(
rs.getString("vc_uuid"),
rs.getString("vc_name"),
rs.getString("vc_description"),
parentGroup);
workflowGroup.setDepartment(this.findDepartment(rs.getString("vc_departmentid")));
workflowGroup.setPresident(this.findParticipant(rs.getString("vc_presidentid")));
groups.put(rs.getString("vc_uuid"), workflowGroup);
genGroupTree(groups, workflowGroup);
}
}
catch (SQLException ex)
{
;
}
finally
{
ConnUtils.cleanupNoThrow(conn, pstmt);
}
}
}
/**
* Create and return a new {@link Group} defined in this user database.
*
* @param groupid The group id of the new group (must be unique)
* @param groupname The group name of the new group
* @param description The description of this group
*/
public WorkflowGroup createGroup(String groupid, String groupname, String description)
{
return null;
}
public WorkflowGroup createGroup(String groupid, String groupname, String description, WorkflowGroup parentGroup)
{
return null;
}
/**
* Create and return a new {@link Department} defined in this user database.
*
* @param departmentid The department id of the new department (must be unique)
* @param departmentname The department name of the new department
* @param description The description of this department
*/
public WorkflowDepartment createDepartment(
String departmentid,
String departmentname,
String description)
{
return null;
}
public WorkflowDepartment createDepartment(
String departmentid,
String departmentname,
String description,
WorkflowDepartment parentDepartment)
{
return null;
}
/**
* Create and return a new {@link WorkflowRole} defined in this user database.
*
* @param roleid The role id of the new role (must be unique)
* @param rolename The role name of the new role
* @param description The description of this role
*/
public WorkflowRole createRole(String roleid, String rolename, String description)
{
return null;
}
/**
* Create and return a new {@link WorkflowParticipant} defined in this user database.
*
* @param userid The logon userid of the new user
* @param username The logon username of the new user (must be unique)
* @param password The logon password of the new user
* @param fullName The full name of the new user
*/
public WorkflowParticipant createParticipant(
String userid,
String username,
String password,
String fullName)
{
return null;
}
public WorkflowParticipant createParticipant(
String userid,
String username,
String password,
String fullName,
String description)
{
return null;
}
/**
* Create and return a new {@link Group} defined in this user database.
*
* @param groupid The group id of the new group (must be unique)
* @param groupname The group name of the new group
* @param description The description of this group
*/
public WorkflowGroup createGroup_impl(String groupid, String groupname, String description)
{
WorkflowGroup group = new WorkflowGroupImpl_RT(this, groupid, groupname, description);
return (group);
}
public WorkflowGroup createGroup_impl(
String groupid,
String groupname,
String description,
WorkflowGroup parentGroup)
{
WorkflowGroup group = new WorkflowGroupImpl_RT(this, groupid, groupname, description, parentGroup);
return (group);
}
/**
* Create and return a new {@link Department} defined in this user database.
*
* @param departmentid The department id of the new department (must be unique)
* @param departmentname The department name of the new department
* @param description The description of this department
*/
public WorkflowDepartment createDepartment_impl(
String departmentid,
String departmentname,
String description)
{
WorkflowDepartment department = new WorkflowDepartmentImpl_RT(this, departmentid, departmentname, description);
return (department);
}
public WorkflowDepartment createDepartment_impl(
String departmentid,
String departmentname,
String description,
WorkflowDepartment parentDepartment)
{
WorkflowDepartment department =
new WorkflowDepartmentImpl_RT(this, departmentid, departmentname, description, parentDepartment);
return (department);
}
/**
* Create and return a new {@link WorkflowRole} defined in this user database.
*
* @param roleid The role id of the new role (must be unique)
* @param rolename The role name of the new role
* @param description The description of this role
*/
public WorkflowRole createRole_impl(String roleid, String rolename, String description)
{
WorkflowRole role = new WorkflowRoleImpl_RT(this, roleid, rolename, description);
return (role);
}
/**
* Create and return a new {@link WorkflowParticipant} defined in this user database.
*
* @param userid The logon userid of the new user
* @param username The logon username of the new user (must be unique)
* @param password The logon password of the new user
* @param fullName The full name of the new user
*/
public WorkflowParticipant createParticipant_impl(
String userid,
String username,
String password,
String fullName)
{
WorkflowParticipantImpl_RT user = new WorkflowParticipantImpl_RT(this, userid, username, password, fullName);
return (user);
}
public WorkflowParticipant createParticipant_impl(
String userid,
String username,
String password,
String fullName,
String description)
{
WorkflowParticipantImpl_RT user =
new WorkflowParticipantImpl_RT(this, userid, username, password, fullName, description);
return (user);
}
}