\App\ConfigModule\ModelsSchedulerManager

Scheduler configuration manager

Summary

Methods
Properties
Constants
__construct()
delete()
getTaskFiles()
getMessagings()
getServices()
list()
load()
fixHwpid()
fixTasks()
save()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
getTaskMessagings()
getTaskMessageTypes()
$genericConfigManager
$fileManager
$fileName
$schemaManager
$serviceManager
$timeManager
N/A

Properties

$genericConfigManager

$genericConfigManager : \App\ConfigModule\Models\GenericManager

Type

normal — Generic config manager

$fileManager

$fileManager : \App\CoreModule\Models\JsonFileManager

Type

normal — JSON file manager

$fileName

$fileName : string

Type

normal — File name (without .json)

$schemaManager

$schemaManager : \App\ConfigModule\Models\SchedulerSchemaManager

Type

normal — Scheduler JSON schema manager

$serviceManager

$serviceManager : \App\ServiceModule\Models\ServiceManager

Type

normal — IQRF Gateway Daemon's service manager

$timeManager

$timeManager : \App\ConfigModule\Models\TaskTimeManager

Type

normal — Scheduler's task time specification manager

Methods

__construct()

__construct(\App\ConfigModule\Models\MainManager  $mainManager, \App\ConfigModule\Models\GenericManager  $genericManager, \App\ConfigModule\Models\TaskTimeManager  $timeManager, \App\ServiceModule\Models\ServiceManager  $serviceManager, \App\CoreModule\Models\CommandManager  $commandManager, \App\ConfigModule\Models\SchedulerSchemaManager  $schemaManager) : mixed

Constructor

Parameters

\App\ConfigModule\Models\MainManager $mainManager

Main configuration manager

\App\ConfigModule\Models\GenericManager $genericManager

Generic configuration manager

\App\ConfigModule\Models\TaskTimeManager $timeManager

Scheduler's task time specification manager

\App\ServiceModule\Models\ServiceManager $serviceManager

IQRF Gateway Daemon's service manager

\App\CoreModule\Models\CommandManager $commandManager

Command manager

\App\ConfigModule\Models\SchedulerSchemaManager $schemaManager

Scheduler JSON schema manager

Returns

mixed

delete()

delete(int  $id) : void

Deletes a task

Parameters

int $id

Task ID

getTaskFiles()

getTaskFiles() : string[]

Gets task's files

Returns

string[] —

Files with tasks

getMessagings()

getMessagings() : string[][]

Gets available messagings

Throws

\Nette\Utils\JsonException

Returns

string[][] —

Available messagings

getServices()

getServices() : string[]

Gets scheduler's services

Throws

\Nette\Utils\JsonException

Returns

string[] —

Scheduler's services

list()

list() : array

Gets tasks

Returns

array —

Tasks

load()

load(int  $id) : \stdClass

Loads the task's configuration

Parameters

int $id

Task ID

Throws

\App\CoreModule\Exceptions\InvalidJsonException
\App\ConfigModule\Exceptions\InvalidTaskMessageException
\Nette\Utils\JsonException
\App\CoreModule\Exceptions\NonexistentJsonSchemaException

Returns

\stdClass —

Array for the form

fixHwpid()

fixHwpid(int|null  $hwpId = null) : string

Fixes the HWPID format

Parameters

int|null $hwpId

HWPID to fix

Returns

string —

Fixed HWPID

fixTasks()

fixTasks(\stdClass  $config) : void

Fixes the task specification

Parameters

\stdClass $config

Scheduler task

save()

save(\stdClass  $config) : void

Saves the task's configuration

Parameters

\stdClass $config

Task's configuration

Throws

\App\ConfigModule\Exceptions\InvalidTaskMessageException
\Nette\Utils\JsonException

getTaskMessagings()

getTaskMessagings(array  $tasks) : string

Returns messagings used in tasks

Parameters

array $tasks

Tasks

Returns

string —

Messagings used in tasks

getTaskMessageTypes()

getTaskMessageTypes(array  $tasks) : string

Returns message types used in tasks

Parameters

array $tasks

Tasks

Returns

string —

Message types used in tasks