Class: TrinidadScheduler::JobDetail

Inherits:
Object
  • Object
show all
Defined in:
lib/trinidad_scheduler_extension/job_detail.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, group, job_class) ⇒ JobDetail

Returns a new instance of JobDetail.



6
7
8
9
10
11
# File 'lib/trinidad_scheduler_extension/job_detail.rb', line 6

def initialize(name, group, job_class)
  super()
  set_name name
  set_group group
  @job = job_class.new
end

Instance Attribute Details

#jobObject

Returns the value of attribute job.



4
5
6
# File 'lib/trinidad_scheduler_extension/job_detail.rb', line 4

def job
  @job
end

Instance Method Details

#validateObject

Raises:

  • (org.quartz.SchedulerException)


13
14
15
16
17
18
# File 'lib/trinidad_scheduler_extension/job_detail.rb', line 13

def validate()
  raise org.quartz.SchedulerException.new("Job's name cannot be null",
    org.quartz.SchedulerException.ERR_CLIENT_ERROR) if get_name == nil
  raise org.quartz.SchedulerException.new("Job's group cannot be null",
    org.quartz.SchedulerException.ERR_CLIENT_ERROR) if get_group == nil  
end