本文整理汇总了Java中org.easyrec.model.core.web.RemoteTenant.setSchedulerExecutionTime方法的典型用法代码示例。如果您正苦于以下问题:Java RemoteTenant.setSchedulerExecutionTime方法的具体用法?Java RemoteTenant.setSchedulerExecutionTime怎么用?Java RemoteTenant.setSchedulerExecutionTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.easyrec.model.core.web.RemoteTenant
的用法示例。
在下文中一共展示了RemoteTenant.setSchedulerExecutionTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: scheduler
import org.easyrec.model.core.web.RemoteTenant; //导入方法依赖的package包/类
public ModelAndView scheduler(HttpServletRequest request, HttpServletResponse httpServletResponse) {
String tenantId = ServletUtils.getSafeParameter(request, "tenantId", "");
String operatorId = ServletUtils.getSafeParameter(request, "operatorId", "");
String enabled = ServletUtils.getSafeParameter(request, "enabled", "");
String executionTime = ServletUtils.getSafeParameter(request, "executiontime", "");
ModelAndView mav = new ModelAndView("page");
mav.addObject("title", "easyrec :: administration");
mav.addObject("operatorId", operatorId);
mav.addObject("tenantId", tenantId);
if (!Security.isDeveloper(request))
return MessageBlock.createSingle(mav, MSG.NOT_SIGNED_IN, STORE_SCHEDULER, MSG.ERROR);
RemoteTenant remoteTenant = remoteTenantDAO.get(operatorId, tenantId);
if (remoteTenant != null) {
remoteTenant.setSchedulingEnabled(enabled);
String previousTime = remoteTenant.getSchedulerExecutionTime();
remoteTenant.setSchedulerExecutionTime(executionTime);
tenantService.storeTenantConfig(remoteTenant.getId(), remoteTenant.getTenantConfigProperties());
// always update! tenant is removed on update if scheduling is disabled
//if (!Strings.isNullOrEmpty(executionTime)) {
pluginScheduler.addTask(remoteTenant, previousTime);
//}
}
return MessageBlock.createSingle(mav, MSG.PLUGIN_CONFIG_CHANGED, STORE_SCHEDULER, MSG.SUCCESS);
}