|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.team.MigrateProjectToTeamObject
[5/6/2003 Susan Li]: Modify this migrator for 7.0: 1. remove creating Team for Project2. This version is only used for WNC pre-6.2 to 7.0. PJL don't use it so no need to create ContainerTeam for Project2. 2. remove RolePrincipalLink, instead put all info into RolePrincipalMap. 3. remove usage of ProjectDomainLink. This object is for PJL, WNC don't use it.
Constructor Summary | |
MigrateProjectToTeamObject()
|
Method Summary | |
protected void |
addTeamName(String name)
|
protected void |
batch(PreparedStatement preparedStatement,
String key)
|
private void |
close(PreparedStatement stmt,
int batchedUpdates)
|
protected void |
closePreparedStatements()
|
private String |
convertPrjVarString(String prj)
|
private String |
convertPrjVarToTTString(String prj)
|
static void |
createFederatedLink(String teamType,
long teamObjectId,
long projId)
|
void |
createLink(String table,
String roleClassName,
long teamObjectId,
long projId,
boolean roleA)
|
protected void |
createPreparedStatement(String key,
String sqlStatement)
|
private void |
createProjectMappings(Project project,
long teamTemplateId)
|
void |
createRoleActorRoleMap(Role role,
ActorRole actorRole,
long teamTemplateId)
|
protected String |
createRoleholderMappings(RoleHolder roleHolder,
long teamId,
String entryset)
|
void |
createRolePrincipalMap(String princClass,
String princOid,
Role role,
long teamObjectId,
String teamType)
|
protected void |
createStatements()
|
private long |
createTeam(ResultSet rs,
RoleHolder roleHolder,
boolean fromProject,
long templateOid,
String name,
Vector processes)
|
private long |
createTeamForVar(ResultSet rs,
RoleHolder roleHolder,
long templateOid,
String name)
|
private void |
createTeamTemplate(ResultSet rs,
Project project)
|
void |
fixWAATLocalProjects()
|
PreparedStatement |
fixWAATProjectAssignees(String templateRef,
PreparedStatement pStmt)
Fixes project references within WfAssignedActivityTemplates. |
protected long |
getAdministrator()
|
protected String |
getClassname(String pbo)
|
private long |
getMakeTeamForPrj(Project prj)
|
protected String |
getOid(String pbo)
|
protected PreparedStatement |
getPreparedStatement(String key)
|
protected RoleHolder |
getProject(String key)
|
static void |
getProjects()
|
private Enumeration |
getRoles(RoleHolder roleHolder)
|
protected long |
getSystem()
|
protected String |
getTable(String pbo)
|
protected long |
getTeamTemplateId(String key)
|
static void |
getWAATsWithProjectAssignees()
|
protected WfProcess |
getWf(Vector wfVector,
String oid)
|
protected WfProcess |
getWfProcess(String key)
|
static void |
getWfProcesses()
|
static void |
getWfProcessTemplates()
This method returns all the WfProcessTemplate objects. |
protected void |
initializePreparedStatements()
|
private void |
loadTemplateObjs()
|
int |
migratePrefs()
|
int |
migrateProjects()
This method migrates all the project objects into team templates or teams |
int |
migrateRoleHolders()
|
int |
migrateWA()
This method finds WfAssignee's with project assignee in the ASSIGNEE attribute. |
int |
migrateWAATs()
|
int |
migrateWEO()
This method updates the WfExecutionObject's ProcessData and returns the number of records updated. |
int |
migrateWTO()
This method updates the WfTemplateObject's ProcessDataInfo and returns the number of records updated. |
boolean |
runMigration(DirectiveServices directiveServices)
Run the migration. |
protected void |
setConnection(Connection a_connection)
|
protected void |
setDirectiveServices(DirectiveServices directiveServices)
|
protected void |
setPds(PDSIfc a_pds)
|
protected void |
setPom(PersistentObjectManager a_pom)
|
private void |
setupPrerequisites()
|
protected void |
setWtconnection(WTConnection a_wtconnection)
|
boolean |
updateContext(ProcessData ctx)
|
boolean |
updateContextSignature(ProcessDataInfo ctxSig)
|
int |
updateLcmdWOWf()
This method returns all the lcmd objects. |
protected int |
updateObject(String oid,
String projId,
String table,
String columnSearch)
|
private int |
updateObject(String pbo,
Vector wfVector,
String projId)
|
static PreparedStatement |
updatePref(long oid,
String newValue,
PreparedStatement pStatement)
|
void |
updateRow(long teamId,
long teamTemplateId,
ProcessData context,
String objectId,
String table)
Overloaded updateRow to handle ProcessData object. |
void |
updateRow(long teamId,
long teamTemplateId,
String objectId,
String table)
|
PreparedStatement |
updateWA(String oid,
WfAssignee wa,
String table)
Update the WfAssgnment's ASSIGNEE attribute. |
static PreparedStatement |
updateWAATRow(String objectId,
String teamId,
String teamTemplateId,
PreparedStatement pStatement)
|
static PreparedStatement |
updateWAATRow(TeamRefVector tRV,
String objectId,
PreparedStatement pStatement)
|
PreparedStatement |
updateWEO(String oid,
ProcessData pData,
String table)
Update the WfExecutionObject's ProcessData CONTEXT attribute. |
private void |
updateWf(WfProcess wfProcess,
long teamId,
long teamTemplateId)
|
WfTeamAssignee |
updateWfAssignee(WfAssignee wa)
|
PreparedStatement |
updateWTO(String oid,
ProcessDataInfo pDataInfo,
String table)
Update the WfTemplateObject's ProcessDataInfo CONTEXTSIGNATURE attribute. |
int |
upgrade()
|
protected String |
validateTeamName(String name)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String FC_RESOURCE
private static final String CLASSNAME
private static Hashtable ht
private static Hashtable wfProcesses
private static Hashtable assignedActivityTemplates
private static Hashtable templates
private static Hashtable templateObjs
private static Hashtable preparedStatements
private static Hashtable batchCounts
private static Hashtable teamNames
private static PersistentObjectManager pom
private static Connection connection
private static WTConnection wtconnection
private static DirectiveServices directive_services
private static AccessControllerAdapter aca
private static boolean VERBOSE
private static long administrator
private static long system
private static PDSIfc pds
private static LobHandler lobHandler
private static LobLocator wtoLobLocator
private static LobLocator weoLobLocator
private static LobLocator waLobLocator
private static boolean MIGRATE_ALL_WFLS
private static WTProperties properties
private static Map rpms
private static Map rarms
Constructor Detail |
public MigrateProjectToTeamObject()
Method Detail |
public boolean runMigration(DirectiveServices directiveServices) throws SQLException, DirectiveExecutionException
JavaMigrator
Migrators should log all output to the given PrintWriter. This is the log that is created by RunMigrators. It is an autoflush writer.
Migrators should return true if they successfully completed migration and false otherwise. It is the migrator's responsibility to log failure reasons to the log.
Migrators should not concern themselves with committing the work on the connection. The MigratorRunner will commit the connection work after running each Migrator.
runMigration
in interface JavaMigrator
directiveServices
- provide access to database, logging, and versioning information
SQLException
DirectiveExecutionException
public int upgrade() throws WTException, SQLException
WTException
SQLException
public int migrateProjects() throws WTException
WTException
public int migrateRoleHolders() throws WTException, SQLException
WTException
SQLException
private void updateWf(WfProcess wfProcess, long teamId, long teamTemplateId) throws WTException
WTException
private void createTeamTemplate(ResultSet rs, Project project) throws WTException, SQLException
WTException
SQLException
private void createProjectMappings(Project project, long teamTemplateId) throws WTException
WTException
protected String createRoleholderMappings(RoleHolder roleHolder, long teamId, String entryset) throws WTException
WTException
private long createTeam(ResultSet rs, RoleHolder roleHolder, boolean fromProject, long templateOid, String name, Vector processes) throws WTException, SQLException
WTException
SQLException
public void createRolePrincipalMap(String princClass, String princOid, Role role, long teamObjectId, String teamType) throws WTException
WTException
public void createRoleActorRoleMap(Role role, ActorRole actorRole, long teamTemplateId) throws WTException
WTException
public static void getProjects() throws WTException
WTException
protected String validateTeamName(String name) throws WTException
WTException
protected WfProcess getWf(Vector wfVector, String oid) throws WTException
WTException
private Enumeration getRoles(RoleHolder roleHolder)
public static void getWfProcesses() throws WTException
WTException
public static void getWfProcessTemplates() throws WTException
WTException
public int updateLcmdWOWf() throws WTException, SQLException
WTException
SQLException
public void updateRow(long teamId, long teamTemplateId, String objectId, String table) throws WTException
WTException
public void updateRow(long teamId, long teamTemplateId, ProcessData context, String objectId, String table) throws WTException
WTException
public void createLink(String table, String roleClassName, long teamObjectId, long projId, boolean roleA) throws WTException, SQLException
WTException
SQLException
public static void createFederatedLink(String teamType, long teamObjectId, long projId) throws WTException, SQLException
WTException
SQLException
private void close(PreparedStatement stmt, int batchedUpdates) throws WTException
WTException
protected void createPreparedStatement(String key, String sqlStatement) throws WTException
WTException
protected void batch(PreparedStatement preparedStatement, String key) throws WTException
WTException
protected void createStatements() throws WTException
WTException
public int migrateWAATs() throws WTException, SQLException
WTException
SQLException
public static void getWAATsWithProjectAssignees() throws WTException
WTException
public void fixWAATLocalProjects() throws WTException
WTException
public PreparedStatement fixWAATProjectAssignees(String templateRef, PreparedStatement pStmt) throws WTException, SQLException
WTException
SQLException
public static PreparedStatement updateWAATRow(TeamRefVector tRV, String objectId, PreparedStatement pStatement) throws WTException, SQLException
WTException
SQLException
public static PreparedStatement updateWAATRow(String objectId, String teamId, String teamTemplateId, PreparedStatement pStatement) throws WTException, SQLException
WTException
SQLException
public int migratePrefs() throws WTException, SQLException
WTException
SQLException
public static PreparedStatement updatePref(long oid, String newValue, PreparedStatement pStatement) throws WTException, SQLException
WTException
SQLException
private void setupPrerequisites() throws WTException
WTException
private int updateObject(String pbo, Vector wfVector, String projId) throws WTException, SQLException
WTException
SQLException
protected int updateObject(String oid, String projId, String table, String columnSearch) throws WTException, SQLException
WTException
SQLException
protected String getTable(String pbo) throws WTException
WTException
protected String getClassname(String pbo) throws WTException
WTException
protected String getOid(String pbo) throws WTException
WTException
public int migrateWTO() throws WTException, SQLException
WTException
SQLException
public int migrateWEO() throws WTException, SQLException
WTException
SQLException
public int migrateWA() throws WTException, SQLException
WTException
SQLException
public boolean updateContextSignature(ProcessDataInfo ctxSig) throws WTException
WTException
public boolean updateContext(ProcessData ctx) throws WTException
WTException
public WfTeamAssignee updateWfAssignee(WfAssignee wa) throws SQLException, WTException
SQLException
WTException
public PreparedStatement updateWTO(String oid, ProcessDataInfo pDataInfo, String table) throws WTException, SQLException
WTException
SQLException
public PreparedStatement updateWEO(String oid, ProcessData pData, String table) throws WTException, SQLException
WTException
SQLException
public PreparedStatement updateWA(String oid, WfAssignee wa, String table) throws WTException, SQLException
WTException
SQLException
private String convertPrjVarString(String prj) throws SQLException, WTException
SQLException
WTException
private String convertPrjVarToTTString(String prj) throws WTException
WTException
private void loadTemplateObjs() throws WTException
WTException
private long getMakeTeamForPrj(Project prj) throws SQLException
SQLException
private long createTeamForVar(ResultSet rs, RoleHolder roleHolder, long templateOid, String name) throws WTException, SQLException
WTException
SQLException
protected void setConnection(Connection a_connection)
protected void setWtconnection(WTConnection a_wtconnection)
protected void setDirectiveServices(DirectiveServices directiveServices)
protected void setPds(PDSIfc a_pds)
protected void setPom(PersistentObjectManager a_pom)
protected RoleHolder getProject(String key)
protected long getTeamTemplateId(String key)
protected long getAdministrator() throws WTException
WTException
protected long getSystem() throws WTException
WTException
protected PreparedStatement getPreparedStatement(String key)
protected void closePreparedStatements() throws WTException
WTException
protected void initializePreparedStatements()
protected void addTeamName(String name)
protected WfProcess getWfProcess(String key)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |