com.plumtree.portalpages.common.joblogs
Class JobLogModel

java.lang.Object
  extended by com.plumtree.portalpages.common.joblogs.JobLogModel
All Implemented Interfaces:
IJobLogModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IRepostModel

public class JobLogModel
extends java.lang.Object
implements IRepostModel, IJobLogModelRO

This is a helper model class implemented to support the display and browsing of Job histories and job logs.

Author:
JohnH

Field Summary
static java.lang.String DELETE_THROUGH
          Unique identifier for delete through date picker
static java.lang.String FILTER_FROM
          Unique identifier for filter from date picker
static java.lang.String FILTER_TO
          Unique identifier for filter to date picker
static java.lang.String STR_MVC_CLASS_NAME
          Unique identifier for the model
 
Constructor Summary
JobLogModel()
           
 
Method Summary
 void CleanupAllData()
          This method is called when an ActivitySpace is removed from the cache.
 void CleanupTempData()
          This method is called at the end of every HTTP request by the Interpreter.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void DeleteJobHistory(XPDateTime xpdtDeleteFrom)
          Delete the job history from the passed in date and earlier
 void ExitSearchMode()
          Returns the job viewer to non-search mode.
 void Finish()
          Implement some code to execute when the user clicks on "Finish".
 int[] GetArrayOfJobsToKill(XPHashtable _htFormData)
          This function returns an int array of JobID's to be killed
 int GetCurrentLogPage()
          Returns the log page currently being displayed.
 int GetCurrentPage()
          Returns CurrentPage setting.
 JSDatePickerMgr GetDatePickerControlManager()
          Get the Date picker control manager
 int GetJobID()
          Returns the jobID.
 java.lang.String GetJobName()
          Returns the jobName.
 byte[] GetLogFile()
          Returns the log file in byte array format
 java.lang.String GetName()
          Returns the Class name.
 IPTSession GetPTSession()
          Returns the Plumtree Session object.
 Redirect GetRedirectAfterFinish()
          Returns the Redirect object (this is were we need to go at the end of the Editor).
 int GetRowToDisplay()
          Returns the job history row to display in the job log detail viewer.
 java.lang.String GetRunTime()
          Returns the runTime.
 java.lang.String GetSearchString()
          Returns a string used for searching the job log.
 void Init(AActivitySpace parent)
          Inits the Model with the IPTSession.
 boolean IsSearchRequest()
          Returns whether the very last request is a search of the job log.
 void KillJobs(XPHashtable _htFormData)
          This function will send a kill message to each job that has been checked by the user.
 void RetrieveFileForDownload(int intInstanceID)
          Prepare the log file for download by setting it on a byte array member variable
 int SavePage(java.lang.String _sPageName, XPHashtable _htFormData)
          Calls the right save function according to the page name passed in argument.
 void SetCurrentLogPage(int currentLogPage)
          Sets the the log page currently being displayed.
 void SetCurrentPage(int _intCurrentPage)
          Sets CurrentRecord setting.
 void SetJobID(int jobID)
          Sets the jobID.
 void SetJobName(java.lang.String jobName)
          Sets the jobName.
 void SetLogSearchPage(java.lang.String strSearchText)
          Sets the the search term and indicates a result page
 void SetRowToDisplay(int rowToDisplay)
          Sets the job history row to display in the job log detail viewer.
 void SetRunTime(java.lang.String runTime)
          Sets the runTime.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
Unique identifier for the model

See Also:
Constant Field Values

FILTER_FROM

public static final java.lang.String FILTER_FROM
Unique identifier for filter from date picker

See Also:
Constant Field Values

FILTER_TO

public static final java.lang.String FILTER_TO
Unique identifier for filter to date picker

See Also:
Constant Field Values

DELETE_THROUGH

public static final java.lang.String DELETE_THROUGH
Unique identifier for delete through date picker

See Also:
Constant Field Values
Constructor Detail

JobLogModel

public JobLogModel()
Method Detail

Init

public void Init(AActivitySpace parent)
Inits the Model with the IPTSession.

Specified by:
Init in interface IModel
Parameters:
parent -

Create

public java.lang.Object Create()
Description copied from interface: IManagedObject
This method is used by the ASManager to return new instances of managed objects.

Specified by:
Create in interface IManagedObject
Returns:
A new instance of the managed class (i.e. return new Foo();)
See Also:
IManagedObject.Create()

CleanupTempData

public void CleanupTempData()
Description copied from interface: IModel
This method is called at the end of every HTTP request by the Interpreter. The Interpreter calls AActivitySpace.CleanupTempData(), which calls this method on all IModels registered using AActivitySpace.RegisterModel(). This method is intended for cleaning up temporary data that is only used for the lifetime of a single request, like DB query results.

Specified by:
CleanupTempData in interface IModel
See Also:
IModel.CleanupTempData()

CleanupAllData

public void CleanupAllData()
Description copied from interface: IModel
This method is called when an ActivitySpace is removed from the cache. The Interpreter calls AActivitySpace.CleanupAllData(), which calls this method on all IModels registered using AActivitySpace.RegisterModel(). This method is intended for releasing data stored in the server when the activity space is no longer needed, such as search objects that need to be maintained as long as the user is clicking through the search, but should be freed when the space can no longer be used. This can be used to prevent Java references to COM memory from hanging around in the long lived Java heap without cleaning up the underlying COM memory. The Java reference will still stay in the long lived heap until it gets garbage collected (which could be a while), but the COM memory should get released here. This method will not be called if an HTTPSession times out. CleanupTempData will be called before CleanupAllData.

Specified by:
CleanupAllData in interface IModel
See Also:
IModel.CleanupAllData()

Finish

public void Finish()
Description copied from interface: IRepostModel
Implement some code to execute when the user clicks on "Finish".

Specified by:
Finish in interface IRepostModel
See Also:
IRepostModel.Finish()

GetRedirectAfterFinish

public Redirect GetRedirectAfterFinish()
Description copied from interface: IRepostModel
Returns the Redirect object (this is were we need to go at the end of the Editor).

Specified by:
GetRedirectAfterFinish in interface IRepostModel
Returns:
Redirect
See Also:
IRepostModel.GetRedirectAfterFinish()

GetName

public java.lang.String GetName()
Returns the Class name.

Specified by:
GetName in interface IMVCObject
Returns:
String

DeleteJobHistory

public void DeleteJobHistory(XPDateTime xpdtDeleteFrom)
Delete the job history from the passed in date and earlier

Parameters:
xpdtDeleteFrom -

ExitSearchMode

public void ExitSearchMode()
Returns the job viewer to non-search mode.


GetArrayOfJobsToKill

public int[] GetArrayOfJobsToKill(XPHashtable _htFormData)
This function returns an int array of JobID's to be killed

Parameters:
_htFormData -
Returns:
int[]

KillJobs

public void KillJobs(XPHashtable _htFormData)
This function will send a kill message to each job that has been checked by the user.

Parameters:
_htFormData -

RetrieveFileForDownload

public void RetrieveFileForDownload(int intInstanceID)
Prepare the log file for download by setting it on a byte array member variable

Parameters:
intInstanceID - - The instance ID of the job log

IsSearchRequest

public boolean IsSearchRequest()
Returns whether the very last request is a search of the job log.

Specified by:
IsSearchRequest in interface IJobLogModelRO
Returns:
int

GetSearchString

public java.lang.String GetSearchString()
Returns a string used for searching the job log.

Specified by:
GetSearchString in interface IJobLogModelRO
Returns:
String

GetCurrentLogPage

public int GetCurrentLogPage()
Returns the log page currently being displayed.

Specified by:
GetCurrentLogPage in interface IJobLogModelRO
Returns:
int

GetCurrentPage

public int GetCurrentPage()
Returns CurrentPage setting.

Specified by:
GetCurrentPage in interface IJobLogModelRO
Returns:
int

GetJobID

public int GetJobID()
Returns the jobID.

Specified by:
GetJobID in interface IJobLogModelRO
Returns:
int

GetJobName

public java.lang.String GetJobName()
Returns the jobName.

Specified by:
GetJobName in interface IJobLogModelRO
Returns:
String

GetPTSession

public IPTSession GetPTSession()
Returns the Plumtree Session object.

Specified by:
GetPTSession in interface IJobLogModelRO
Returns:
IPTSession

GetRowToDisplay

public int GetRowToDisplay()
Returns the job history row to display in the job log detail viewer.

Specified by:
GetRowToDisplay in interface IJobLogModelRO
Returns:
int

GetRunTime

public java.lang.String GetRunTime()
Returns the runTime.

Specified by:
GetRunTime in interface IJobLogModelRO
Returns:
String

SetLogSearchPage

public void SetLogSearchPage(java.lang.String strSearchText)
Sets the the search term and indicates a result page

Parameters:
SearchTerm - to be applied against the log text

SetCurrentLogPage

public void SetCurrentLogPage(int currentLogPage)
Sets the the log page currently being displayed.

Parameters:
currentLogPage - The currentLogPage to set

SetCurrentPage

public void SetCurrentPage(int _intCurrentPage)
Sets CurrentRecord setting.


SetJobID

public void SetJobID(int jobID)
Sets the jobID.

Parameters:
jobID - The jobID to set

SetJobName

public void SetJobName(java.lang.String jobName)
Sets the jobName.

Parameters:
jobName - The jobName to set

SetRowToDisplay

public void SetRowToDisplay(int rowToDisplay)
Sets the job history row to display in the job log detail viewer.

Parameters:
rowToDisplay - The rowToDisplay to set

SetRunTime

public void SetRunTime(java.lang.String runTime)
Sets the runTime.

Parameters:
runTime - The runTime to set

GetLogFile

public byte[] GetLogFile()
Returns the log file in byte array format

Specified by:
GetLogFile in interface IJobLogModelRO
Returns:
byte[]

GetDatePickerControlManager

public JSDatePickerMgr GetDatePickerControlManager()
Get the Date picker control manager

Specified by:
GetDatePickerControlManager in interface IJobLogModelRO
Returns:
JSDatePickerMgr

SavePage

public int SavePage(java.lang.String _sPageName,
                    XPHashtable _htFormData)
Description copied from interface: IRepostModel
Calls the right save function according to the page name passed in argument.

Specified by:
SavePage in interface IRepostModel
Returns:
int Page status for server side validation
See Also:
IRepostModel.SavePage(String, XPHashtable)



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