|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.org.UpgradeUFIDsR6toR7
Migration strategy: Obtain all entries from the REMOTEOBJECTINFO table that reference objects of type WTUser and WTGroup. Query the LDAP service of each such object to determine the object's distinguished name. Set the object's normalized distinguished name as its REMOTEOBJECTID column value.
Field Summary | |
private static String |
CLASSNAME
|
private Connection |
connection
|
private String |
defaultDirectoryUser
|
private boolean |
DISABLE_PRINCIPAL
|
private DirectiveServices |
ds
|
private HashMap |
groupIds
|
private HashMap |
groupServices
|
private String |
PJL_GROUP_SERVICE
|
private static String |
RESOURCE
|
private HashMap |
services
HashMap of LDAP service names, keyed by repository OID. |
private Vector |
unableToLocatePrincipals
This vector is a list of Principals that were not found in the list of adapters. |
private HashMap |
userIds
HashMaps, keyed by UFID OID, of REMOTEOBJECTID values and associated LDAP service names. |
private HashMap |
userServices
|
private boolean |
VERBOSE
|
Constructor Summary | |
UpgradeUFIDsR6toR7()
|
Method Summary | |
private void |
disablePrincipal(String oid,
String name,
String service,
boolean userFlag)
Disables specified principal; mangles the name, and deletes the REMOTEOBJECTINFO table |
private String |
escape(String s)
|
private String |
getDN(String remoteObjectInfo,
String service,
String oid,
boolean userFlag)
Query an LDAP service for a principal and, if found, return the entry's normalized distinguished name. |
private void |
getServices()
Gets the names information services and their corresponding OIDs. |
private void |
getUFIDs()
Gets REMOTEOBJECTID values of UFID's of all users and groups. |
private void |
initialize()
initialize. |
private static String |
nextUp(String name)
|
boolean |
runMigration(DirectiveServices ds)
Run the migration. |
private static void |
safeClose(ResultSet rs)
If the Statement is not null, try to close it, catching and smothering any SQLException that results. |
private void |
safeClose(Statement stmt)
If the Statement is not null, try to close it, catching and smothering any SQLException that results. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String CLASSNAME
private static final String RESOURCE
private Connection connection
private String defaultDirectoryUser
private DirectiveServices ds
private boolean VERBOSE
private boolean DISABLE_PRINCIPAL
private String PJL_GROUP_SERVICE
private HashMap services
private HashMap userIds
private HashMap userServices
private HashMap groupIds
private HashMap groupServices
private Vector unableToLocatePrincipals
Constructor Detail |
public UpgradeUFIDsR6toR7()
Method Detail |
public boolean runMigration(DirectiveServices ds) throws SQLException, IOException, ClassNotFoundException, WTException, IEException, Exception
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
ds
- provide access to database, logging, and versioning information
SQLException
IOException
ClassNotFoundException
WTException
IEException
Exception
private void initialize() throws WTException, IOException, IEException, Exception
WTException
IOException
IEException
Exception
private String getDN(String remoteObjectInfo, String service, String oid, boolean userFlag) throws SQLException, IOException, IEException, WTException, ClassNotFoundException
SQLException
IOException
IEException
WTException
ClassNotFoundException
private void getServices() throws SQLException, IOException, WTException, DatastoreException, IEException
SQLException
IOException
WTException
DatastoreException
IEException
private void getUFIDs() throws SQLException, IOException, WTException, ClassNotFoundException, DatastoreException, IEException
SQLException
IOException
WTException
ClassNotFoundException
DatastoreException
IEException
private void disablePrincipal(String oid, String name, String service, boolean userFlag) throws SQLException, IOException, WTException, ClassNotFoundException, DatastoreException, IEException
SQLException
IOException
WTException
ClassNotFoundException
DatastoreException
IEException
private String escape(String s)
private void safeClose(Statement stmt)
private static void safeClose(ResultSet rs)
private static String nextUp(String name)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |