com.plumtree.uiinfrastructure.application.startup
Class InitializeAppWarmUpHelper

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

public class InitializeAppWarmUpHelper
extends java.lang.Object
implements IStartupTask

Author:
DavidP

Field Summary
static java.lang.String PORTAL_APPWARMUPHELPER_COMPONENT_TYPE
           
 
Constructor Summary
InitializeAppWarmUpHelper()
          Initializes the AppWarmUpHelper.
 
Method Summary
 ReturnValue executeStep(int sequentialStepID)
          Executes each step in the task.
 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.
 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
 

Field Detail

PORTAL_APPWARMUPHELPER_COMPONENT_TYPE

public static final java.lang.String PORTAL_APPWARMUPHELPER_COMPONENT_TYPE
See Also:
Constant Field Values
Constructor Detail

InitializeAppWarmUpHelper

public InitializeAppWarmUpHelper()
Initializes the AppWarmUpHelper. The AppWarmUpHelper is a class that can be implemented to perform custom initializations specific to your application. After this point, an AppWarmUpHelper instance will be available, as well as the final ConfigVarPack (because the AppWarmUpHelper has the option to override the BaseConfigVarPack). TODO: The ConfigVarPack should be a reloadable item. We should have a method that tries to reload the ConfigVarPacks, first the Base one, and then the AppWarmUpHelper one if it exists.

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

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



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