com.ibm.pim.job
Interface Job

All Known Subinterfaces:
CategoryImport, Export, Import, ItemImport, Report, UserJob

public interface Job

This interface defines methods for scheduler job.

Since:
6.0.0

Field Summary
static java.lang.String copyright
           
 
Method Summary
 void delete()
          Delete the job.
 User getCreator()
          Gets the creator of the job.
 java.lang.String getDescription()
          Gets job description.
 Executable getExecutable()
          Retrieves the job executable object.
 Schedule getLastRunSchedule()
          Get the last run schedule.
 java.util.List<java.lang.String> getParameterNames()
          Gets the names of all parameters for the job.
 java.lang.String getParameterValue(java.lang.String parameterName)
          Gets the value for the specified parameter.
 boolean getRecurring()
          Indicates if the job can be recurring.
 java.util.Collection<Schedule> getSchedules()
          Gets all the schedules for the given job.
 void save()
          Saves the job.
 void setParameterValue(java.lang.String parameterName, java.lang.String parameterValue)
          Sets the parameter value for the job schedule.
 void setRecurring(boolean isRecurring)
          Enables or disables the job to be recurring.A job can be recurring if the job can be scheduled to run more than one time, i.e.
 

Field Detail

copyright

static final java.lang.String copyright
See Also:
Constant Field Values
Method Detail

getDescription

java.lang.String getDescription()
Gets job description.

Returns:
the description
Throws:
PIMInternalException - If an internal error occurs.

getExecutable

Executable getExecutable()
Retrieves the job executable object.

Returns:
the Executable object
Throws:
PIMInternalException - If an internal error occurs.

getParameterNames

java.util.List<java.lang.String> getParameterNames()
Gets the names of all parameters for the job.

Returns:
a list of parameter names
Throws:
PIMInternalException - If an internal error occurs.

getParameterValue

java.lang.String getParameterValue(java.lang.String parameterName)
Gets the value for the specified parameter.

Returns:
the parameter value string
Throws:
PIMInternalException - If an internal error occurs.
java.lang.IllegalArgumentException - If parameterName is null or empty.

setParameterValue

void setParameterValue(java.lang.String parameterName,
                       java.lang.String parameterValue)
Sets the parameter value for the job schedule.

Parameters:
parameterName - the parameter name
parameterValue - the value String
Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - Reserved for future use.
java.lang.IllegalArgumentException - If parameterName or parameterValue is null or empty.

getRecurring

boolean getRecurring()
Indicates if the job can be recurring. A job can be recurring if the job can be scheduled to run more than one time, i.e. the job can be scheduled for Schedule.Type other than IMMEDIATE and ONE_TIME.

Returns:
true if it can be recurring, or false if not
Throws:
PIMInternalException - If an internal error occurs.

setRecurring

void setRecurring(boolean isRecurring)
Enables or disables the job to be recurring.A job can be recurring if the job can be scheduled to run more than one time, i.e. the job can be scheduled for Schedule.Type other than IMMEDIATE and ONE_TIME.

Parameters:
isRecurring - true for recurring, or false non-recurring
Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - Reserved for future use.

getSchedules

java.util.Collection<Schedule> getSchedules()
Gets all the schedules for the given job.

Returns:
a list of Schedule objects
Throws:
PIMInternalException - If an internal error occurs.

save

void save()
Saves the job. This must be done for any changes to the job to take effect.

Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - Reserved for future use.

delete

void delete()
Delete the job. effect.

Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - Reserved for future use.

getLastRunSchedule

Schedule getLastRunSchedule()
Get the last run schedule.

Returns:
the Schedule object
Throws:
PIMInternalException - If an internal error occurs.

getCreator

User getCreator()
Gets the creator of the job.

Returns:
the User object.
Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - Reserved for future use.