com.atlassian.confluence.core.persistence
Interface VersionHistoryDao

All Superinterfaces:
ObjectDao
All Known Implementing Classes:
HibernateVersionHistoryDao

public interface VersionHistoryDao
extends ObjectDao


Field Summary
static java.lang.String PRE_UPGRADE_VERSION
           
static int UNKNOWN_BUILD_NUMBER
           
 
Method Summary
 void addBuildToHistory(int buildNumber)
          The version history consists of a list of builds that Confluence has been successfully upgraded to
 int getLatestBuildNumber()
          Get the highest build number from the database.
 VersionHistory getVersionHistory(int buildNumber)
           
 boolean tagBuild(int buildNumber, java.lang.String tag)
          Associates a tag with a build number
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, findAllSorted, getPersistentClass, refresh, remove, replicate, save, saveRaw
 

Field Detail

UNKNOWN_BUILD_NUMBER

static final int UNKNOWN_BUILD_NUMBER
See Also:
Constant Field Values

PRE_UPGRADE_VERSION

static final java.lang.String PRE_UPGRADE_VERSION
See Also:
Constant Field Values
Method Detail

getLatestBuildNumber

int getLatestBuildNumber()
Get the highest build number from the database. This should represent what version the database thinks Confluence is running at, which in turn is used to schedule database-hitting upgrade tasks. If the number can not be determined (there are no versions in the database, or the version history table hasn't even been created yet) then the method will return UNKNOWN_BUILD_NUMBER. In this case, callers should assume that the database build number is identical to the configured build number.

Returns:
the highest build number in version history table, or UNKNOWN_BUILD_NUMBER if that can not be determined.

addBuildToHistory

void addBuildToHistory(int buildNumber)
The version history consists of a list of builds that Confluence has been successfully upgraded to

Parameters:
buildNumber -

getVersionHistory

VersionHistory getVersionHistory(int buildNumber)
Parameters:
buildNumber -
Returns:
the version history object associated with the build number (if there is more than one, return the latest)

tagBuild

boolean tagBuild(int buildNumber,
                 java.lang.String tag)
Associates a tag with a build number

Returns:
true if the build number was successfully tagged, false if the tag specified has already been associated with this build number


Copyright © 2003-2014 Atlassian. All Rights Reserved.