19 package org.turro.scheduler.model;
21 import java.util.List;
23 import org.turro.elephant.util.Messages;
24 import org.turro.reflection.Instances;
25 import org.turro.scheduler.motor.Motor;
26 import org.turro.scheduler.task.AbstractTask;
27 import org.turro.scheduler.task.TaskSet;
28 import org.zkoss.bind.BindUtils;
29 import org.zkoss.bind.annotation.BindingParam;
30 import org.zkoss.bind.annotation.Command;
40 if(selected !=
null && selected.
isDone()) {
51 public void delete() {
52 if(selected !=
null && !selected.
isSystem()) {
57 BindUtils.postNotifyChange(
null,
null,
TasksVM.this,
"model",
"selected");
66 BindUtils.postNotifyChange(
null,
null,
TasksVM.this,
"model",
"selected");
73 .stream().filter(t -> !t.isSystem()).toList();
85 this.selected = selected;
static Messages confirmDeletion()
Messages add(String word)
void setSelected(AbstractTask selected)
void add(@BindingParam("task") AbstractTask task)
List< AbstractTask > getAvailable()
AbstractTask getSelected()
static Motor getInstance()
Set< AbstractTask > getTasks()
abstract boolean isSystem()
static void save(Set< AbstractTask > tasks)