com.plumtree.portalpages.common.joblogs
Class HistoryViewHelper

java.lang.Object
  extended by com.plumtree.portalpages.common.joblogs.HistoryViewHelper

public class HistoryViewHelper
extends java.lang.Object

This helper class is used in all three contexts the job history is displayed: The automation server editor, the Job editor, and the Job History portlet.

Author:
JohnH

Field Summary
static int DETAILPAGESIZE
          The number of lines to display on a page
static java.lang.String HTMLBUTTON_DELETE
          Delete job log button
static java.lang.String HTMLBUTTON_FILTER
          HTML button to execute filter action
static java.lang.String HTMLCHECKBOX_CHECKALL
          Checkbox in the header row.
static java.lang.String HTMLCHECKBOX_JOBID
          Checkbox for selecting jobs to abort.
static java.lang.String HTMLHIDDEN_ACTIVEINSTANCE
          Hidden HTML Input for the active job instance for log download
static java.lang.String HTMLHIDDEN_CURRENTPAGE
          Hidden HTML input for the current page number
static java.lang.String HTMLHIDDEN_INSTANCEID
          Hidden field for the instance ID of the job log
static java.lang.String HTMLHIDDEN_LASTPAGE
          Hidden HTML input for the last page number
static java.lang.String JAVASCRIPT_CHECKALL
          The name for the checkall javascript function
static java.lang.String JAVASCRIPT_DOWNLOADLOG
          The name for the javascript function for downloading log files
static java.lang.String JAVASCRIPT_SHOWLOG
          The name for the javascript function that opens a detail pop-up
static java.lang.String POPUP_CONTROL_ARG_JOBNAME
          Querystring argument for the job name
static java.lang.String POPUP_CONTROL_ARG_ROWTOVIEW
          JH- POPUP_CONTROL_ARG_ROWTOVIEW is a querystring argument we pass to the popup so that it knows what row it's viewing
static java.lang.String POPUP_CONTROL_ARG_RUNTIME
          Querystring argument
 
Constructor Summary
HistoryViewHelper(IModelRO model, AActivitySpace parent, boolean bPortletView, java.lang.String strSubmitForm)
          Constructor for the HistoryViewHelper class.
 
Method Summary
 HTMLTable AddActionBar()
          Displays the HTML for the action bar.
 HTMLTableCell AddFieldToCell(java.lang.Object objField, java.lang.String strField)
          This helper function returns a cell with the appropriate style and queryresult field added.
 HTMLTableRow GetHeaderRow()
          Returns the header row for the job list
 HTMLElement GetHeaderView(java.lang.String _sHeaderTitle)
          Returns the header for the View.
 java.lang.String GetJavascript(java.lang.String strFormName)
          This function returns the javascript that should be displayed with the Job History view
 ASQueryResultWrapper GetJobHistoryList()
          This function returns the list of jobs in an ASQueryResultWrapper
 HTMLElement GetJobLogDetail()
          Display the HTML for the list of jobs with links to their logs
 HTMLTableRow GetPreviousNextLinks(int intNumPages, int intCurPage)
          Return the HTML for the Next and Previous pageination links displayed at the end of the job log list
 java.lang.String GetStatusString(int intStatus)
          This helper function translates PT_JOBSTATUS numbers into localized string values
 HTMLElement GetTableRows(int intNumResults, ASQueryResultWrapper myQueryResult)
          Returns the HTML table that contains the list of jobs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTMLBUTTON_FILTER

public static final java.lang.String HTMLBUTTON_FILTER
HTML button to execute filter action

See Also:
Constant Field Values

HTMLBUTTON_DELETE

public static final java.lang.String HTMLBUTTON_DELETE
Delete job log button

See Also:
Constant Field Values

HTMLHIDDEN_CURRENTPAGE

public static final java.lang.String HTMLHIDDEN_CURRENTPAGE
Hidden HTML input for the current page number

See Also:
Constant Field Values

HTMLHIDDEN_ACTIVEINSTANCE

public static final java.lang.String HTMLHIDDEN_ACTIVEINSTANCE
Hidden HTML Input for the active job instance for log download

See Also:
Constant Field Values

HTMLHIDDEN_LASTPAGE

public static final java.lang.String HTMLHIDDEN_LASTPAGE
Hidden HTML input for the last page number

See Also:
Constant Field Values

HTMLCHECKBOX_JOBID

public static final java.lang.String HTMLCHECKBOX_JOBID
Checkbox for selecting jobs to abort. The value of each instance of the control on the page will be the job ID

See Also:
Constant Field Values

HTMLHIDDEN_INSTANCEID

public static final java.lang.String HTMLHIDDEN_INSTANCEID
Hidden field for the instance ID of the job log

See Also:
Constant Field Values

HTMLCHECKBOX_CHECKALL

public static final java.lang.String HTMLCHECKBOX_CHECKALL
Checkbox in the header row. Checking this causes all the others to be checked

See Also:
Constant Field Values

JAVASCRIPT_SHOWLOG

public static final java.lang.String JAVASCRIPT_SHOWLOG
The name for the javascript function that opens a detail pop-up

See Also:
Constant Field Values

JAVASCRIPT_DOWNLOADLOG

public static final java.lang.String JAVASCRIPT_DOWNLOADLOG
The name for the javascript function for downloading log files

See Also:
Constant Field Values

JAVASCRIPT_CHECKALL

public static final java.lang.String JAVASCRIPT_CHECKALL
The name for the checkall javascript function

See Also:
Constant Field Values

DETAILPAGESIZE

public static final int DETAILPAGESIZE
The number of lines to display on a page

See Also:
Constant Field Values

POPUP_CONTROL_ARG_ROWTOVIEW

public static final java.lang.String POPUP_CONTROL_ARG_ROWTOVIEW
JH- POPUP_CONTROL_ARG_ROWTOVIEW is a querystring argument we pass to the popup so that it knows what row it's viewing

See Also:
Constant Field Values

POPUP_CONTROL_ARG_JOBNAME

public static final java.lang.String POPUP_CONTROL_ARG_JOBNAME
Querystring argument for the job name

See Also:
Constant Field Values

POPUP_CONTROL_ARG_RUNTIME

public static final java.lang.String POPUP_CONTROL_ARG_RUNTIME
Querystring argument

See Also:
Constant Field Values
Constructor Detail

HistoryViewHelper

public HistoryViewHelper(IModelRO model,
                         AActivitySpace parent,
                         boolean bPortletView,
                         java.lang.String strSubmitForm)
Constructor for the HistoryViewHelper class. This helper class is used in all three contexts the job history is displayed: The automation server editor, the Job editor, and the Job History portlet.

Parameters:
model - - The IJobLogModelRO
parent - - The activity space this is being called from
bPortletView - - True if this view is being displayed in a portlet
strSubmitForm - - The javascript submit form function name
Method Detail

GetHeaderView

public HTMLElement GetHeaderView(java.lang.String _sHeaderTitle)
Returns the header for the View.

Parameters:
_sHeaderTitle - Title you want to display in the header.
Returns:
HTMLTable
Throws:
XPException

GetJavascript

public java.lang.String GetJavascript(java.lang.String strFormName)
This function returns the javascript that should be displayed with the Job History view

Returns:
HTMLScript

AddActionBar

public HTMLTable AddActionBar()
Displays the HTML for the action bar. If the actionbar is to be displayed in a portlet, only the abort action will be enabled and visible.


GetJobHistoryList

public ASQueryResultWrapper GetJobHistoryList()
This function returns the list of jobs in an ASQueryResultWrapper

Returns:
ASQueryResultWrapper

GetHeaderRow

public HTMLTableRow GetHeaderRow()
Returns the header row for the job list

Returns:
HTMLElement

GetTableRows

public HTMLElement GetTableRows(int intNumResults,
                                ASQueryResultWrapper myQueryResult)
Returns the HTML table that contains the list of jobs

Parameters:
intNumResults - - The number of results that will be displayed
Returns:
HTMLTable

GetPreviousNextLinks

public HTMLTableRow GetPreviousNextLinks(int intNumPages,
                                         int intCurPage)
Return the HTML for the Next and Previous pageination links displayed at the end of the job log list

Parameters:
intNumPages - - The total number of pages to display
intCurPage - - The page currently displayed
Returns:
HTMLTableRow

GetJobLogDetail

public HTMLElement GetJobLogDetail()
Display the HTML for the list of jobs with links to their logs

Returns:
HTMLElement

AddFieldToCell

public HTMLTableCell AddFieldToCell(java.lang.Object objField,
                                    java.lang.String strField)
This helper function returns a cell with the appropriate style and queryresult field added. It sets a blank string on the cell if the argument is null.

Parameters:
objField -
strField -
Returns:
HTMLTableCell

GetStatusString

public java.lang.String GetStatusString(int intStatus)
This helper function translates PT_JOBSTATUS numbers into localized string values




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