74 $this->migration_log_handle = fopen($log_file_path,
'ab');
81 $this->movement_implementation = $storage_handler->movementImplementation();
88 $storage_handler_factory,
89 $revisionDBRepository,
90 $resourceDBRepository,
91 $informationDBRepository,
92 $stakeholderDBRepository,
97 $resourceDBRepository,
98 $revisionDBRepository,
99 $informationDBRepository,
100 $stakeholderDBRepository
102 $this->consumer_factory =
new ConsumerFactory($storage_handler_factory);
117 $aditional_info =
'';
119 $stream = Streams::ofResource(fopen($version->getPath(),
'rb'));
123 $version->getVersion(),
124 $version->getOwner(),
125 $version->getTitle(),
129 $this->resource_builder->appendFromStream(
133 $this->keep_originals
137 $aditional_info = $t->getMessage();
142 $resource->getIdentification()->serialize(),
143 $version->getVersion(),
150 $resource->addStakeholder($this->stakeholder);
152 $this->resource_builder->store($resource);
153 $this->database->manipulateF(
154 'UPDATE file_data SET rid = %s WHERE file_id = %s',
156 [$resource->getIdentification()->serialize(), $object_id]
174 string $aditional_info = null
176 fputcsv($this->migration_log_handle, [
182 $movement_implementation,
195 $r = $this->database->queryF(
"SELECT rid FROM file_data WHERE file_id = %s", [
'integer'],
197 $d = $this->database->fetchObject($r);
199 if (isset(
$d->rid) &&
$d->rid !==
'' && ($resource_identification = $this->storage_manager->find(
$d->rid)) && $resource_identification !== null) {
200 $resource = $this->resource_builder->get($resource_identification);
202 $resource = $this->resource_builder->newBlank();
222 $this->keep_originals =
true;
Class FileNamePolicyException.
setMigrateToNewObjectId(?int $migrate_to_new_object_id)
Class ilObjFileStakeholder.
Class ilFileObjectToStorageDirectory.
Interface StorageResource.
Interface StakeholderDBRepository.
Class ResourceDBRepository.
getResource(ilFileObjectToStorageDirectory $item)
Class RevisionDBRepository.
__construct(Filesystem $file_system, ilDBInterface $database, string $log_file_path)
ilFileObjectToStorageMigration constructor.
Class StorageHandlerFactory.
$migrate_to_new_object_id
logMigratedFile(int $object_id, string $rid, int $version, string $old_path, string $status, string $movement_implementation, string $aditional_info=null)
Exercise XML Parser which completes/updates a given file by an xml string.
migrate(ilFileObjectToStorageDirectory $item)
getMigrateToNewObjectId()
Class StandardRepositoryPreloader.
Class FlySystemFileAccessTest disabled disabled disabled.
Class ilFileObjectToStorageInfoResolver.
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d