ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 
 getScheduleValue ()
 
 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 $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 50 of file JobEntity.php.

54 {
55 $this->mapRecord($record);
56 }
mapRecord(array $record)
Definition: JobEntity.php:61

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 191 of file JobEntity.php.

191 : int
192 {
194 }

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 171 of file JobEntity.php.

171 : string
172 {
173 return $this->class;
174 }

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

◆ getComponent()

◆ getEffectiveJobId()

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

Definition at line 96 of file JobEntity.php.

96 : string
97 {
98 $job_id = $this->getJobId();
99 if ($this->isPlugin()) {
100 $job_id = 'pl__' . $this->getComponent() . '__' . $job_id;
101 }
102
103 return $job_id;
104 }

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 ILIAS\Cron\Job\Manager\UI\JobTable\formatTitle(), and ilCronManagerGUI\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 201 of file JobEntity.php.

202 {
203 $type = $this->getScheduleType();
204 if (!$type || !$this->getJob()->hasFlexibleSchedule()) {
205 $type = $this->getJob()->getDefaultScheduleType();
206 }
207
208 return $type;
209 }

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 211 of file JobEntity.php.

211 : int
212 {
213 $type = $this->getScheduleType();
214 $value = $this->getScheduleValue();
215 if (!$type || !$this->getJob()->hasFlexibleSchedule()) {
216 $value = (int) $this->getJob()->getDefaultScheduleValue();
217 }
218
219 return $value;
220 }

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 222 of file JobEntity.php.

222 : string
223 {
224 $id = $this->getJobId();
225 if ($this->isPlugin()) {
226 $id = 'pl__' . $this->getComponent() . '__' . $id;
227 }
228
229 $title = $this->getJob()->getTitle();
230 if ($title === '') {
231 $title = $id;
232 }
233
234 return $title;
235 }
$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 91 of file JobEntity.php.

91 : string
92 {
93 return $this->job_id;
94 }

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 151 of file JobEntity.php.

151 : string
152 {
154 }

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 186 of file JobEntity.php.

186 : int
187 {
189 }

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 156 of file JobEntity.php.

156 : string
157 {
159 }

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 141 of file JobEntity.php.

141 : int
142 {
144 }

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 166 of file JobEntity.php.

166 : int
167 {
169 }

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 161 of file JobEntity.php.

161 : int
162 {
164 }

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 146 of file JobEntity.php.

146 : int
147 {
149 }

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 121 of file JobEntity.php.

121 : int
122 {
123 return $this->job_status;
124 }

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 136 of file JobEntity.php.

136 : int
137 {
139 }

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 131 of file JobEntity.php.

131 : int
132 {
134 }

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 126 of file JobEntity.php.

126 : int
127 {
129 }

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 176 of file JobEntity.php.

176 : string
177 {
178 return $this->path;
179 }

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

◆ getRunningTimestamp()

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

Definition at line 181 of file JobEntity.php.

181 : int
182 {
184 }

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 111 of file JobEntity.php.

112 {
114 }
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 116 of file JobEntity.php.

116 : int
117 {
119 }

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 61 of file JobEntity.php.

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

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 45 of file JobEntity.php.

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

◆ $class

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

Definition at line 41 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 37 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 44 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 38 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 35 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 40 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 39 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 36 of file JobEntity.php.

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

◆ $job_status

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

Definition at line 31 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 34 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 33 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 32 of file JobEntity.php.

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

◆ $path

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

Definition at line 42 of file JobEntity.php.

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

◆ $running_timestamp

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

Definition at line 43 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 30 of file JobEntity.php.

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


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