org.modeshape.jcr
Class Upgrades
java.lang.Object
org.modeshape.jcr.Upgrades
public class Upgrades
- extends Object
Method Summary |
int |
applyUpgradesSince(int lastId,
Upgrades.Context resources)
Apply any upgrades that are more recent than identified by the last upgraded identifier. |
int |
getLatestAvailableUpgradeId()
Get the identifier of the latest upgrade known to this object. |
boolean |
isUpgradeRequired(int lastId)
Determine if an upgrade is required given the identifier of the last known
upgrade, which is compared to the identifiers of the registered upgrades. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGGER
protected static final Logger LOGGER
EMPTY_UPGRADES_ID
protected static final int EMPTY_UPGRADES_ID
- See Also:
- Constant Field Values
STANDARD_UPGRADES
public static final Upgrades STANDARD_UPGRADES
- The standard upgrades for the built-in components and content of ModeShape.
Upgrades
protected Upgrades(Upgrades.UpgradeOperation... operations)
applyUpgradesSince
public final int applyUpgradesSince(int lastId,
Upgrades.Context resources)
- Apply any upgrades that are more recent than identified by the last upgraded identifier.
- Parameters:
lastId
- the identifier of the last upgrade that was successfully run against the repositoryresources
- the resources for the repository
- Returns:
- the identifier of the last upgrade applied to the repository; may be the same or greater than
lastId
isUpgradeRequired
public final boolean isUpgradeRequired(int lastId)
- Determine if an
upgrade
is required given the identifier of the last known
upgrade, which is compared to the identifiers of the registered upgrades.
- Parameters:
lastId
- the identifier of the last known/successful upgrade previously applied to the repository
- Returns:
- true if this contains at least one upgrade that should be applied to the repository, or false otherwise
getLatestAvailableUpgradeId
public final int getLatestAvailableUpgradeId()
- Get the identifier of the latest upgrade known to this object.
- Returns:
- the latest identifier; 0 if there are no upgrades in this object, or positive number
Copyright © 2008-2013 JBoss, a division of Red Hat. All Rights Reserved.