wt.admin
Class PolicyRuleMigrator

java.lang.Object
  extended bywt.admin.PolicyRuleMigrator
All Implemented Interfaces:
JavaMigrator

public class PolicyRuleMigrator
extends Object
implements JavaMigrator

PolicyRuleMigrator Windchill Release 6.2 changes the domain that access control, indexing and notification rules belong to from the System domain to the domain the rule is for. This facilitates distributed administration by allowing different groups of administrators to be able to manage rules in different domains. This migrator changes the domain of existing policy rules, and creates access control rules for the policy rule classes in the root domain, corresponding to rules that were previously defined in the System domain. The later ensures that administrators who previously had permissions to manage rules will still be able to manage those rules in their new domains. Sites can update the access control rules following migration to enable distributed administration.


Field Summary
private  Connection connection
           
private  DirectiveServices ds
           
private static String INSERT_ACCESS_CONTROL_RULE
           
private static String ROOT_DOMAIN
           
private  long root_domain_id
           
private static String SYSTEM_DOMAIN
           
private  long system_domain_id
           
private static boolean VERBOSE
           
 
Constructor Summary
PolicyRuleMigrator()
           
 
Method Summary
private  void changeRulesDomain()
           
private  void copySystemDomainRules()
           
private  void mergeAccessControlRules(String type_id, AclMigrationUtilities.M_AclEntrySet entry_set)
           
 boolean runMigration(DirectiveServices directive_services)
          Run the migration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT_DOMAIN

private static final String ROOT_DOMAIN

SYSTEM_DOMAIN

private static final String SYSTEM_DOMAIN

VERBOSE

private static final boolean VERBOSE

INSERT_ACCESS_CONTROL_RULE

private static final String INSERT_ACCESS_CONTROL_RULE
See Also:
Constant Field Values

root_domain_id

private long root_domain_id

system_domain_id

private long system_domain_id

connection

private Connection connection

ds

private DirectiveServices ds
Constructor Detail

PolicyRuleMigrator

public PolicyRuleMigrator()
Method Detail

runMigration

public boolean runMigration(DirectiveServices directive_services)
                     throws Throwable
Run the migration. Returns true if the migration completed successfully, otherwise returns false.

Specified by:
runMigration in interface JavaMigrator
Parameters:
directive_services - provide access to database, logging, and versioning information
Throws:
Throwable - declared so that migrators can let exceptions contributing to failure pass out of the method. The migrator runner will handle these by logging them.

changeRulesDomain

private void changeRulesDomain()
                        throws SQLException
Throws:
SQLException

copySystemDomainRules

private void copySystemDomainRules()
                            throws WTException,
                                   SQLException
Throws:
WTException
SQLException

mergeAccessControlRules

private void mergeAccessControlRules(String type_id,
                                     AclMigrationUtilities.M_AclEntrySet entry_set)
                              throws WTException,
                                     SQLException
Throws:
WTException
SQLException