Package org.opennms.upgrade.support
Class UpgradeStatus
- java.lang.Object
-
- org.opennms.upgrade.support.UpgradeStatus
-
public class UpgradeStatus extends java.lang.Object
The Class UpgradeStatus.- Author:
- Alejandro Galue
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
STATUS_FILE
The Constant STATUS_FILE.
-
Constructor Summary
Constructors Constructor Description UpgradeStatus()
Instantiates a new upgrade status.UpgradeStatus(java.io.File statusFile)
Instantiates a new upgrade status.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getLastExecutionTime(OnmsUpgrade upg)
Gets the last execution time.void
markAsExecuted(OnmsUpgrade upg)
Mark as executed.boolean
wasExecuted(OnmsUpgrade upg)
Was executed.
-
-
-
Field Detail
-
STATUS_FILE
public static final java.lang.String STATUS_FILE
The Constant STATUS_FILE.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UpgradeStatus
public UpgradeStatus() throws OnmsUpgradeException
Instantiates a new upgrade status.- Throws:
OnmsUpgradeException
- the OpenNMS upgrade exception
-
UpgradeStatus
public UpgradeStatus(java.io.File statusFile) throws OnmsUpgradeException
Instantiates a new upgrade status.- Parameters:
statusFile
- the status file- Throws:
OnmsUpgradeException
- the OpenNMS upgrade exception
-
-
Method Detail
-
wasExecuted
public boolean wasExecuted(OnmsUpgrade upg)
Was executed.- Parameters:
upg
- the upgrade implementation class- Returns:
- true, if successful
-
getLastExecutionTime
public java.lang.String getLastExecutionTime(OnmsUpgrade upg)
Gets the last execution time.- Parameters:
upg
- the upgrade implementation class- Returns:
- the last execution time
-
markAsExecuted
public void markAsExecuted(OnmsUpgrade upg) throws OnmsUpgradeException
Mark as executed.- Parameters:
upg
- the upgrade implementation class- Throws:
OnmsUpgradeException
- the OpenNMS upgrade exception
-
-