Package lumis.upgrade
Class UpgradeManager
- java.lang.Object
-
- lumis.upgrade.UpgradeManager
-
- All Implemented Interfaces:
IUpgradeManager
public class UpgradeManager extends java.lang.Object implements IUpgradeManager
Manager for upgrade operations on the portal framework.- Since:
- 4.0.0
- Version:
- $Revision$ $Date$
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ACTION_TYPE_CUSTOM
Indicates that a custom step handler should be executed.static java.lang.String
ACTION_TYPE_REGISTER_SERVICE
Indicates that the step handler for registering a service should be executed.static java.lang.String
ACTION_TYPE_RUN_SQL
static java.lang.String
ACTION_TYPE_UNREGISTER_CONTROL_TYPE
Indicates that the step handler for unregister a control type should be executed.static int
BUILD_STATUS_ERROR
static int
BUILD_STATUS_EXECUTING
static int
BUILD_STATUS_SUCCESS
static int
USER_RESPONSE_EXECUTION_REQUESTED
static int
USER_RESPONSE_EXECUTION_SKIPPED
-
Constructor Summary
Constructors Constructor Description UpgradeManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BuildConfig
executeNextPendingBuild(SessionConfig sessionConfig, ITransaction transaction)
Executes the next pending build.BuildConfig
getCurrentBuildInfo(ITransaction transaction)
Get the current build informationjava.lang.String
getNextBuild(java.lang.String userSessionId, java.lang.String buildNumber, java.lang.String buildSequence, ITransaction transaction)
Gets next build nodeboolean
isUpgradePending()
Returns whether there is upgrade pending to be executed.void
markUpgradesDone(SessionConfig sessionConfig, ITransaction transaction)
Marks all pending upgrades as done.void
rebuildLumisAdministration(SessionConfig sessionConfig)
void
setBuildStatus(SessionConfig sessionConfig, BuildConfig buildConfig, java.lang.String buildStatus, java.lang.String userResponse, ITransaction transaction)
Sets build status
-
-
-
Field Detail
-
ACTION_TYPE_RUN_SQL
public static final java.lang.String ACTION_TYPE_RUN_SQL
- See Also:
- Constant Field Values
-
ACTION_TYPE_CUSTOM
public static final java.lang.String ACTION_TYPE_CUSTOM
Indicates that a custom step handler should be executed.- See Also:
- Constant Field Values
-
ACTION_TYPE_REGISTER_SERVICE
public static final java.lang.String ACTION_TYPE_REGISTER_SERVICE
Indicates that the step handler for registering a service should be executed.- Since:
- 4.0.4
- See Also:
RegisterServiceStepHandler
, Constant Field Values
-
ACTION_TYPE_UNREGISTER_CONTROL_TYPE
public static final java.lang.String ACTION_TYPE_UNREGISTER_CONTROL_TYPE
Indicates that the step handler for unregister a control type should be executed.- Since:
- 4.0.6
- See Also:
UnregisterControlTypeStepHandler
, Constant Field Values
-
BUILD_STATUS_EXECUTING
public static final int BUILD_STATUS_EXECUTING
- See Also:
- Constant Field Values
-
BUILD_STATUS_SUCCESS
public static final int BUILD_STATUS_SUCCESS
- See Also:
- Constant Field Values
-
BUILD_STATUS_ERROR
public static final int BUILD_STATUS_ERROR
- See Also:
- Constant Field Values
-
USER_RESPONSE_EXECUTION_REQUESTED
public static final int USER_RESPONSE_EXECUTION_REQUESTED
- See Also:
- Constant Field Values
-
USER_RESPONSE_EXECUTION_SKIPPED
public static final int USER_RESPONSE_EXECUTION_SKIPPED
- See Also:
- Constant Field Values
-
-
Method Detail
-
getNextBuild
public java.lang.String getNextBuild(java.lang.String userSessionId, java.lang.String buildNumber, java.lang.String buildSequence, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IUpgradeManager
Gets next build node- Specified by:
getNextBuild
in interfaceIUpgradeManager
- Throws:
ManagerException
PortalException
-
setBuildStatus
public void setBuildStatus(SessionConfig sessionConfig, BuildConfig buildConfig, java.lang.String buildStatus, java.lang.String userResponse, ITransaction transaction) throws PortalException
Description copied from interface:IUpgradeManager
Sets build status- Specified by:
setBuildStatus
in interfaceIUpgradeManager
- Throws:
PortalException
-
markUpgradesDone
public void markUpgradesDone(SessionConfig sessionConfig, ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IUpgradeManager
Marks all pending upgrades as done.- Specified by:
markUpgradesDone
in interfaceIUpgradeManager
- Parameters:
sessionConfig
- the user session information.transaction
- the transaction for persistence access.- Throws:
ManagerException
PortalException
-
executeNextPendingBuild
public BuildConfig executeNextPendingBuild(SessionConfig sessionConfig, ITransaction transaction) throws PortalException
Description copied from interface:IUpgradeManager
Executes the next pending build.- Specified by:
executeNextPendingBuild
in interfaceIUpgradeManager
- Parameters:
sessionConfig
- the user session information.transaction
- the transaction for persistence access.- Returns:
- the build executed, or null if there was no pending build to be executed.
- Throws:
UpgradeException
- if an exception was thrown during the build execution.PortalException
-
rebuildLumisAdministration
public void rebuildLumisAdministration(SessionConfig sessionConfig) throws ManagerException, PortalException
- Specified by:
rebuildLumisAdministration
in interfaceIUpgradeManager
- Throws:
ManagerException
PortalException
-
getCurrentBuildInfo
public BuildConfig getCurrentBuildInfo(ITransaction transaction) throws ManagerException, PortalException
Description copied from interface:IUpgradeManager
Get the current build information- Specified by:
getCurrentBuildInfo
in interfaceIUpgradeManager
- Returns:
- Throws:
ManagerException
PortalException
-
isUpgradePending
public boolean isUpgradePending()
Description copied from interface:IUpgradeManager
Returns whether there is upgrade pending to be executed.This method uses its own transaction.
- Specified by:
isUpgradePending
in interfaceIUpgradeManager
- Returns:
true
if there is upgrade pending to be executed,false
otherwise.
-
-