All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.robe.quartz.annotation.AnnotationJobInfo Maven / Gradle / Ivy

There is a newer version: 0.5.0.0-1039
Show newest version
package io.robe.quartz.annotation;


import io.robe.quartz.common.JobInfo;
import io.robe.quartz.common.TriggerInfo;
import io.robe.quartz.job.schedule.QJob;
import io.robe.quartz.job.schedule.QTrigger;
import org.quartz.Job;

import java.util.ArrayList;
import java.util.List;

public class AnnotationJobInfo implements JobInfo {
    private String name;
    private String description;
    private List triggers;
    private Class jobClass;

    public AnnotationJobInfo(QJob ann, Class jobClass) {
        name = ann.name();
        description = ann.description();
        triggers = new ArrayList<>(ann.triggers().length);
        for (QTrigger tAnn : ann.triggers()) {
            triggers.add(new AnnotationTriggerInfo(tAnn));
        }
        this.jobClass = jobClass;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public String getDescription() {
        return description;
    }

    @Override
    public List getTriggers() {
        return triggers;
    }

    @Override
    public void setTriggers(List triggers) {
        this.triggers = triggers;
    }

    @Override
    public Class getJobClass() {
        return jobClass;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy