com.github.quartzwebui.service.DefaultServiceStrategyFactory Maven / Gradle / Ivy
The newest version!
/**
* Licensed under the Apache License, Version 2.0 (the "License");
*/
package com.github.quartzwebui.service;
import com.github.quartzwebui.service.strategy.BasicServiceStrategy;
import com.github.quartzwebui.service.strategy.JobServiceStrategy;
import com.github.quartzwebui.service.strategy.SchedulerServiceStrategy;
import com.github.quartzwebui.service.strategy.ServiceStrategy;
import com.github.quartzwebui.service.strategy.TriggerServiceStrategy;
import com.github.quartzwebui.service.strategy.ValidateServiceStrategy;
/**
* @author quxiucheng [[email protected]]
*/
public class DefaultServiceStrategyFactory implements ServiceStrategyFactory{
public ServiceStrategy createStrategy(String url) {
// 基础信息
if (QuartzWebUIURL.BasicURL.lookup(url)) {
return new BasicServiceStrategy();
}
// Scheduler操作
if (QuartzWebUIURL.SchedulerURL.lookup(url)) {
return new SchedulerServiceStrategy();
}
// Job操作
if (QuartzWebUIURL.JobURL.lookup(url)) {
return new JobServiceStrategy();
}
if (QuartzWebUIURL.TriggerURL.lookup(url)) {
return new TriggerServiceStrategy();
}
// 校验操作
if (QuartzWebUIURL.ValidateURL.lookup(url)) {
return new ValidateServiceStrategy();
}
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy