1 package org.apache.turbine.services.schedule; 2 3 18 19 import java.util.List ; 20 21 import org.apache.turbine.services.TurbineServices; 22 import org.apache.turbine.util.TurbineException; 23 24 33 public abstract class TurbineScheduler 34 { 35 42 public static JobEntry getJob(int oid) 43 throws TurbineException 44 { 45 return getService().getJob(oid); 46 } 47 48 54 public static void addJob(JobEntry je) 55 throws TurbineException 56 { 57 getService().addJob(je); 58 } 59 60 66 public static void updateJob(JobEntry je) 67 throws TurbineException 68 { 69 getService().updateJob(je); 70 } 71 72 78 public static void removeJob(JobEntry je) 79 throws TurbineException 80 { 81 getService().removeJob(je); 82 } 83 84 89 public static List listJobs() 90 { 91 return getService().listJobs(); 92 } 93 94 99 public static boolean isEnabled() 100 { 101 return getService().isEnabled(); 102 } 103 104 107 public static void startScheduler() 108 { 109 getService().startScheduler(); 110 } 111 112 115 public static void stopScheduler() 116 { 117 getService().stopScheduler(); 118 } 119 120 126 private static ScheduleService getService() 127 { 128 return (ScheduleService) TurbineServices 129 .getInstance().getService(ScheduleService.SERVICE_NAME); 130 } 131 132 } 133 | Popular Tags |