|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.access.AccessControlObjectMigrator
Constructor Summary | |
AccessControlObjectMigrator()
|
Method Summary | |
private Object |
createWTAclEntries(PreparedStatement insertStmt,
String entrySet,
String aclClassName,
long aclId)
|
private void |
deleteTmpFiles()
|
private Object |
evaluateCachedEntries(HashMap positiveEntries,
HashMap negativeEntries)
|
private void |
gatherAccessPolicyRules()
|
private void |
gatherAdHocControlled()
|
private void |
gatherRolePermissions()
|
private PreparedStatement |
getUpdateInlineBlobStmt(String tableName,
String columnName,
boolean blob)
|
private Blob |
initEmptyBlob(String tableName,
String blobColumnName,
String aclIdStr)
|
boolean |
runMigration(DirectiveServices ds)
Run the migration. |
private static void |
safeClose(ResultSet rs)
If the ResultSet 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. |
private void |
setupTmpFiles()
|
private void |
updateAdHocAclSpecs()
|
private void |
updateWTAclEntryObjects()
|
private void |
writeInlineBlob(PreparedStatement noBlobStmt,
PreparedStatement blobStmt,
Object blob,
String blobColumnName,
String tableName,
String aclIdStr)
|
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 CABINET
private static final String SUBFOLDER
private static final String WTACLENTRY
private static final String WTGROUP
private static final String WTPRINCIPALREFERENCE
private static final String WTUSER
private static final String ALL_ID
private static final String OWNER_ID
private static final String ACCESSPOLICYRULE_FILENAME
private static final String ADHOCCONTROLLED_FILENAME
private static final String ROLEPERMISSIONS_FILENAME
private static final String CLASS_INDICATOR
private static final String TMP_DIRECTORY_NAME
private static final String TMP_FILE_DELIM
private static final String COLON
private static final String BLOB_PREFIX
private static final String INSERT_SQL
private static final short STREAM_VERSION
private static final String GROUP_TARGET_KEY
private static final String PROXYGROUP_TARGET_KEY
private static final String PROXYUSER_TARGET_KEY
private static final String ROLE_TARGET_KEY
private static final String USER_TARGET_KEY
private static boolean VERBOSE
private static boolean VERBOSE_TIMING
private static int MAX_BATCH_SIZE
private Connection connection
private DirectiveServices ds
private Statement globalStatement_
private File tmpdir
private File rolePermissionsFile
private File adHocControlledFile
private File policyRulesFile
private int blobBatchSize
private int insertBatchSize
private int noBlobBatchSize
private int blobCount
private int entryCount
private int noBlobCount
private long endTime
private long startTime
Constructor Detail |
public AccessControlObjectMigrator()
Method Detail |
public boolean runMigration(DirectiveServices ds) throws ClassNotFoundException, IOException, SQLException, WTException
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
ClassNotFoundException
IOException
SQLException
WTException
private void setupTmpFiles() throws IOException
IOException
private void gatherAccessPolicyRules() throws ClassNotFoundException, DatastoreException, IOException, SQLException, WTException
ClassNotFoundException
DatastoreException
IOException
SQLException
WTException
private void gatherAdHocControlled() throws ClassNotFoundException, DatastoreException, SQLException, IOException, WTException
ClassNotFoundException
DatastoreException
SQLException
IOException
WTException
private void gatherRolePermissions() throws DatastoreException, IOException, SQLException, WTException
DatastoreException
IOException
SQLException
WTException
private void updateWTAclEntryObjects() throws ClassNotFoundException, IOException, SQLException, WTException
ClassNotFoundException
IOException
SQLException
WTException
private PreparedStatement getUpdateInlineBlobStmt(String tableName, String columnName, boolean blob) throws SQLException, WTIntrospectionException
SQLException
WTIntrospectionException
private Object createWTAclEntries(PreparedStatement insertStmt, String entrySet, String aclClassName, long aclId) throws IOException, SQLException, WTException
IOException
SQLException
WTException
private Object evaluateCachedEntries(HashMap positiveEntries, HashMap negativeEntries) throws IOException
IOException
private void writeInlineBlob(PreparedStatement noBlobStmt, PreparedStatement blobStmt, Object blob, String blobColumnName, String tableName, String aclIdStr) throws IOException, SQLException, WTException
IOException
SQLException
WTException
private Blob initEmptyBlob(String tableName, String blobColumnName, String aclIdStr) throws SQLException, WTException
SQLException
WTException
private void updateAdHocAclSpecs() throws DatastoreException, IOException, SQLException, WTException
DatastoreException
IOException
SQLException
WTException
private void deleteTmpFiles() throws IOException
IOException
private static void safeClose(ResultSet rs)
private void safeClose(Statement stmt)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |