com.plumtree.uiinfrastructure.application.startup
Class CheckDBVersion

java.lang.Object
  extended by com.plumtree.uiinfrastructure.application.startup.CheckDBVersion
All Implemented Interfaces:
IStartupTask, IMessage

public class CheckDBVersion
extends java.lang.Object
implements IStartupTask

Verifies database version and some of the important tables. Also fully excercises the object managers.

Author:
DavidP

Constructor Summary
CheckDBVersion()
           
 
Method Summary
 ReturnValue executeStep(int sequentialStepID)
          Executes each step in the task.
 ReturnValue executeStepCheckDBVersion()
           
 ReturnValue exerciseObjectManagers()
          Check each and every object manager and session variable.
 XPArrayList getMsg(int stepid, Platform platform, ReturnValue ret)
          Message element.
 StartupTaskMessage[] getMsgArray()
           
 int getNumMsgs()
          Message count.
 int getNumSteps()
          Ideally, the number of steps in a startup task is a fixed static value.
static int GetObjectCount(IPTObjectManager mgr)
          Generic object counter by manager
static java.lang.Object[][] GetQueryFilter(int nOperand, int nOperator, java.lang.Object objValue)
          Returns a simple queryfilter based on three parameters
 int getTaskID()
          Unique identifier for task.
 java.lang.String getTaskName()
          Simple text name for task.
 ReturnValue init(java.lang.String _strApplicationName)
          Does whatever initialization is required by this task in order to determine the number of steps in the task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckDBVersion

public CheckDBVersion()
Method Detail

getTaskName

public java.lang.String getTaskName()
Description copied from interface: IStartupTask
Simple text name for task.

Specified by:
getTaskName in interface IStartupTask
Returns:
String task name

getTaskID

public int getTaskID()
Description copied from interface: IStartupTask
Unique identifier for task. Normally this is simply an ordinal value of the sequential task used in startup. See the class PTStartupTasks in application.startup to better understand.

Specified by:
getTaskID in interface IStartupTask
Returns:
int task ID

getNumSteps

public int getNumSteps()
Description copied from interface: IStartupTask
Ideally, the number of steps in a startup task is a fixed static value. In some cases, however, the number of steps can only be determined at runtime. The init() function is intended to allow a task to "pre-flight" startup in order to determine the scope of its steps.

Specified by:
getNumSteps in interface IStartupTask
Returns:
integer number of steps in this test

init

public ReturnValue init(java.lang.String _strApplicationName)
Description copied from interface: IStartupTask
Does whatever initialization is required by this task in order to determine the number of steps in the task. If at all possible, consider other initialization as separate steps in the task, to be executed immediately after this init is called.

Specified by:
init in interface IStartupTask
Returns:
ReturnValue container class instance

executeStep

public ReturnValue executeStep(int sequentialStepID)
Description copied from interface: IStartupTask
Executes each step in the task. Note that you should not conciously throw exceptions in this method; use the return value instead, denoting the severity and error message; it will be rethrown as an exception for you. This design increases the flexibility and re-use of your startup tasks.

Specified by:
executeStep in interface IStartupTask
Returns:
ReturnValue with result code and string

executeStepCheckDBVersion

public ReturnValue executeStepCheckDBVersion()

exerciseObjectManagers

public ReturnValue exerciseObjectManagers()
Check each and every object manager and session variable.

Parameters:
sequentialStepID -
Returns:

getMsg

public XPArrayList getMsg(int stepid,
                          Platform platform,
                          ReturnValue ret)
Description copied from interface: IMessage
Message element. Gets the recommendation strings for a specific narrow condition with retval, platform, task, in an XPArrayList, sorted by most accurate first.

Specified by:
getMsg in interface IMessage
Returns:
specific string recommendation

getMsgArray

public StartupTaskMessage[] getMsgArray()
Specified by:
getMsgArray in interface IMessage
Returns:
Enumerated list of messages

getNumMsgs

public int getNumMsgs()
Description copied from interface: IMessage
Message count.

Specified by:
getNumMsgs in interface IMessage
Returns:
number of messages in class

GetQueryFilter

public static java.lang.Object[][] GetQueryFilter(int nOperand,
                                                  int nOperator,
                                                  java.lang.Object objValue)
Returns a simple queryfilter based on three parameters

Parameters:
int - nOperand - the Plumtree PropID operand (of type PT_PROPIDS)
int - nOperator - the Plumtree Operator (of type PT_FILTEROPS)
Object - objValue - the value to be filtered on (Integer, String, [], etc...)

GetObjectCount

public static int GetObjectCount(IPTObjectManager mgr)
Generic object counter by manager

Parameters:
mgr -
Returns:
int num items



Copyright 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.