|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.ucsb.nceas.metacat.shared.BaseAccess
edu.ucsb.nceas.metacat.scheduler.ScheduledJobAccess
public class ScheduledJobAccess
| Constructor Summary | |
|---|---|
ScheduledJobAccess()
|
|
| Method Summary | |
|---|---|
void |
createJob(ScheduledJobDAO jobDAO,
java.util.HashMap<java.lang.String,java.lang.String> jobParams)
Create a job in the database |
void |
createJob(java.lang.String name,
java.lang.String triggerName,
java.lang.String groupName,
java.lang.Class<org.quartz.Job> jobClass,
java.util.Calendar startTime,
java.util.Calendar endTime,
int intervalValue,
java.lang.String intervalUnit,
java.util.HashMap<java.lang.String,java.lang.String> jobParams)
Create a job in the database. |
java.util.HashMap<java.lang.Long,ScheduledJobDAO> |
getAllJobs(java.lang.String groupName)
Get all jobs for a given group. |
ScheduledJobDAO |
getJob(java.lang.Long jobId)
Get a job based on it's id |
ScheduledJobDAO |
getJobByName(java.lang.String jobName)
Get a job by it's name |
java.util.HashMap<java.lang.Long,ScheduledJobDAO> |
getJobsWithParameter(java.lang.String groupName,
java.lang.String paramName,
java.lang.String paramValue)
Get all jobs that have a given parameter with a given value |
protected ScheduledJobDAO |
populateDAO(java.sql.ResultSet resultSet)
Populate a job data object with the current row in a resultset |
void |
updateJobStatus(ScheduledJobDAO jobDAO)
Update the status of a job in the database |
| Methods inherited from class edu.ucsb.nceas.metacat.shared.BaseAccess |
|---|
closeDBObjects |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScheduledJobAccess()
throws AccessException
AccessException| Method Detail |
|---|
public ScheduledJobDAO getJob(java.lang.Long jobId)
throws AccessException
jobId - the id of the job in the database
AccessException
public ScheduledJobDAO getJobByName(java.lang.String jobName)
throws AccessException
jobName - the name of the job to get
AccessException
public java.util.HashMap<java.lang.Long,ScheduledJobDAO> getJobsWithParameter(java.lang.String groupName,
java.lang.String paramName,
java.lang.String paramValue)
throws AccessException
groupName - the group to which the job belongs. This keeps us from
returning unrelated jobs that just happen to have a similar
parameterparamName - the name of the parameter we are looking forparamValue - the value of the parameter we are looking for
AccessException
public java.util.HashMap<java.lang.Long,ScheduledJobDAO> getAllJobs(java.lang.String groupName)
throws AccessException
groupName - the name of the group we want to search
AccessException
public void createJob(java.lang.String name,
java.lang.String triggerName,
java.lang.String groupName,
java.lang.Class<org.quartz.Job> jobClass,
java.util.Calendar startTime,
java.util.Calendar endTime,
int intervalValue,
java.lang.String intervalUnit,
java.util.HashMap<java.lang.String,java.lang.String> jobParams)
throws AccessException
name - the name of the job. This should be uniquetriggerName - the name of the trigger that is registered in the scheduler
servicegroupName - the group of the jobjobClass - the class that implements the job functionality. The name of
this class will be extracted and put into the database.startTime - the time when the job should first runintervalValue - the amount of time between job runs.intervalUnit - the unit of time that the intervalValue represents. Valid
values are s,m,h, d and wjobParams - a map of parameters that are associated with this job.
AccessException
public void createJob(ScheduledJobDAO jobDAO,
java.util.HashMap<java.lang.String,java.lang.String> jobParams)
throws AccessException
jobDAO - the job data object that holds necessary informationjobParams - a map of parameters that are associated with this job.
AccessException
public void updateJobStatus(ScheduledJobDAO jobDAO)
throws AccessException
jobDAO - the job data object that we want to change. The status should
already have been updated in this object
AccessException
protected ScheduledJobDAO populateDAO(java.sql.ResultSet resultSet)
throws java.sql.SQLException
populateDAO in class BaseAccessresultSet - the result set which is already pointing to the desired row.
java.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||