ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
ILIAS\Cron\Job\JobEntity Class Reference
+ Collaboration diagram for ILIAS\Cron\Job\JobEntity:

Public Member Functions

 __construct (private readonly \ILIAS\Cron\CronJob $job, array $record, private readonly bool $isPlugin=false)
 
 getJob ()
 
 getJobId ()
 
 getEffectiveJobId ()
 
 getComponent ()
 
 getScheduleType ()
 
 getRawScheduleType ()
 
 getScheduleValue ()
 
 getRawScheduleValue ()
 
 getJobStatus ()
 
 getJobStatusUsrId ()
 
 getJobStatusType ()
 
 getJobStatusTimestamp ()
 
 getJobResultStatus ()
 
 getJobResultUsrId ()
 
 getJobResultCode ()
 
 getJobResultMessage ()
 
 getJobResultType ()
 
 getJobResultTimestamp ()
 
 getClass ()
 
 getPath ()
 
 getRunningTimestamp ()
 
 getJobResultDuration ()
 
 getAliveTimestamp ()
 
 isPlugin ()
 
 getEffectiveScheduleType ()
 
 getEffectiveScheduleValue ()
 
 getEffectiveTitle ()
 

Private Member Functions

 mapRecord (array $record)
 

Private Attributes

string $job_id
 
string $component
 
JobScheduleType $schedule_type
 
int $raw_schedule_type
 
int $schedule_value
 
int $raw_schedule_value
 
int $job_status
 
int $job_status_usr_id
 
int $job_status_type
 
int $job_status_timestamp
 
int $job_result_status
 
int $job_result_usr_id
 
string $job_result_code
 
string $job_result_message
 
int $job_result_type
 
int $job_result_timestamp
 
string $class
 
string $path
 
int $running_timestamp
 
int $job_result_duration
 
int $alive_timestamp
 

Detailed Description

Definition at line 25 of file JobEntity.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Cron\Job\JobEntity::__construct ( private readonly \ILIAS\Cron\CronJob  $job,
array  $record,
private readonly bool  $isPlugin = false 
)
Parameters
array<string,mixed>$record

Definition at line 52 of file JobEntity.php.

56 {
57 $this->mapRecord($record);
58 }
mapRecord(array $record)
Definition: JobEntity.php:63

References ILIAS\Cron\Job\JobEntity\mapRecord().

+ Here is the call graph for this function:

Member Function Documentation

◆ getAliveTimestamp()

ILIAS\Cron\Job\JobEntity::getAliveTimestamp ( )

Definition at line 205 of file JobEntity.php.

205 : int
206 {
208 }

References ILIAS\Cron\Job\JobEntity\$alive_timestamp.

Referenced by ILIAS\Cron\Job\Manager\UI\JobTable\formatLastRun().

+ Here is the caller graph for this function:

◆ getClass()

ILIAS\Cron\Job\JobEntity::getClass ( )

Definition at line 185 of file JobEntity.php.

185 : string
186 {
187 return $this->class;
188 }

References ILIAS\Cron\Job\JobEntity\$class.

◆ getComponent()

◆ getEffectiveJobId()

ILIAS\Cron\Job\JobEntity::getEffectiveJobId ( )

Definition at line 100 of file JobEntity.php.

100 : string
101 {
102 $job_id = $this->getJobId();
103 if ($this->isPlugin()) {
104 $job_id = 'pl__' . $this->getComponent() . '__' . $job_id;
105 }
106
107 return $job_id;
108 }

References ILIAS\Cron\Job\JobEntity\$job_id, ILIAS\Cron\Job\JobEntity\getComponent(), ILIAS\Cron\Job\JobEntity\getJobId(), and ILIAS\Cron\Job\JobEntity\isPlugin().

Referenced by ilObjCronGUI\buildForm(), ilObjCronGUI\edit(), ILIAS\Cron\Job\Manager\UI\JobTable\formatTitle(), ilObjCronGUI\initLegacyEditForm(), and ilObjCronGUI\retrieveTableActionJobIds().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEffectiveScheduleType()

ILIAS\Cron\Job\JobEntity::getEffectiveScheduleType ( )

Definition at line 215 of file JobEntity.php.

216 {
217 $type = $this->getScheduleType();
218 if (!$type || !$this->getJob()->hasFlexibleSchedule()) {
219 $type = $this->getJob()->getDefaultScheduleType();
220 }
221
222 return $type;
223 }

References ILIAS\Cron\Job\JobEntity\getJob(), and ILIAS\Cron\Job\JobEntity\getScheduleType().

Referenced by ILIAS\Cron\Job\Manager\UI\JobTableFilterMediator\filteredJobs(), and ILIAS\Cron\Job\Manager\UI\JobTable\formatSchedule().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEffectiveScheduleValue()

ILIAS\Cron\Job\JobEntity::getEffectiveScheduleValue ( )

Definition at line 225 of file JobEntity.php.

225 : int
226 {
227 $type = $this->getScheduleType();
228 $value = $this->getScheduleValue();
229 if (!$type || !$this->getJob()->hasFlexibleSchedule()) {
230 $value = (int) $this->getJob()->getDefaultScheduleValue();
231 }
232
233 return $value;
234 }

References ILIAS\Cron\Job\JobEntity\getJob(), ILIAS\Cron\Job\JobEntity\getScheduleType(), ILIAS\Cron\Job\JobEntity\getScheduleValue(), and ILIAS\Repository\int().

Referenced by ILIAS\Cron\Job\Manager\UI\JobTable\formatSchedule().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEffectiveTitle()

ILIAS\Cron\Job\JobEntity::getEffectiveTitle ( )

Definition at line 236 of file JobEntity.php.

236 : string
237 {
238 $id = $this->getJobId();
239 if ($this->isPlugin()) {
240 $id = 'pl__' . $this->getComponent() . '__' . $id;
241 }
242
243 $title = $this->getJob()->getTitle();
244 if ($title === '') {
245 $title = $id;
246 }
247
248 return $title;
249 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

References $id, ILIAS\Cron\Job\JobEntity\getComponent(), ILIAS\Cron\Job\JobEntity\getJob(), ILIAS\Cron\Job\JobEntity\getJobId(), and ILIAS\Cron\Job\JobEntity\isPlugin().

Referenced by ILIAS\Cron\Job\Manager\UI\JobTableFilterMediator\filteredJobs(), and ILIAS\Cron\Job\Manager\UI\JobTable\formatTitle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getJob()

◆ getJobId()

ILIAS\Cron\Job\JobEntity::getJobId ( )

Definition at line 95 of file JobEntity.php.

95 : string
96 {
97 return $this->job_id;
98 }

References ILIAS\Cron\Job\JobEntity\$job_id.

Referenced by ILIAS\Cron\Job\JobEntity\getEffectiveJobId(), ILIAS\Cron\Job\JobEntity\getEffectiveTitle(), and CronJobEntityTest\testCollectionCanBeFilteredAndSliced().

+ Here is the caller graph for this function:

◆ getJobResultCode()

ILIAS\Cron\Job\JobEntity::getJobResultCode ( )

Definition at line 165 of file JobEntity.php.

165 : string
166 {
168 }

References ILIAS\Cron\Job\JobEntity\$job_result_code.

Referenced by ILIAS\Cron\Job\Manager\UI\JobTable\formatResultInfo().

+ Here is the caller graph for this function:

◆ getJobResultDuration()

ILIAS\Cron\Job\JobEntity::getJobResultDuration ( )

Definition at line 200 of file JobEntity.php.

200 : int
201 {
203 }

References ILIAS\Cron\Job\JobEntity\$job_result_duration.

Referenced by ILIAS\Cron\Job\Manager\UI\JobTable\formatResultInfo().

+ Here is the caller graph for this function:

◆ getJobResultMessage()

ILIAS\Cron\Job\JobEntity::getJobResultMessage ( )

Definition at line 170 of file JobEntity.php.

170 : string
171 {
173 }

References ILIAS\Cron\Job\JobEntity\$job_result_message.

Referenced by ILIAS\Cron\Job\Manager\UI\JobTable\formatResultInfo().

+ Here is the caller graph for this function:

◆ getJobResultStatus()

ILIAS\Cron\Job\JobEntity::getJobResultStatus ( )

Definition at line 155 of file JobEntity.php.

155 : int
156 {
158 }

References ILIAS\Cron\Job\JobEntity\$job_result_status.

Referenced by ILIAS\Cron\Job\Manager\UI\JobTableFilterMediator\filteredJobs(), and ILIAS\Cron\Job\Manager\UI\JobTable\formatResult().

+ Here is the caller graph for this function:

◆ getJobResultTimestamp()

ILIAS\Cron\Job\JobEntity::getJobResultTimestamp ( )

Definition at line 180 of file JobEntity.php.

180 : int
181 {
183 }

References ILIAS\Cron\Job\JobEntity\$job_result_timestamp.

Referenced by ILIAS\Cron\Job\Manager\UI\JobTable\formatLastRun(), and ILIAS\Cron\Job\Manager\UI\JobTable\getRecords().

+ Here is the caller graph for this function:

◆ getJobResultType()

ILIAS\Cron\Job\JobEntity::getJobResultType ( )

Definition at line 175 of file JobEntity.php.

175 : int
176 {
178 }

References ILIAS\Cron\Job\JobEntity\$job_result_type.

Referenced by ILIAS\Cron\Job\Manager\UI\JobTable\formatResultInfo().

+ Here is the caller graph for this function:

◆ getJobResultUsrId()

ILIAS\Cron\Job\JobEntity::getJobResultUsrId ( )

Definition at line 160 of file JobEntity.php.

160 : int
161 {
163 }

References ILIAS\Cron\Job\JobEntity\$job_result_usr_id.

Referenced by ILIAS\Cron\Job\Manager\UI\JobTable\formatResultInfo().

+ Here is the caller graph for this function:

◆ getJobStatus()

ILIAS\Cron\Job\JobEntity::getJobStatus ( )

Definition at line 135 of file JobEntity.php.

135 : int
136 {
137 return $this->job_status;
138 }

References ILIAS\Cron\Job\JobEntity\$job_status.

Referenced by ILIAS\Cron\Job\Manager\UI\JobTableFilterMediator\filteredJobs().

+ Here is the caller graph for this function:

◆ getJobStatusTimestamp()

ILIAS\Cron\Job\JobEntity::getJobStatusTimestamp ( )

Definition at line 150 of file JobEntity.php.

150 : int
151 {
153 }

References ILIAS\Cron\Job\JobEntity\$job_status_timestamp.

Referenced by ILIAS\Cron\Job\Manager\UI\JobTable\formatStatusInfo().

+ Here is the caller graph for this function:

◆ getJobStatusType()

ILIAS\Cron\Job\JobEntity::getJobStatusType ( )

Definition at line 145 of file JobEntity.php.

145 : int
146 {
148 }

References ILIAS\Cron\Job\JobEntity\$job_status_type.

Referenced by ILIAS\Cron\Job\Manager\UI\JobTable\formatStatusInfo().

+ Here is the caller graph for this function:

◆ getJobStatusUsrId()

ILIAS\Cron\Job\JobEntity::getJobStatusUsrId ( )

Definition at line 140 of file JobEntity.php.

140 : int
141 {
143 }

References ILIAS\Cron\Job\JobEntity\$job_status_usr_id.

Referenced by ILIAS\Cron\Job\Manager\UI\JobTable\formatStatusInfo().

+ Here is the caller graph for this function:

◆ getPath()

ILIAS\Cron\Job\JobEntity::getPath ( )

Definition at line 190 of file JobEntity.php.

190 : string
191 {
192 return $this->path;
193 }

References ILIAS\Cron\Job\JobEntity\$path.

◆ getRawScheduleType()

ILIAS\Cron\Job\JobEntity::getRawScheduleType ( )

Definition at line 120 of file JobEntity.php.

120 : ?int
121 {
123 }

References ILIAS\Cron\Job\JobEntity\$raw_schedule_type.

Referenced by ilObjCronGUI\buildForm(), and ilObjCronGUI\initLegacyEditForm().

+ Here is the caller graph for this function:

◆ getRawScheduleValue()

ILIAS\Cron\Job\JobEntity::getRawScheduleValue ( )

Definition at line 130 of file JobEntity.php.

130 : ?int
131 {
133 }

References ILIAS\Cron\Job\JobEntity\$raw_schedule_value.

Referenced by ilObjCronGUI\buildForm(), and ilObjCronGUI\initLegacyEditForm().

+ Here is the caller graph for this function:

◆ getRunningTimestamp()

ILIAS\Cron\Job\JobEntity::getRunningTimestamp ( )

Definition at line 195 of file JobEntity.php.

195 : int
196 {
198 }

References ILIAS\Cron\Job\JobEntity\$running_timestamp.

Referenced by ILIAS\Cron\Job\Manager\UI\JobTable\formatLastRun(), and ILIAS\Cron\Job\Manager\UI\JobTable\getRecords().

+ Here is the caller graph for this function:

◆ getScheduleType()

ILIAS\Cron\Job\JobEntity::getScheduleType ( )

Definition at line 115 of file JobEntity.php.

116 {
118 }
JobScheduleType $schedule_type
Definition: JobEntity.php:29

References ILIAS\Cron\Job\JobEntity\$schedule_type.

Referenced by ILIAS\Cron\Job\JobEntity\getEffectiveScheduleType(), and ILIAS\Cron\Job\JobEntity\getEffectiveScheduleValue().

+ Here is the caller graph for this function:

◆ getScheduleValue()

ILIAS\Cron\Job\JobEntity::getScheduleValue ( )

Definition at line 125 of file JobEntity.php.

125 : int
126 {
128 }

References ILIAS\Cron\Job\JobEntity\$schedule_value.

Referenced by ILIAS\Cron\Job\JobEntity\getEffectiveScheduleValue().

+ Here is the caller graph for this function:

◆ isPlugin()

ILIAS\Cron\Job\JobEntity::isPlugin ( )

◆ mapRecord()

ILIAS\Cron\Job\JobEntity::mapRecord ( array  $record)
private
Parameters
array<string,mixed>$record

Definition at line 63 of file JobEntity.php.

63 : void
64 {
65 $this->job_id = (string) $record['job_id'];
66 $this->component = (string) $record['component'];
67 $this->schedule_type = is_numeric($record['schedule_type']) ? JobScheduleType::tryFrom(
68 (int) $record['schedule_type']
69 ) : null;
70 $this->raw_schedule_type = $record['schedule_type'];
71 $this->schedule_value = (int) $record['schedule_value'];
72 $this->raw_schedule_value = $record['schedule_value'];
73 $this->job_status = (int) $record['job_status'];
74 $this->job_status_usr_id = (int) $record['job_status_user_id'];
75 $this->job_status_type = (int) $record['job_status_type'];
76 $this->job_status_timestamp = (int) $record['job_status_ts'];
77 $this->job_result_status = (int) $record['job_result_status'];
78 $this->job_result_usr_id = (int) $record['job_result_user_id'];
79 $this->job_result_code = (string) $record['job_result_code'];
80 $this->job_result_message = (string) $record['job_result_message'];
81 $this->job_result_type = (int) $record['job_result_type'];
82 $this->job_result_timestamp = (int) $record['job_result_ts'];
83 $this->class = (string) $record['class'];
84 $this->path = (string) $record['path'];
85 $this->running_timestamp = (int) $record['running_ts'];
86 $this->job_result_duration = (int) $record['job_result_dur'];
87 $this->alive_timestamp = (int) $record['alive_ts'];
88 }

References ILIAS\Repository\int().

Referenced by ILIAS\Cron\Job\JobEntity\__construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $alive_timestamp

int ILIAS\Cron\Job\JobEntity::$alive_timestamp
private

Definition at line 47 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getAliveTimestamp().

◆ $class

string ILIAS\Cron\Job\JobEntity::$class
private

Definition at line 43 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getClass().

◆ $component

string ILIAS\Cron\Job\JobEntity::$component
private

Definition at line 28 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getComponent().

◆ $job_id

string ILIAS\Cron\Job\JobEntity::$job_id
private

◆ $job_result_code

string ILIAS\Cron\Job\JobEntity::$job_result_code
private

Definition at line 39 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getJobResultCode().

◆ $job_result_duration

int ILIAS\Cron\Job\JobEntity::$job_result_duration
private

Definition at line 46 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getJobResultDuration().

◆ $job_result_message

string ILIAS\Cron\Job\JobEntity::$job_result_message
private

Definition at line 40 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getJobResultMessage().

◆ $job_result_status

int ILIAS\Cron\Job\JobEntity::$job_result_status
private

Definition at line 37 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getJobResultStatus().

◆ $job_result_timestamp

int ILIAS\Cron\Job\JobEntity::$job_result_timestamp
private

Definition at line 42 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getJobResultTimestamp().

◆ $job_result_type

int ILIAS\Cron\Job\JobEntity::$job_result_type
private

Definition at line 41 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getJobResultType().

◆ $job_result_usr_id

int ILIAS\Cron\Job\JobEntity::$job_result_usr_id
private

Definition at line 38 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getJobResultUsrId().

◆ $job_status

int ILIAS\Cron\Job\JobEntity::$job_status
private

Definition at line 33 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getJobStatus().

◆ $job_status_timestamp

int ILIAS\Cron\Job\JobEntity::$job_status_timestamp
private

Definition at line 36 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getJobStatusTimestamp().

◆ $job_status_type

int ILIAS\Cron\Job\JobEntity::$job_status_type
private

Definition at line 35 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getJobStatusType().

◆ $job_status_usr_id

int ILIAS\Cron\Job\JobEntity::$job_status_usr_id
private

Definition at line 34 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getJobStatusUsrId().

◆ $path

string ILIAS\Cron\Job\JobEntity::$path
private

Definition at line 44 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getPath().

◆ $raw_schedule_type

int ILIAS\Cron\Job\JobEntity::$raw_schedule_type
private

Definition at line 30 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getRawScheduleType().

◆ $raw_schedule_value

int ILIAS\Cron\Job\JobEntity::$raw_schedule_value
private

Definition at line 32 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getRawScheduleValue().

◆ $running_timestamp

int ILIAS\Cron\Job\JobEntity::$running_timestamp
private

Definition at line 45 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getRunningTimestamp().

◆ $schedule_type

JobScheduleType ILIAS\Cron\Job\JobEntity::$schedule_type
private

Definition at line 29 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getScheduleType().

◆ $schedule_value

int ILIAS\Cron\Job\JobEntity::$schedule_value
private

Definition at line 31 of file JobEntity.php.

Referenced by ILIAS\Cron\Job\JobEntity\getScheduleValue().


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