wt.access
Class AclEntrySetMigrator

java.lang.Object
  extended bywt.access.AclEntrySetMigrator
All Implemented Interfaces:
JavaMigrator

public class AclEntrySetMigrator
extends Object
implements JavaMigrator

AclEntrySetMigrator Windchill Release 5.1 changed the format of AclEntrySet attributes. Lazy migration was used to decode the old format into the new string format. The initial release contained a bug that created the potential for the new string format of the attribute to become corrupted. The bug was fixed in a DSU, but any AclEntrySet attributes that had been corrupted remained. This migrator checks for any attributes that are either in the old format, or are corrupted, and updates the values.


Field Summary
private  Connection connection
           
private  DirectiveServices ds
           
private static boolean VERBOSE
           
 
Constructor Summary
AclEntrySetMigrator()
           
 
Method Summary
 boolean runMigration(DirectiveServices directive_services)
          Run the migration.
private  void updateAccessObjects()
          Migrate AclEntrySet in access control rules and ad hoc ACL specifications.
private  void updateAdHocControlled()
          Migrate AclEntrySet in AdHocControlled objects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERBOSE

private static final boolean VERBOSE

connection

private Connection connection

ds

private DirectiveServices ds
Constructor Detail

AclEntrySetMigrator

public AclEntrySetMigrator()
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.

updateAdHocControlled

private void updateAdHocControlled()
                            throws SQLException,
                                   WTIntrospectionException
Migrate AclEntrySet in AdHocControlled objects

Throws:
SQLException
WTIntrospectionException

updateAccessObjects

private void updateAccessObjects()
                          throws SQLException
Migrate AclEntrySet in access control rules and ad hoc ACL specifications. Policy ACLs don't need to be migrated because they will be deleted by an incremental update.

Throws:
SQLException