com.atlassian.confluence.upgrade
Class AbstractUpgradeTask
java.lang.Object
com.atlassian.confluence.upgrade.AbstractUpgradeTask
- All Implemented Interfaces:
- BackupSupport, UpgradeTask
- Direct Known Subclasses:
- AbstractConstraintCreationUpgradeTask, AbstractDeferredRunUpgradeTask, AbstractUserMappingUpgradeTask, AddSpaceStatusColumnUpgradeTask, AddUniqueAttachmentIdConstraintToAttachmentDataUpgradeTask, AtlassianUserToEmbeddedCrowdConfigurationUpgradeTask, AttachmentLabellingUpgradeTask, BandanaKeyUniqueConstraintUpgradeTask, ContentPermissionConstraintsUpgradeTask, ContentPermissionUserDeduplicationUpgradeTask, CorrectPNGImageAttachmentMimeTypeUpgradeTask, DefaultSpaceContentPageLayoutsUpgradeTask, DeleteDidYouMeanIndexFolderUpgradeTask, DropContentLockTableUpgradeTask, EhCacheConfigMigrationUpgradeTask, EmbeddedCrowdInitUpgradeTask, EmbeddedCrowdPropertySetFactoryMigrationUpgradeTask, EmbeddedCrowdSynchronisationUpgradeTask, InstallationDateUpgradeTask, LikesDanglingFKCleanupUpgradeTask, LoginInfoDuplicateEntryRemovalUpgradeTask, LowerCaseUsernameReferencesUpgradeTask, MailConvertToCustomContentUpgradeTask, MailServerUpgradeTask, MigrateMailArchiveConfigurationUpgradeTask, MigrateOndemandDocThemeCustomizations, NewColourUpgradeTask, NotificationPageColumnUpgradeTask, OnDemandSpacePermissionsDefaultUpgradeTask, PersonalSpaceCreatorCheckUpgradeTask, RemoveEmailToPageWelcomeUpgradeTask, RemoveFixedWidthThemeUpgradeTask, RemoveRemoteAppsPluginUpgradeTask, UserIndexingUpgradeTask, UserKeyReferenceUpgradeTask, UserMappingLowerUsernameSchemaUpgradeTask, UserMappingSchemaUpgradeTask
public abstract class AbstractUpgradeTask
- extends java.lang.Object
- implements UpgradeTask, BackupSupport
A useful base class for UpgradeTasks. Note that this base class has a default
implementation of validate which does nothing. This is a common case but if you
do need validation be sure to override it.
Fields inherited from interface com.atlassian.confluence.upgrade.UpgradeTask |
log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractUpgradeTask
public AbstractUpgradeTask()
getShortDescription
public java.lang.String getShortDescription()
- Description copied from interface:
UpgradeTask
- A short (<50 chars) description of the upgrade action
- Specified by:
getShortDescription
in interface UpgradeTask
addError
protected void addError(UpgradeError error)
addError
protected void addError(java.lang.String errorMessage)
addAllErrors
protected void addAllErrors(java.util.Collection<UpgradeError> errors)
getErrors
public java.util.Collection<UpgradeError> getErrors()
- Description copied from interface:
UpgradeTask
- Return any errors that occur. Each entry is an
UpgradeError
.
- Specified by:
getErrors
in interface UpgradeTask
- Returns:
- a collection of
UpgradeError
objects, sometimes null.
setBuildNumber
public void setBuildNumber(java.lang.String buildNumber)
getBuildNumber
public java.lang.String getBuildNumber()
- Specified by:
getBuildNumber
in interface UpgradeTask
- Returns:
- The build number that this upgrade is applicable to
validate
public void validate()
throws java.lang.Exception
This is only implemented in this abstract base class for the convenience of the large number of older
upgrade tasks.
If you are implementing a new UpgradeTask you must give some consideration to implementing
validation as well.
- Specified by:
validate
in interface UpgradeTask
- Throws:
java.lang.Exception
getConstraint
public BuildNumberUpgradeConstraint getConstraint()
- Specified by:
getConstraint
in interface UpgradeTask
- Returns:
- the constraint that must be passed for this task to be run.
Copyright © 2003-2013 Atlassian. All Rights Reserved.