BrightSide Workbench Full Report + Source Code
org.turro.scheduler.model.TasksVM Class Reference

Public Member Functions

void runSelected ()
 
void save ()
 
void delete ()
 
void add (@BindingParam("task") AbstractTask task)
 
List< AbstractTaskgetAvailable ()
 
AbstractTask getSelected ()
 
void setSelected (AbstractTask selected)
 
Set getModel ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 36 of file TasksVM.java.

Member Function Documentation

◆ add()

void org.turro.scheduler.model.TasksVM.add ( @BindingParam("task") AbstractTask  task)

Definition at line 63 of file TasksVM.java.

63  {
64  Motor.getInstance().getTasks().add(task);
65  selected = task;
66  BindUtils.postNotifyChange(null, null, TasksVM.this, "model", "selected");
67  }
Here is the call graph for this function:

◆ delete()

void org.turro.scheduler.model.TasksVM.delete ( )

Definition at line 51 of file TasksVM.java.

51  {
52  if(selected != null && !selected.isSystem()) {
53  Messages.confirmDeletion().add(selected.getDescription())
54  .show(() -> {
55  Motor.getInstance().getTasks().remove(selected);
56  selected = null;
57  BindUtils.postNotifyChange(null, null, TasksVM.this, "model", "selected");
58  });
59  }
60  }
Here is the call graph for this function:

◆ getAvailable()

List<AbstractTask> org.turro.scheduler.model.TasksVM.getAvailable ( )

Definition at line 71 of file TasksVM.java.

71  {
72  return Instances.fresh().bySuper(AbstractTask.class, AbstractTask.class)
73  .stream().filter(t -> !t.isSystem()).toList();
74  }

◆ getModel()

Set org.turro.scheduler.model.TasksVM.getModel ( )

Definition at line 90 of file TasksVM.java.

90  {
91  return Motor.getInstance().getTasks();
92  }
Here is the call graph for this function:

◆ getSelected()

AbstractTask org.turro.scheduler.model.TasksVM.getSelected ( )

Definition at line 80 of file TasksVM.java.

80  {
81  return selected;
82  }

◆ runSelected()

void org.turro.scheduler.model.TasksVM.runSelected ( )

Definition at line 39 of file TasksVM.java.

Here is the call graph for this function:

◆ save()

void org.turro.scheduler.model.TasksVM.save ( )

Definition at line 46 of file TasksVM.java.

46  {
47  TaskSet.save(Motor.getInstance().getTasks());
48  }
Here is the call graph for this function:

◆ setSelected()

void org.turro.scheduler.model.TasksVM.setSelected ( AbstractTask  selected)

Definition at line 84 of file TasksVM.java.

84  {
85  this.selected = selected;
86  }

The documentation for this class was generated from the following file: