BrightSide Workbench Full Report + Source Code
org.turro.scheduler.task.settings.TaskSettingsSet Class Reference
Inheritance diagram for org.turro.scheduler.task.settings.TaskSettingsSet:
Collaboration diagram for org.turro.scheduler.task.settings.TaskSettingsSet:

Public Member Functions

void save () throws IOException
 
String toJson ()
 
String toJson (Map< String, Object > properties)
 

Static Public Member Functions

static boolean noTasks ()
 
static TaskSettingsSet load () throws IOException
 
static TaskSettingsSet from (String json)
 

Static Public Attributes

static final String SCHEDULER_FILE = "/WEB-INF/elephant/conf/tasks/scheduler.json"
 

Detailed Description

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

Definition at line 34 of file TaskSettingsSet.java.

Member Function Documentation

◆ from()

static TaskSettingsSet org.turro.scheduler.task.settings.TaskSettingsSet.from ( String  json)
static

Definition at line 155 of file TaskSettingsSet.java.

155  {
156  return IJSONizable.fromJson(json, TaskSettingsSet.class);
157  }
Here is the caller graph for this function:

◆ load()

static TaskSettingsSet org.turro.scheduler.task.settings.TaskSettingsSet.load ( ) throws IOException
static

Definition at line 45 of file TaskSettingsSet.java.

45  {
46  Document doc = Document.from(ElephantContext.getRealPath(SCHEDULER_FILE));
47  if(doc.exists()) {
48  return from(doc.content()).addSystemTasks();
49  } else {
50  return new TaskSettingsSet();
51  }
52  }
static TaskSettingsSet from(String json)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ noTasks()

static boolean org.turro.scheduler.task.settings.TaskSettingsSet.noTasks ( )
static

Definition at line 39 of file TaskSettingsSet.java.

39  {
40  return Document.from(ElephantContext.getRealPath(SCHEDULER_FILE)).length() < 10L;
41  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ save()

void org.turro.scheduler.task.settings.TaskSettingsSet.save ( ) throws IOException

Definition at line 54 of file TaskSettingsSet.java.

54  {
55  Document doc = Document.from(ElephantContext.getRealPath(SCHEDULER_FILE));
56  doc.content(toJson());
57  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ toJson() [1/2]

String org.turro.scheduler.task.settings.TaskSettingsSet.toJson ( )

Definition at line 146 of file TaskSettingsSet.java.

146  {
147  return toJson(this);
148  }
Here is the caller graph for this function:

◆ toJson() [2/2]

String org.turro.scheduler.task.settings.TaskSettingsSet.toJson ( Map< String, Object >  properties)

Definition at line 151 of file TaskSettingsSet.java.

151  {
152  return toJson(this, properties);
153  }
Here is the call graph for this function:

Member Data Documentation

◆ SCHEDULER_FILE

final String org.turro.scheduler.task.settings.TaskSettingsSet.SCHEDULER_FILE = "/WEB-INF/elephant/conf/tasks/scheduler.json"
static

Definition at line 37 of file TaskSettingsSet.java.


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