com.plumtree.server
Interface IPTJob

All Superinterfaces:
IPTLocalizable, IPTObject, IPTServerContext, IPTStorable, IPTUnknown

public interface IPTJob
extends IPTObject

Version:
$Revision$
Author:
MikeS A scheduled job contains a Schedule and an ordered list of objects that support the IPTScheduledOperation interface. The sequence of operations will be run, in order, by the system at the configured start times.

Method Summary
 void AddJobListEntry(int nIndex, int Class, int ObjectID)
          Adds an operation to the list of items executed within this job
 boolean GetDeleteWhenDone()
          Returns a boolean indicating whether the Job object will be automatically removed upon completion.
 boolean GetIsSuspendable()
          - OBSELETE, Functionality moved to automation server agents - Returns a boolean indicating whether this operation supports suspension, or is capable of serializing its execution state.
 int GetLastStatus()
          Returns an int corresponding to a PT_JOBSTATUS indicating the state of the job when it was run or is running last time.
 IPTSchedule GetSchedule()
          Returns a schedule object indicating the next scheduled launch and recurring interval (if any)
 int GetSettingsAsInt(int JobSetting)
          Returns an int corresponding to a PT_JOB_SETTINGS determining runtimes, timeouts, and logging levels
 com.plumtree.openfoundation.util.XPDateTime GetSettingsAsXPDateTime(int JobSetting)
          Returns an XPDateTime corresponding to a PT_JOB_SETTINGS determining runtimes, timeouts, and logging levels
 int GetStatus()
          - OBSELETE, Functionality moved to automation server agents - Returns an int corresponding to a PT_JOBSTATUS indicating the state of the job (running, interrupted, failed, suspended, etc.)
 IPTQueryResult QueryJobList()
          Returns the list of operations scheduled within this Job
 void RemoveJobListEntry(int nIndex)
          Removes an existing operation from this Job's list
 boolean ResumeJob()
          - OBSELETE, Functionality moved to automation server agents - Launches a previously suspended job.
 boolean SaveCheckpoint()
          - OBSELETE, Functionality moved to automation server agents - A method used by the server to trigger suspension like action.
 void SetDeleteWhenDone(boolean Value)
          Sets a boolean indicating whether the Job object will be automatically removed upon completion.
 void SetSettings(int Value, int pvValue)
          Sets an int corresponding to a PT_JOB_SETTINGS determining runtimes, timeouts, and logging levels
 void SetSettings(int Value, com.plumtree.openfoundation.util.XPDateTime pvValue)
          Sets an XPDateTime corresponding to a PT_JOB_SETTINGS determining runtimes or timeouts
 void SetStatus(int Value)
          - OBSELETE, Functionality moved to automation server agents - Sets an int corresponding to a PT_JOBSTATUS indicating the state of the job (running, interrupted, failed, suspended, etc.)
 boolean SuspendJob()
          - OBSELETE, Functionality moved to agents - Forces running job to serialize its state at the next checkpoint.
 
Methods inherited from interface com.plumtree.server.IPTObject
GetAdminFolderID, GetClassID, GetCreated, GetImageUUID, GetLastModified, GetObjectProperties, SetAdminFolderID, SetImageUUID, SetLastModified
 
Methods inherited from interface com.plumtree.server.IPTLocalizable
GetDescription, GetIsLocalized, GetLocalizedDescription, GetLocalizedDescriptions, GetLocalizedName, GetLocalizedNames, GetName, GetPrimaryLang, GetSupportsLocalization, SetDescription, SetIsLocalized, SetLocalizedDescriptions, SetLocalizedNames, SetName, SetPrimaryLang
 
Methods inherited from interface com.plumtree.server.IPTUnknown
GetInterfaces
 
Methods inherited from interface com.plumtree.server.IPTServerContext
GetAccessLevel, GetACL, GetLastModifiedBy, GetLockState, GetObjectID, GetOwnerID, GetServerContextSettings, GetSession, GetSettings, LockObject, SetLastModifiedBy, SetObjectID, SetOwnerID, SetServerContextSettings, UnlockObject
 
Methods inherited from interface com.plumtree.server.IPTStorable
Store
 

Method Detail

GetSettingsAsInt

int GetSettingsAsInt(int JobSetting)
Returns an int corresponding to a PT_JOB_SETTINGS determining runtimes, timeouts, and logging levels

Parameters:
JobSetting - the requested PT_JOB_SETTINGS type
Returns:
an int value for the requested job setting

GetSettingsAsXPDateTime

com.plumtree.openfoundation.util.XPDateTime GetSettingsAsXPDateTime(int JobSetting)
Returns an XPDateTime corresponding to a PT_JOB_SETTINGS determining runtimes, timeouts, and logging levels

Parameters:
JobSetting - the requested PT_JOB_SETTINGS type
Returns:
an XPDateTime value for the requested job setting

SetSettings

void SetSettings(int Value,
                 int pvValue)
Sets an int corresponding to a PT_JOB_SETTINGS determining runtimes, timeouts, and logging levels

Specified by:
SetSettings in interface IPTServerContext
Parameters:
Value - PT_JOB_SETTINGS type
pvValue - an int value for the requested job setting

SetSettings

void SetSettings(int Value,
                 com.plumtree.openfoundation.util.XPDateTime pvValue)
Sets an XPDateTime corresponding to a PT_JOB_SETTINGS determining runtimes or timeouts

Parameters:
Value - PT_JOB_SETTINGS type
pvValue - an XPDateTime value for the requested job setting

QueryJobList

IPTQueryResult QueryJobList()
Returns the list of operations scheduled within this Job

Returns:
a QueryResult containing the order, object ID, and class ID of this job's operations

AddJobListEntry

void AddJobListEntry(int nIndex,
                     int Class,
                     int ObjectID)
Adds an operation to the list of items executed within this job

Parameters:
nIndex - the position of execution
Class - the Class ID of the desired operation
ObjectID - the Object ID of the desiered operation

RemoveJobListEntry

void RemoveJobListEntry(int nIndex)
Removes an existing operation from this Job's list

Parameters:
nIndex - the index of the operation to be deleted

GetSchedule

IPTSchedule GetSchedule()
Returns a schedule object indicating the next scheduled launch and recurring interval (if any)

Returns:
an IPTSchedul interface for this Job

GetDeleteWhenDone

boolean GetDeleteWhenDone()
Returns a boolean indicating whether the Job object will be automatically removed upon completion.

Returns:
a boolean, if true, Job is deleted after execution

SetDeleteWhenDone

void SetDeleteWhenDone(boolean Value)
Sets a boolean indicating whether the Job object will be automatically removed upon completion.

Parameters:
Value - a boolean, if true, Job is deleted after execution

GetIsSuspendable

boolean GetIsSuspendable()
- OBSELETE, Functionality moved to automation server agents - Returns a boolean indicating whether this operation supports suspension, or is capable of serializing its execution state.

Returns:
a boolean, if true, indicates suspend capability

SuspendJob

boolean SuspendJob()
- OBSELETE, Functionality moved to agents - Forces running job to serialize its state at the next checkpoint. Suspended jobs can resume where they left off using the ResumeJob method.

Returns:
a boolean indicating whether the suspension request succeeded.

ResumeJob

boolean ResumeJob()
- OBSELETE, Functionality moved to automation server agents - Launches a previously suspended job.

Returns:
a boolean indicating whether the resume request succeeded.

SaveCheckpoint

boolean SaveCheckpoint()
- OBSELETE, Functionality moved to automation server agents - A method used by the server to trigger suspension like action.

Returns:
a boolean indicating success of checkpoint storage.

GetStatus

int GetStatus()
- OBSELETE, Functionality moved to automation server agents - Returns an int corresponding to a PT_JOBSTATUS indicating the state of the job (running, interrupted, failed, suspended, etc.)

Returns:
an int for PT_JOBSTATUS

SetStatus

void SetStatus(int Value)
- OBSELETE, Functionality moved to automation server agents - Sets an int corresponding to a PT_JOBSTATUS indicating the state of the job (running, interrupted, failed, suspended, etc.)

Parameters:
Value - an int for PT_JOBSTATUS

GetLastStatus

int GetLastStatus()
Returns an int corresponding to a PT_JOBSTATUS indicating the state of the job when it was run or is running last time. Status can be running, interrupted, failed, suspended, etc.

Returns:
an int for PT_JOBSTATUS