1 changed files with 47 additions and 0 deletions
@ -0,0 +1,47 @@ |
|||||
|
package io.sc.engine.mv.executor; |
||||
|
|
||||
|
import io.sc.engine.mv.Executor; |
||||
|
import io.sc.engine.mv.ExecutorManager; |
||||
|
import org.slf4j.Logger; |
||||
|
import org.slf4j.LoggerFactory; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.jdbc.core.JdbcTemplate; |
||||
|
|
||||
|
import javax.annotation.PostConstruct; |
||||
|
|
||||
|
public abstract class AbstractExecutor implements Executor { |
||||
|
@Autowired protected ExecutorManager executorManager; |
||||
|
@Autowired protected JdbcTemplate jdbcTemplate; |
||||
|
protected boolean enable =true; |
||||
|
protected Logger log =LoggerFactory.getLogger(this.getClass()); |
||||
|
|
||||
|
@PostConstruct |
||||
|
public void init(){ |
||||
|
executorManager.regist(this); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String getClassName() { |
||||
|
return this.getClass().getName(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String getNameI18nKey() { |
||||
|
return this.getClass().getName()+".name"; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String getDescriptionI18nKey() { |
||||
|
return this.getClass().getName()+".description"; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public boolean isEnable() { |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void setEnable(boolean enable) { |
||||
|
this.enable =enable; |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue