|
ILIAS
trunk Revision v13.0_alpha-62-g3b72d83f2e5
|
Migrates mail attachments to the IRSS, the attachments of the most recently sent mails first, because these are the ones users access most (e.g. More...
Inheritance diagram for ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS:
Collaboration diagram for ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS:Public Member Functions | |
| getLabel () | |
| getDefaultAmountOfStepsPerRun () | |
| Tell the default amount of steps to be executed for one run of the migration. More... | |
| getPreconditions (Environment $environment) | |
| Objectives the migration depend on. More... | |
| prepare (Environment $environment) | |
| Prepare the migration by means of some environment. More... | |
| step (Environment $environment) | |
| Run one step of the migration. More... | |
| getRemainingAmountOfSteps () | |
| Count up how many "things" need to be migrated. More... | |
| getLabel () | |
| getDefaultAmountOfStepsPerRun () | |
| Tell the default amount of steps to be executed for one run of the migration. More... | |
| getPreconditions (Environment $environment) | |
| Objectives the migration depend on. More... | |
| prepare (Environment $environment) | |
| Prepare the migration by means of some environment. More... | |
| step (Environment $environment) | |
| Run one step of the migration. More... | |
| getRemainingAmountOfSteps () | |
| Count up how many "things" need to be migrated. More... | |
Private Member Functions | |
| migrateSentAttachmentDirectories () | |
| Sent and received mails share one directory per sending process. More... | |
| copyDirectoryToCollection (string $absolute_path, array $filenames, int $owner_id) | |
| Files stay on disk until the collection is stored and the mail rows point at it. More... | |
| discardResources (array $resource_ids) | |
| Copies of a directory that could not be migrated completely are removed, the next run copies it again. More... | |
| listDirectoryFiles (string $absolute_path) | |
| deleteMigratedDirectory (string $absolute_path) | |
| nextUnmigratedPaths () | |
| skipPath (string $relative_path, string $reason) | |
| mailIdsOfPath (string $relative_path) | |
| migrateSerializedMailAttachments () | |
| Drafts and scheduled mails reference files of the user's attachment pool. More... | |
| migrateSerializedMail (int $mail_id, int $user_id, string $raw_attachments, string $mail_path, bool $references_pool) | |
| migratePoolFilenamesToCollection (array $filenames, int $user_id, string $mail_path, int $mail_id) | |
| Pool files are copied, not moved: The same pool file may be referenced by several drafts and stays available in the user's pool, where it is migrated when it is used the next time. More... | |
| markConfidential (ResourceIdentification $identification) | |
| markCollectionResourcesConfidential (ResourceCollectionIdentification $rcid) | |
| clearMailAttachmentsColumn (int $mail_id) | |
| resolveOwnerIdForPath (string $relative_path) | |
| assignRcidToPath (string $relative_path, ResourceCollectionIdentification $rcid) | |
| updateMailAttachmentFields (string $relative_path, ResourceCollectionIdentification $rcid) | |
| markPathAsSkipped (string $relative_path) | |
| resolveAdminInteraction (Environment $environment) | |
| count (string $key, int $amount=1) | |
| info (string $message, array $context=[]) | |
| warning (string $message, array $context=[]) | |
| error (string $message, array $context=[], ?Throwable $exception=null) | |
| report (string $level, string $message, array $context) | |
Private Attributes | |
| const int | PATHS_PER_STEP = 25 |
| const int | MAILS_PER_STEP = 50 |
| const string | SKIPPED_MARKER = '-' |
| ilResourceStorageMigrationHelper | $helper = null |
| AdminInteraction | $io = null |
| int | $step_number = 0 |
| array | $statistics = [] |
Additional Inherited Members | |
Data Fields inherited from ILIAS\Setup\Migration | |
| const | INFINITE = -1 |
Migrates mail attachments to the IRSS, the attachments of the most recently sent mails first, because these are the ones users access most (e.g.
the first page of their inbox).
Definition at line 41 of file MigrateMailAttachmentsToIRSS.php.
|
private |
Definition at line 518 of file MigrateMailAttachmentsToIRSS.php.
References ILIAS\ResourceStorage\Identification\AbstractIdentification\serialize(), and ilDBConstants\T_TEXT.
Referenced by ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\migrateSentAttachmentDirectories().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 449 of file MigrateMailAttachmentsToIRSS.php.
References ilDBConstants\T_CLOB, and ilDBConstants\T_INTEGER.
|
private |
Files stay on disk until the collection is stored and the mail rows point at it.
A rerun can therefore still read them when this step stops in between.
| list<string> | $filenames |
Definition at line 163 of file MigrateMailAttachmentsToIRSS.php.
References ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\discardResources().
Referenced by ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\migrateSentAttachmentDirectories().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 558 of file MigrateMailAttachmentsToIRSS.php.
Referenced by ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\migrateSentAttachmentDirectories().
Here is the caller graph for this function:
|
private |
Definition at line 226 of file MigrateMailAttachmentsToIRSS.php.
Referenced by ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\migrateSentAttachmentDirectories().
Here is the caller graph for this function:
|
private |
Copies of a directory that could not be migrated completely are removed, the next run copies it again.
| list<ResourceIdentification> | $resource_ids |
Definition at line 202 of file MigrateMailAttachmentsToIRSS.php.
Referenced by ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\copyDirectoryToCollection().
Here is the caller graph for this function:
|
private |
| array<string,mixed> | $context |
Definition at line 582 of file MigrateMailAttachmentsToIRSS.php.
References $message.
Referenced by ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\step().
Here is the caller graph for this function:| ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS::getDefaultAmountOfStepsPerRun | ( | ) |
Tell the default amount of steps to be executed for one run of the migration.
Return Migration::INFINITE if all units should be migrated at once.
Implements ILIAS\Setup\Migration.
Definition at line 59 of file MigrateMailAttachmentsToIRSS.php.
| ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS::getLabel | ( | ) |
Implements ILIAS\Setup\Migration.
Definition at line 54 of file MigrateMailAttachmentsToIRSS.php.
| ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS::getPreconditions | ( | Environment | $environment | ) |
Objectives the migration depend on.
| UnachievableException | if the objective is not achievable |
Implements ILIAS\Setup\Migration.
Definition at line 64 of file MigrateMailAttachmentsToIRSS.php.
References ilResourceStorageMigrationHelper\getPreconditions().
Here is the call graph for this function:| ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS::getRemainingAmountOfSteps | ( | ) |
Count up how many "things" need to be migrated.
This helps the admin to decide how big he can create the steps and also how long a migration takes
Implements ILIAS\Setup\Migration.
Definition at line 462 of file MigrateMailAttachmentsToIRSS.php.
References ILIAS\UI\examples\MessageBox\Info\info(), ILIAS\Repository\int(), and ilDBConstants\T_TEXT.
Here is the call graph for this function:
|
private |
| array<string,mixed> | $context |
Definition at line 566 of file MigrateMailAttachmentsToIRSS.php.
References $message.
Referenced by ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\step().
Here is the caller graph for this function:
|
private |
Definition at line 212 of file MigrateMailAttachmentsToIRSS.php.
References ILIAS\UI\examples\Symbol\Glyph\Sort\sort().
Referenced by ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\migrateSentAttachmentDirectories().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 274 of file MigrateMailAttachmentsToIRSS.php.
References ILIAS\$db, $res, ILIAS\Repository\int(), and ilDBConstants\T_TEXT.
Here is the call graph for this function:
|
private |
Definition at line 442 of file MigrateMailAttachmentsToIRSS.php.
Referenced by ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\migrateSentAttachmentDirectories().
Here is the caller graph for this function:
|
private |
Definition at line 437 of file MigrateMailAttachmentsToIRSS.php.
|
private |
Definition at line 542 of file MigrateMailAttachmentsToIRSS.php.
References ilDBConstants\T_TEXT.
|
private |
Pool files are copied, not moved: The same pool file may be referenced by several drafts and stays available in the user's pool, where it is migrated when it is used the next time.
| list<string> | $filenames |
Definition at line 390 of file MigrateMailAttachmentsToIRSS.php.
|
private |
Sent and received mails share one directory per sending process.
All mails referencing a directory get the same collection, the mail_attachment rows are used for reference counting.
Definition at line 113 of file MigrateMailAttachmentsToIRSS.php.
References ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\assignRcidToPath(), ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\copyDirectoryToCollection(), ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\count(), ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\deleteMigratedDirectory(), ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\listDirectoryFiles(), ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\markCollectionResourcesConfidential(), ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\nextUnmigratedPaths(), ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\resolveOwnerIdForPath(), ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\skipPath(), ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\updateMailAttachmentFields(), and ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\warning().
Referenced by ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\step().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 328 of file MigrateMailAttachmentsToIRSS.php.
|
private |
Drafts and scheduled mails reference files of the user's attachment pool.
Mails referencing a directory are handled by migrateSentAttachmentDirectories() and must never be treated as pool references.
Definition at line 299 of file MigrateMailAttachmentsToIRSS.php.
References ILIAS\$db, $res, ILIAS\Mail\Folder\OUTBOX, and ilDBConstants\T_TEXT.
Referenced by ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\step().
Here is the caller graph for this function:
|
private |
Definition at line 237 of file MigrateMailAttachmentsToIRSS.php.
References ILIAS\$db, and $res.
Referenced by ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\migrateSentAttachmentDirectories().
Here is the caller graph for this function:| ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS::prepare | ( | Environment | $environment | ) |
Prepare the migration by means of some environment.
This is not supposed to modify the environment, but will be run to prime the migration object to run step and getRemainingAmountOfSteps afterwards.
Implements ILIAS\Setup\Migration.
Definition at line 72 of file MigrateMailAttachmentsToIRSS.php.
References ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\resolveAdminInteraction().
Here is the call graph for this function:
|
private |
| array<string,mixed> | $context |
Definition at line 595 of file MigrateMailAttachmentsToIRSS.php.
References $message, and ILIAS\UI\examples\Symbol\Glyph\Date\date().
Here is the call graph for this function:
|
private |
Definition at line 551 of file MigrateMailAttachmentsToIRSS.php.
References ILIAS\Setup\Environment\getResource().
Referenced by ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\prepare(), and ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\step().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 497 of file MigrateMailAttachmentsToIRSS.php.
References $res, ILIAS\Repository\int(), SYSTEM_USER_ID, and ilDBConstants\T_TEXT.
Referenced by ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\migrateSentAttachmentDirectories().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 258 of file MigrateMailAttachmentsToIRSS.php.
Referenced by ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\migrateSentAttachmentDirectories().
Here is the caller graph for this function:| ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS::step | ( | Environment | $environment | ) |
Run one step of the migration.
Implements ILIAS\Setup\Migration.
Definition at line 81 of file MigrateMailAttachmentsToIRSS.php.
References Vendor\Package\$e, ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\error(), ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\info(), ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\migrateSentAttachmentDirectories(), ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\migrateSerializedMailAttachments(), and ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\resolveAdminInteraction().
Here is the call graph for this function:
|
private |
Definition at line 527 of file MigrateMailAttachmentsToIRSS.php.
References ILIAS\ResourceStorage\Identification\AbstractIdentification\serialize(), ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.
Referenced by ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\migrateSentAttachmentDirectories().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
| array<string,mixed> | $context |
Definition at line 574 of file MigrateMailAttachmentsToIRSS.php.
References $message.
Referenced by ILIAS\Mail\Setup\Migration\MigrateMailAttachmentsToIRSS\migrateSentAttachmentDirectories().
Here is the caller graph for this function:
|
private |
Definition at line 47 of file MigrateMailAttachmentsToIRSS.php.
|
private |
Definition at line 48 of file MigrateMailAttachmentsToIRSS.php.
|
private |
Definition at line 52 of file MigrateMailAttachmentsToIRSS.php.
|
private |
Definition at line 49 of file MigrateMailAttachmentsToIRSS.php.
|
private |
Definition at line 44 of file MigrateMailAttachmentsToIRSS.php.
|
private |
Definition at line 43 of file MigrateMailAttachmentsToIRSS.php.
|
private |
Definition at line 45 of file MigrateMailAttachmentsToIRSS.php.