com.atlassian.confluence.upgrade.upgradetask
Class AbstractUserMappingUpgradeTask

java.lang.Object
  extended by com.atlassian.confluence.upgrade.AbstractUpgradeTask
      extended by com.atlassian.confluence.upgrade.upgradetask.AbstractUserMappingUpgradeTask
All Implemented Interfaces:
BackupSupport, DatabaseUpgradeTask, UpgradeTask, UpgradeTaskInfo, org.springframework.beans.factory.BeanNameAware
Direct Known Subclasses:
CrowdUsersUserMappingUpgradeTask, ReferencedUsersUserMappingUpgradeTask

public abstract class AbstractUserMappingUpgradeTask
extends AbstractUpgradeTask
implements DatabaseUpgradeTask

Upgrade task to ensure that for all the user names in Confluence a ConfluenceUser object exist. As well as taking the user names from the Crowd tables, the various username related columns across all content table are considered. This is consistent with Confluence's behaviour of allowing content to be owned/created/modified/whatever by non-existent users. Note that various "post schema" upgrade tasks assume this task has already run and make the assumption that all content referenced users as well as crowd users (which may not yet have associated content) are populated in the user_mapping table (ConfluenceUser). e.g. UserIndexingUpgradeTask.


Field Summary
 
Fields inherited from interface com.atlassian.confluence.upgrade.UpgradeTask
log
 
Constructor Summary
AbstractUserMappingUpgradeTask(ConfluenceUserDao confluenceUserDao, BatchOperationManager batchOperationManager)
           
 
Method Summary
 void doUpgrade()
          Perform the upgrade.
protected abstract  Set<String> getUsernamesMissingMapping()
           
 
Methods inherited from class com.atlassian.confluence.upgrade.AbstractUpgradeTask
addAllErrors, addError, addError, getBuildNumber, getConstraint, getErrors, getName, getShortDescription, isDatabaseUpgrade, setBeanName, setBuildNumber, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.confluence.upgrade.UpgradeTask
getConstraint, getErrors, validate
 
Methods inherited from interface com.atlassian.confluence.upgrade.UpgradeTaskInfo
getBuildNumber, getName, getShortDescription, isDatabaseUpgrade
 
Methods inherited from interface com.atlassian.confluence.upgrade.BackupSupport
breaksBackwardCompatibility, runOnSpaceImport
 

Constructor Detail

AbstractUserMappingUpgradeTask

public AbstractUserMappingUpgradeTask(ConfluenceUserDao confluenceUserDao,
                                      BatchOperationManager batchOperationManager)
Method Detail

doUpgrade

public void doUpgrade()
               throws Exception
Description copied from interface: UpgradeTask
Perform the upgrade.

Specified by:
doUpgrade in interface UpgradeTask
Throws:
Exception

getUsernamesMissingMapping

protected abstract Set<String> getUsernamesMissingMapping()


Copyright © 2003–2015 Atlassian. All rights reserved.