Tabnine Logo
PropertySettingJobFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
PropertySettingJobFactory
in
org.quartz.simpl

Best Java code snippets using org.quartz.simpl.PropertySettingJobFactory (Showing top 16 results out of 315)

origin: quartz-scheduler/quartz

private void handleError(String message, Exception e) throws SchedulerException {
  if (isThrowIfPropertyNotFound()) {
    throw new SchedulerException(message, e);
  }
  
  if (isWarnIfPropertyNotFound()) {
    if (e == null) {
      getLog().warn(message);
    } else {
      getLog().warn(message, e);
    }
  }
}

origin: quartz-scheduler/quartz

  bi = Introspector.getBeanInfo(obj.getClass());
} catch (IntrospectionException e) {
  handleError("Unable to introspect Job class.", e);
  java.lang.reflect.Method setMeth = getSetMethod(methName, propDescs);
      handleError(
        "No setter on Job class " + obj.getClass().getName() + 
        " for property '" + name + "'");
    if (paramType.isPrimitive()) {
      if (o == null) {
        handleError(
          "Cannot set primitive property '" + name + 
          "' on Job class " + obj.getClass().getName() + 
      handleError(
        "The setter on Job class " + obj.getClass().getName() + 
        " for property '" + name + 
    handleError(
      "The setter on Job class " + obj.getClass().getName() + 
      " for property '" + name + 
      " but was given " + o.getClass().getName(), nfe);
  } catch (IllegalArgumentException e) {
    handleError(
      "The setter on Job class " + obj.getClass().getName() + 
      " for property '" + name + 
origin: quartz-scheduler/quartz

@Override
public Job newJob(TriggerFiredBundle bundle, Scheduler scheduler) throws SchedulerException {
  Job job = super.newJob(bundle, scheduler);
  
  JobDataMap jobDataMap = new JobDataMap();
  jobDataMap.putAll(scheduler.getContext());
  jobDataMap.putAll(bundle.getJobDetail().getJobDataMap());
  jobDataMap.putAll(bundle.getTrigger().getJobDataMap());
  setBeanProps(job, jobDataMap);
  
  return job;
}

origin: quartz-scheduler/quartz

private void handleError(String message) throws SchedulerException {
  handleError(message, null);
}

origin: quartz-scheduler/quartz

@Override
public Job newJob(TriggerFiredBundle bundle, Scheduler scheduler) throws SchedulerException {
  Job job = super.newJob(bundle, scheduler);
  
  JobDataMap jobDataMap = new JobDataMap();
  jobDataMap.putAll(scheduler.getContext());
  jobDataMap.putAll(bundle.getJobDetail().getJobDataMap());
  jobDataMap.putAll(bundle.getTrigger().getJobDataMap());
  setBeanProps(job, jobDataMap);
  
  return job;
}

origin: quartz-scheduler/quartz

private void handleError(String message) throws SchedulerException {
  handleError(message, null);
}

origin: quartz-scheduler/quartz

private void handleError(String message, Exception e) throws SchedulerException {
  if (isThrowIfPropertyNotFound()) {
    throw new SchedulerException(message, e);
  }
  
  if (isWarnIfPropertyNotFound()) {
    if (e == null) {
      getLog().warn(message);
    } else {
      getLog().warn(message, e);
    }
  }
}

origin: quartz-scheduler/quartz

  bi = Introspector.getBeanInfo(obj.getClass());
} catch (IntrospectionException e) {
  handleError("Unable to introspect Job class.", e);
  java.lang.reflect.Method setMeth = getSetMethod(methName, propDescs);
      handleError(
        "No setter on Job class " + obj.getClass().getName() + 
        " for property '" + name + "'");
    if (paramType.isPrimitive()) {
      if (o == null) {
        handleError(
          "Cannot set primitive property '" + name + 
          "' on Job class " + obj.getClass().getName() + 
      handleError(
        "The setter on Job class " + obj.getClass().getName() + 
        " for property '" + name + 
    handleError(
      "The setter on Job class " + obj.getClass().getName() + 
      " for property '" + name + 
      " but was given " + o.getClass().getName(), nfe);
  } catch (IllegalArgumentException e) {
    handleError(
      "The setter on Job class " + obj.getClass().getName() + 
      " for property '" + name + 
origin: com.opensymphony.quartz/com.springsource.org.quartz

public Job newJob(TriggerFiredBundle bundle) throws SchedulerException {
  Job job = super.newJob(bundle);
  
  JobDataMap jobDataMap = new JobDataMap();
  jobDataMap.putAll(bundle.getJobDetail().getJobDataMap());
  jobDataMap.putAll(bundle.getTrigger().getJobDataMap());
  setBeanProps(job, jobDataMap);
  
  return job;
}

origin: com.opensymphony.quartz/com.springsource.org.quartz

private void handleError(String message) throws SchedulerException {
  handleError(message, null);
}

origin: com.opensymphony.quartz/com.springsource.org.quartz

private void handleError(String message, Exception e) throws SchedulerException {
  if (isThrowIfPropertyNotFound()) {
    throw new SchedulerException(message, e);
  }
  
  if (isWarnIfPropertyNotFound()) {
    if (e == null) {
      getLog().warn(message);
    } else {
      getLog().warn(message, e);
    }
  }
}

origin: com.opensymphony.quartz/com.springsource.org.quartz

  bi = Introspector.getBeanInfo(obj.getClass());
} catch (IntrospectionException e) {
  handleError("Unable to introspect Job class.", e);
  java.lang.reflect.Method setMeth = getSetMethod(methName, propDescs);
      handleError(
        "No setter on Job class " + obj.getClass().getName() + 
        " for property '" + name + "'");
    if (paramType.isPrimitive()) {
      if (o == null) {
        handleError(
          "Cannot set primitive property '" + name + 
          "' on Job class " + obj.getClass().getName() + 
      handleError(
        "The setter on Job class " + obj.getClass().getName() + 
        " for property '" + name + 
    handleError(
      "The setter on Job class " + obj.getClass().getName() + 
      " for property '" + name + 
      " but was given " + o.getClass().getName(), nfe);
  } catch (IllegalArgumentException e) {
    handleError(
      "The setter on Job class " + obj.getClass().getName() + 
      " for property '" + name + 
origin: quartz/quartz-all

public Job newJob(TriggerFiredBundle bundle) throws SchedulerException {
  Job job = super.newJob(bundle);
  
  JobDataMap jobDataMap = new JobDataMap();
  jobDataMap.putAll(bundle.getJobDetail().getJobDataMap());
  jobDataMap.putAll(bundle.getTrigger().getJobDataMap());
  setBeanProps(job, jobDataMap);
  
  return job;
}

origin: quartz/quartz-all

private void handleError(String message) throws SchedulerException {
  handleError(message, null);
}

origin: quartz/quartz-all

private void handleError(String message, Exception e) throws SchedulerException {
  if (isThrowIfPropertyNotFound()) {
    throw new SchedulerException(message, e);
  }
  
  if (isWarnIfPropertyNotFound()) {
    if (e == null) {
      getLog().warn(message);
    } else {
      getLog().warn(message, e);
    }
  }
}

origin: quartz/quartz-all

  bi = Introspector.getBeanInfo(obj.getClass());
} catch (IntrospectionException e) {
  handleError("Unable to introspect Job class.", e);
  java.lang.reflect.Method setMeth = getSetMethod(methName, propDescs);
      handleError(
        "No setter on Job class " + obj.getClass().getName() + 
        " for property '" + name + "'");
    if (paramType.isPrimitive()) {
      if (o == null) {
        handleError(
          "Cannot set primitive property '" + name + 
          "' on Job class " + obj.getClass().getName() + 
      handleError(
        "The setter on Job class " + obj.getClass().getName() + 
        " for property '" + name + 
    handleError(
      "The setter on Job class " + obj.getClass().getName() + 
      " for property '" + name + 
      " but was given " + o.getClass().getName(), nfe);
  } catch (IllegalArgumentException e) {
    handleError(
      "The setter on Job class " + obj.getClass().getName() + 
      " for property '" + name + 
org.quartz.simplPropertySettingJobFactory

Javadoc

A JobFactory that instantiates the Job instance (using the default no-arg constructor, or more specifically: class.newInstance()), and then attempts to set all values from the SchedulerContext and the JobExecutionContext's merged JobDataMap onto bean properties of the Job.

Set the warnIfPropertyNotFound property to true if you'd like noisy logging in the case of values in the JobDataMap not mapping to properties on your Job class. This may be useful for troubleshooting typos of property names, etc. but very noisy if you regularly (and purposely) have extra things in your JobDataMap.

Also of possible interest is the throwIfPropertyNotFound property which will throw exceptions on unmatched JobDataMap keys.

Most used methods

  • getLog
  • getSetMethod
  • handleError
  • isThrowIfPropertyNotFound
    Whether the JobInstantiation should fail and throw and exception if a key (name) and value (type) fo
  • isWarnIfPropertyNotFound
    Whether a warning should be logged if a key (name) and value (type) found in the JobDataMap does not
  • setBeanProps

Popular in Java

  • Running tasks concurrently on multiple threads
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now