com.atlassian.confluence.user.migration
Class AtlassianUserDataMigrator
java.lang.Object
com.atlassian.confluence.user.migration.AtlassianUserDataMigrator
public final class AtlassianUserDataMigrator
- extends Object
Convert all users and groups in the Confluence Hibernate repository to internal directory users
in Embedded Crowd. The assumption is that if someone was in the database before the upgrade
they should still be in the database afterwards.
Note: we have to do this the one-by-one way rather than doing it in the database because
otherwise Crowd will not get the chance to do things like case-normalisation in its own way.
Could be also used for on-demand migration after an upgrade, but you should be careful that you
don't clobber data. The upgrade task checks for existing users before doing any migration.
- Since:
- 3.5
- See Also:
AtlassianUserToEmbeddedCrowdDataUpgradeTask
Constructor Summary |
AtlassianUserDataMigrator(net.sf.hibernate.SessionFactory sessionFactory,
com.atlassian.crowd.embedded.spi.UserDao userDao,
com.atlassian.crowd.embedded.spi.GroupDao groupDao,
com.atlassian.crowd.embedded.spi.MembershipDao membershipDao,
com.atlassian.crowd.embedded.api.CrowdService crowdService)
|
Method Summary |
void |
migrateExternalMemberships()
|
void |
migrateGroupMemberships(com.atlassian.crowd.embedded.api.Directory internalDirectory)
|
void |
migrateGroups(com.atlassian.crowd.embedded.api.Directory internalDirectory)
|
void |
migrateUserProperties(com.atlassian.crowd.embedded.api.Directory internalDirectory)
Migrates user properties from post-2.7 versions of Confluence by changing
entity_name s in the os_propertyentry table to CWD_<lowercase_username>. |
void |
migrateUsers(com.atlassian.crowd.embedded.api.Directory internalDirectory)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AtlassianUserDataMigrator
public AtlassianUserDataMigrator(net.sf.hibernate.SessionFactory sessionFactory,
com.atlassian.crowd.embedded.spi.UserDao userDao,
com.atlassian.crowd.embedded.spi.GroupDao groupDao,
com.atlassian.crowd.embedded.spi.MembershipDao membershipDao,
com.atlassian.crowd.embedded.api.CrowdService crowdService)
migrateUserProperties
public void migrateUserProperties(com.atlassian.crowd.embedded.api.Directory internalDirectory)
- Migrates user properties from post-2.7 versions of Confluence by changing
entity_name
s in the os_propertyentry
table to CWD_<lowercase_username>.
If users with the same (case-insensitive) entity_name
exist from different repositories,
we should treat them all as the same user. In this case, the properties of the user with
the most recent activity against the username will be preserved, all others will be removed.
- Parameters:
internalDirectory
- The directory to migrate to
migrateGroupMemberships
public void migrateGroupMemberships(com.atlassian.crowd.embedded.api.Directory internalDirectory)
migrateUsers
public void migrateUsers(com.atlassian.crowd.embedded.api.Directory internalDirectory)
migrateGroups
public void migrateGroups(com.atlassian.crowd.embedded.api.Directory internalDirectory)
migrateExternalMemberships
public void migrateExternalMemberships()
Copyright © 2003-2012 Atlassian. All Rights Reserved.