org.figure8.join.services.scheduling
Class QuartzCronInfo

java.lang.Object
  extended by org.figure8.join.core.EntityObject
      extended by org.figure8.join.services.scheduling.QuartzCronInfo
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class QuartzCronInfo
extends EntityObject

Cron object containing info on how to create and schedule a Quartz job.

Version:
$Revision: 1.3 $
Author:
Jerome Evrard
See Also:
Serialized Form

Constructor Summary
QuartzCronInfo()
          Creates a new QuarzCron instance.
QuartzCronInfo(java.lang.String name, java.lang.String cronExpression, java.lang.String jobType, java.lang.String jobClass)
          Build a new instance with mandatory attributes.
 
Method Summary
 void addJobParameterInfo(QuartzCronParameterInfo paramInfo)
          Convenient method for adding a job parameter info to a cron.
 java.lang.Class checkJobClass()
          Try to instanciate wrapped job.
 org.quartz.JobDetail createJobDetail()
          Create a Quartz JobDetail object from this Cron informations
 java.lang.String getCronExpression()
           
 java.lang.String getJobClass()
           
 java.util.List getJobParameterInfos()
           
 java.lang.String getJobType()
           
 java.lang.String getName()
           
 void setCronExpression(java.lang.String cronExpression)
           
 void setJobClass(java.lang.String jobClass)
          Give the FQN of Java class used for instanciating a Job
 void setJobParameterInfos(java.util.List paramInfos)
           
 void setJobType(java.lang.String jobType)
           
 void setName(java.lang.String name)
           
 
Methods inherited from class org.figure8.join.core.EntityObject
clone, equals, getId, hashCode, isTransient
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuartzCronInfo

public QuartzCronInfo()
Creates a new QuarzCron instance.


QuartzCronInfo

public QuartzCronInfo(java.lang.String name,
                      java.lang.String cronExpression,
                      java.lang.String jobType,
                      java.lang.String jobClass)
               throws InvalidParameterException
Build a new instance with mandatory attributes.

Parameters:
name - The cron name.
cronExpression - The cron expression.
jobType - The job type name.
jobClass - The job class name to execute.
Throws:
InvalidParameterException
Method Detail

getName

public java.lang.String getName()
Returns:
Returns the name.

setName

public void setName(java.lang.String name)
Parameters:
name - The name to set.

getCronExpression

public java.lang.String getCronExpression()
Returns:
Returns the cronExpression.

setCronExpression

public void setCronExpression(java.lang.String cronExpression)
Parameters:
cronExpression - The cronExpression to set.

getJobType

public java.lang.String getJobType()
Returns:
Returns the jobType.

setJobType

public void setJobType(java.lang.String jobType)
Parameters:
jobType - The jobType to set.

getJobClass

public java.lang.String getJobClass()
Returns:
Returns the jobClass.

setJobClass

public void setJobClass(java.lang.String jobClass)
                 throws InvalidParameterException
Give the FQN of Java class used for instanciating a Job

Parameters:
jobClass - The name of java class implementing job
Throws:
InvalidParameterException - if the consumerBeanClass is not an instance of Job

getJobParameterInfos

public java.util.List getJobParameterInfos()
Returns:
A set of QuartzCronParameterInfos for this cron definition

setJobParameterInfos

public void setJobParameterInfos(java.util.List paramInfos)
Parameters:
paramInfos - A set of QuartzCronParameterInfos

addJobParameterInfo

public void addJobParameterInfo(QuartzCronParameterInfo paramInfo)
Convenient method for adding a job parameter info to a cron. This method manages the 2 sides of the association.

Parameters:
paramInfo - The parameter info to add to quartz cron definition

checkJobClass

public java.lang.Class checkJobClass()
                              throws InvalidParameterException
Try to instanciate wrapped job.

Throws:
InvalidParameterException - if jobClass is not valid.

createJobDetail

public org.quartz.JobDetail createJobDetail()
                                     throws InvalidParameterException
Create a Quartz JobDetail object from this Cron informations

Returns:
The newly created JobDetail object or null if no job class is specified
Throws:
InvalidParameterException - if the job class cannot be found


Copyright © 2005-2008 Join. All Rights Reserved.