|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JobManager
The JobManager
interface provides for managing (CRUD) job definitions, scheduling jobs and managing their run histories.
Nested Class Summary | |
---|---|
static class |
JobManager.JOB_STATUS All the states a job can be in. |
Method Summary | |
---|---|
void |
createJobDefinition(JobDefinition job) Stores a new Job Definition in the Database. |
void |
deleteJobDefinition(String name) Removes a job definition identified by the given name from the Database. |
JobDefinition |
getJobDefinition(String name) Retrieves the named Job Definition from the Database. |
void |
updateJobDefinition(JobDefinition job) Update an existing Job Definition in the Database. |
Methods inherited from interface com.bea.wlp.services.IServiceAvailability |
---|
isAvailable |
Method Detail |
---|
void createJobDefinition(JobDefinition job) throws JobManagerRuntimeException
EventJobDefinition
s are stored in the Database and they will be deleted automatically after the first run. The job definition is persistent and survives application or web application redeploys. The new job definition overwrites the old job definition with the same name.
Example:
CalendarJobDefinition cal = new CalendarJobDefinition(name); cal.setGroup("MyJobGroup"); cal.setDescription("Test Job"); cal.setEnabled(true); cal.setJobClass("com.bea.qa.p13n.jobmanager.CalendarTestJob"); cal.setYear("2007"); cal.setMonth("5"); cal.setDay("5"); JobManagerService jobManagerService = Services.getService(JobManagerService.class); JobManager jobManager = jobManagerService.getJobManager(); // For web app scoped job manager, use getJobManager(servletContext); jobManager.createJobDefinition(cal);
job
- Job Definition object to save.JobManagerRuntimeException
- if couldn't create the given job definition.JobDefinition getJobDefinition(String name) throws JobManagerRuntimeException
name
- Job definition's nameJobManagerRuntimeException
- if an error occurs.void updateJobDefinition(JobDefinition job) throws JobManagerRuntimeException
job
- Must have been retrieved using the getJobDefinition method and altered in place.JobManagerRuntimeException
- if the given job couldn't be updated.void deleteJobDefinition(String name) throws JobManagerRuntimeException
name
- Job definition's nameJobManagerRuntimeException
- if unable to delete a job for the given name.
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010, Oracle. All rights reserved.