|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.admin.ReparentDomainsMigrator
Prior to R6, the parent of all domains was the global system domain. Now the parent of all domains created prior to R6 is to be the root domain. This migrator needs to do the following: - create a root domain. - create accessPolicyRules for the root Domain: 1) for Administrators group give ALL permissions to all objects. 2) Give READ permission to all users for AdministrativeDomain objects. - change the parent of domains whose parent is currently the global system domain to now be the root domain. - AccessPolicyRule, IndexPolicyRule, and NotificationRule classes were made DomainAdministered in R6, so will have new columns: CLASSNAMEKEYDOMAINREF VARCHAR2(200) IDA3DOMAINREF NUMBER These columns need to be populated in existing rules.
Field Summary | |
private String |
ADMIN_GROUP_NAME
|
private String |
all_id
|
private PrintWriter |
debugLog
|
private String |
read_id
|
private String |
ROOT_DOMAIN
|
private long |
root_domain_id
|
private String |
SYSTEM_DOMAIN
|
private long |
system_id
|
Constructor Summary | |
ReparentDomainsMigrator()
|
Method Summary | |
private void |
changeAlltoRootDomain(Connection connection)
Change all AdministrativeDomains that currently have the parent as the global system domain to now have as the parent, Root. |
private void |
createRootDomain(Connection connection)
create Root Domain |
private void |
createRootDomainRules(Connection connection)
create Root Domain's accessPolicyRules. |
private void |
populateNewColumns(Connection connection)
Populate new columns in tables AccessPolicyRule, NotificationRule, IndexPolicyRule. |
boolean |
runMigration(Connection connection,
PersistentObjectManager pom,
PrintWriter logWriter)
Run the migration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private String all_id
private String ADMIN_GROUP_NAME
private PrintWriter debugLog
private String read_id
private String ROOT_DOMAIN
private long root_domain_id
private String SYSTEM_DOMAIN
private long system_id
Constructor Detail |
public ReparentDomainsMigrator()
Method Detail |
public boolean runMigration(Connection connection, PersistentObjectManager pom, PrintWriter logWriter) throws SQLException, WTIntrospectionException, DatastoreException, IOException, ClassNotFoundException, WTException, InvalidPermissionException
Migrator
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 Migrator
connection
- an open connection to the Windchill databasepom
- a persistent object manager against the Windchill databaselogWriter
- an autoflush printwriter for logging any and all output
SQLException
WTIntrospectionException
DatastoreException
IOException
ClassNotFoundException
WTException
InvalidPermissionException
private void createRootDomain(Connection connection) throws SQLException, IOException, PersistenceException, DatastoreException
SQLException
IOException
PersistenceException
DatastoreException
private void createRootDomainRules(Connection connection) throws SQLException, IOException, PersistenceException, DatastoreException
SQLException
IOException
PersistenceException
DatastoreException
private void changeAlltoRootDomain(Connection connection) throws SQLException
SQLException
private void populateNewColumns(Connection connection) throws SQLException
SQLException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |