com.plumtree.portalpages.admin.editors.job
Class JobModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorModel
      extended by com.plumtree.portaluiinfrastructure.editor.ObjEditorModel
          extended by com.plumtree.portalpages.admin.editors.job.JobModel
All Implemented Interfaces:
IJobModelRO, IDescriptionModelRO, IMigrationModelRO, IObjEditorModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IEditorModelRO, IRepostModel

public class JobModel
extends ObjEditorModel
implements IJobModelRO

This class implements the model for the job editor

Author:
JohnH

Field Summary
static int c_intDict
          Constant used internally
static int c_intDictObjClass
          Constant used internally
static int c_intDictObjName
          Constant used internally
static int SCHEDULE_TYPE_RECURRING
          This constant is returned by the UI when the job type is recurring.
static int SCHEDULE_TYPE_RUN_ONCE_NOW
          This constant is returned by the UI when the job type is set to RunOnceNow
static java.lang.String STR_MVC_CLASS_NAME
          Unique identifier for the class
 
Fields inherited from class com.plumtree.portaluiinfrastructure.editor.ObjEditorModel
EDITOR_CLASSID_UNKNOWN, EDITOR_FOLDERID_UNKNOWN, EDITOR_OBJECTID_UNKNOWN, EDITOR_QS_BOL_QS_FORCESAVEINFOLDER, EDITOR_QS_INT_CLASS_ID, EDITOR_QS_INT_QS_FOLDER_ID, EDITOR_QS_INT_QS_OBJECT_ID, m_bDisableDescription, m_bDisableSecurity, m_bForceSavedInSuppliedFolder, m_bIsSysAdmin, m_nClassID, m_nFolderID, m_nFolderType, m_nObjectID, m_ptObject, m_Session, m_sFolderName, OBJECT_NAME_TRUNCATE
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorModel
m_asOwner, m_bCloseOnDone, m_bDeleteOnCancel, m_bEnableApplyButton, m_bHideLeftNav, m_bIsEditorReadOnly, m_bUserHasAccessToEditor, m_nEditorType
 
Constructor Summary
JobModel()
           
 
Method Summary
 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 DoTaskAfterStore()
          Code executed after the object is stored.
 void DoTaskBeforeStore()
          Code executed before the object is stored.
 void DoTaskOnStartEditor(XPHashtable _htFormData)
          Code executed when the Editor is starting.
static int DurationFromPTScheduleType(int nScheduleType)
          This helper function translates PTSCHEDULETYPES units into PTDurationCombo values.
 int GetContinue()
          Returns Continue on errors setting.
 java.lang.String GetDateFormatPattern()
          Returns the format pattern for the current locale so that it can be passed into the date picker control
 JSDateTimePickerMgr GetDateTimePickerControlManager()
          Get the Date Time picker control manager
 XPLocale GetLocale()
           
 int GetLogLevel()
          Returns Log Level setting.
 java.lang.String GetName()
          Returns the Class name.
 PTGrowableSortedArrayWrapper GetOperations()
          Returns Array of Operations.
 int GetRecurrenceInterval()
          Returns Recurrence Interval setting.
 int GetRestrictions()
          Returns Restrictions setting.
 XPDateTime GetRunOnceNowDateTime()
          Get the Date Time for the RunOnceNow option
 int GetScheduleType()
          Returns Schedule Type setting.
 int GetSuspendCheckpointInterval()
          Returns Suspend Checkpoint Interval setting.
 int GetSuspendMode()
          Returns Suspend Mode setting: One of PT_SCHEDULE_SUSPEND_MODES: PT_SCHEDULE_WORK_CONTINUOUSLY (Default), PT_SCHEDULE_SUSPEND_ON, PT_SCHEDULE_WORK_ON
 int GetTimeout()
          Returns timeout setting.
 int GetTimeoutUnits()
          Returns timeout units setting.
 XPTimeZone GetTimezone()
           
 void InitializeDatePickerMgrs()
          This function initializes the manager objects (Page and datetime) for the date pickers
 boolean IsAddOperationDisabled()
          Returns true if the Add an Operation table on the Main DP should not be displayed.
 boolean IsFolderRegistered(int nAdminFolderID)
          This helper function checks whether an admin folder has been assigned to any job server
 boolean IsJobFolderRegistered()
          Returns whether the Folder containing this Job is assigned to any Automation Server
 int SavePage(java.lang.String _sPageName, XPHashtable _htFormData)
          Calls the right save function according to the page name passed in argument.
 void StartSelectPTObject(int[] _arrNewOp)
          Helper method to start the Select PTObject List.
 
Methods inherited from class com.plumtree.portaluiinfrastructure.editor.ObjEditorModel
CheckEditorAccess, CheckEditorAccessAndStart, CheckFolderType, DisableSecurity, DoTaskOnComeBackFromSubEditor, Finish, ForceSaveInFolder, GetClassID, GetFolderID, GetFolderName, GetIsSysAdmin, GetMigrationStatus, GetObject, GetObjectDescription, GetObjectID, GetObjectName, GetParentFolderPath, GetPTSession, Init, InitIsSysAdminFlag, InitPTObject, IsDescriptionDisabled, IsMigrationApproved, SaveMigrationStatus, SetDisableDescription, SetEditorToReadOnly, SetMemberVariablesFromQS, SetMigrationStatus, StartKeywords, StartLocNamesList, StartMigrationHistory, StartObjectProp, StartSecurityList, StoreObject
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorModel
Cancel, CleanupAllData, CleanupTempData, DoTaskOnChangePage, GetCloseOnDone, GetCurrentRepostAction, GetDeleteOnCancel, GetEditorType, GetEnableApplyButton, GetHideLeftNav, GetIsEditorReadOnly, GetRedirectAfterFinish, GetUserHasAccessToEditor, SetCloseOnDone, SetDeleteOnCancel, SetEditorType, SetEnableApplyButton, SetHideLeftNav, SetPageStatus, SetUserHasAccessToEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.plumtree.portaluiinfrastructure.editor.IObjEditorModelRO
GetClassID, GetObject, GetObjectDescription, GetObjectID, GetObjectName, GetParentFolderPath, GetPTSession
 
Methods inherited from interface com.plumtree.uiinfrastructure.editor.IEditorModelRO
GetEditorType, GetEnableApplyButton, GetHideLeftNav, GetIsEditorReadOnly
 

Field Detail

STR_MVC_CLASS_NAME

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

See Also:
Constant Field Values

SCHEDULE_TYPE_RECURRING

public static final int SCHEDULE_TYPE_RECURRING
This constant is returned by the UI when the job type is recurring. It signals the model to request further information (the schedule) to properly populate m_intScheduleType with the correct value.

See Also:
Constant Field Values

SCHEDULE_TYPE_RUN_ONCE_NOW

public static final int SCHEDULE_TYPE_RUN_ONCE_NOW
This constant is returned by the UI when the job type is set to RunOnceNow

See Also:
Constant Field Values

c_intDict

public static final int c_intDict
Constant used internally

See Also:
Constant Field Values

c_intDictObjClass

public static final int c_intDictObjClass
Constant used internally

See Also:
Constant Field Values

c_intDictObjName

public static final int c_intDictObjName
Constant used internally

See Also:
Constant Field Values
Constructor Detail

JobModel

public JobModel()
Method Detail

DoTaskOnStartEditor

public void DoTaskOnStartEditor(XPHashtable _htFormData)
Code executed when the Editor is starting.

Overrides:
DoTaskOnStartEditor in class EditorModel
Parameters:
_htFormData -

DoTaskBeforeStore

public void DoTaskBeforeStore()
Code executed before the object is stored.

Overrides:
DoTaskBeforeStore in class EditorModel

DoTaskAfterStore

public void DoTaskAfterStore()
Code executed after the object is stored.

Overrides:
DoTaskAfterStore in class EditorModel

Create

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

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

SavePage

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

Specified by:
SavePage in interface IRepostModel
Overrides:
SavePage in class ObjEditorModel
Parameters:
_sPageName -
_htFormData -
Returns:
int Page status for server side validation

InitializeDatePickerMgrs

public void InitializeDatePickerMgrs()
This function initializes the manager objects (Page and datetime) for the date pickers


DeleteJobHistory

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

Parameters:
xpdtDeleteFrom -

StartSelectPTObject

public void StartSelectPTObject(int[] _arrNewOp)
Helper method to start the Select PTObject List. String[] _arrNewOp contains class/object id of a new operation that launched this editor else null or empty


DurationFromPTScheduleType

public static int DurationFromPTScheduleType(int nScheduleType)
This helper function translates PTSCHEDULETYPES units into PTDurationCombo values. If it returns 0, it means the schedule type does not translate into a known PTDurationCombo duration.


IsFolderRegistered

public boolean IsFolderRegistered(int nAdminFolderID)
This helper function checks whether an admin folder has been assigned to any job server


GetContinue

public int GetContinue()
Returns Continue on errors setting.

Specified by:
GetContinue in interface IJobModelRO
Returns:
int

GetLogLevel

public int GetLogLevel()
Returns Log Level setting.

Specified by:
GetLogLevel in interface IJobModelRO
Returns:
int

GetName

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

Specified by:
GetName in interface IMVCObject
Specified by:
GetName in class EditorModel
Returns:
String

GetOperations

public PTGrowableSortedArrayWrapper GetOperations()
Returns Array of Operations.

Specified by:
GetOperations in interface IJobModelRO
Returns:
PTGrowableSortedArrayWrapper

GetRecurrenceInterval

public int GetRecurrenceInterval()
Returns Recurrence Interval setting. For example this job will run every N minutes, where N is the recurrence interval.

Specified by:
GetRecurrenceInterval in interface IJobModelRO
Returns:
int

GetRestrictions

public int GetRestrictions()
Returns Restrictions setting. (0 = none (default), 1 = No Weekday, 2 = No weekend)

Specified by:
GetRestrictions in interface IJobModelRO
Returns:
int

GetScheduleType

public int GetScheduleType()
Returns Schedule Type setting. 0=NEVER, 1=ONCE, >1=PERIODICALLY. Valid values are: PT_SCHEDULETYPE_NEVER = 0 PT_SCHEDULETYPE_ONCE = 1 PT_SCHEDULETYPE_MINUTELY = 2 PT_SCHEDULETYPE_HOURLY = 3 PT_SCHEDULETYPE_DAILY = 4 PT_SCHEDULETYPE_WEEKLY = 5 PT_SCHEDULETYPE_MONTHLY = 6 PT_SCHEDULETYPE_ANNUALLY = 7

Specified by:
GetScheduleType in interface IJobModelRO
Returns:
int

GetSuspendCheckpointInterval

public int GetSuspendCheckpointInterval()
Returns Suspend Checkpoint Interval setting.

Specified by:
GetSuspendCheckpointInterval in interface IJobModelRO
Returns:
int

GetSuspendMode

public int GetSuspendMode()
Returns Suspend Mode setting: One of PT_SCHEDULE_SUSPEND_MODES: PT_SCHEDULE_WORK_CONTINUOUSLY (Default), PT_SCHEDULE_SUSPEND_ON, PT_SCHEDULE_WORK_ON

Specified by:
GetSuspendMode in interface IJobModelRO
Returns:
int

GetTimeout

public int GetTimeout()
Returns timeout setting.

Specified by:
GetTimeout in interface IJobModelRO
Returns:
int

GetTimeoutUnits

public int GetTimeoutUnits()
Returns timeout units setting.

Specified by:
GetTimeoutUnits in interface IJobModelRO
Returns:
int

IsAddOperationDisabled

public boolean IsAddOperationDisabled()
Returns true if the Add an Operation table on the Main DP should not be displayed.

Specified by:
IsAddOperationDisabled in interface IJobModelRO
Returns:
boolean

GetLocale

public XPLocale GetLocale()
Specified by:
GetLocale in interface IJobModelRO
Returns:
XPLocale

GetTimezone

public XPTimeZone GetTimezone()
Specified by:
GetTimezone in interface IJobModelRO
Returns:
XPTimeZone

GetDateFormatPattern

public java.lang.String GetDateFormatPattern()
Returns the format pattern for the current locale so that it can be passed into the date picker control

Specified by:
GetDateFormatPattern in interface IJobModelRO
Returns:
String

GetDateTimePickerControlManager

public JSDateTimePickerMgr GetDateTimePickerControlManager()
Get the Date Time picker control manager

Specified by:
GetDateTimePickerControlManager in interface IJobModelRO
Returns:
JSDateTimePickerMgr

GetRunOnceNowDateTime

public XPDateTime GetRunOnceNowDateTime()
Description copied from interface: IJobModelRO
Get the Date Time for the RunOnceNow option

Specified by:
GetRunOnceNowDateTime in interface IJobModelRO
Returns:
XPDateTime

IsJobFolderRegistered

public boolean IsJobFolderRegistered()
Returns whether the Folder containing this Job is assigned to any Automation Server

Specified by:
IsJobFolderRegistered in interface IJobModelRO
Returns:
boolean



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