19 declare(strict_types=1);
56 return $this->collection_repository->has($identification);
64 yield from $this->collection_repository->getResourceIdStrings($identification);
79 if (!$this->id_generator->validateScheme($identification->
serialize())) {
80 throw new \InvalidArgumentException(
'Invalid identification scheme');
86 return $this->collection_repository->blank(
87 $this->id_generator->getUniqueResourceCollectionIdentification(),
95 $existing = $this->collection_repository->existing($identification);
96 if ($existing->hasSpecificOwner()
97 && $existing->getOwner() !== $owner
99 throw new \InvalidArgumentException(
'Invalid owner of collection');
106 if ($this->lock_handler !== null) {
107 $result = $this->lock_handler->lockTables(
108 $this->collection_repository->getNamesForLocking(),
109 function () use ($collection):
void {
110 $this->collection_repository->update($collection);
113 $result->runAndUnlock();
115 $this->collection_repository->update($collection);
123 $this->collection_repository->delete($identification);
129 $this->collection_repository->removeResourceFromAllCollections($identification);
getResourceIdStrings(ResourceCollectionIdentification $identification)
notififyResourceDeletion(ResourceIdentification $identification)
Class ChatMainBarProvider .
Repository CollectionRepository $collection_repository
Class ResourceCollectionIdentification.
Interface CollectionRepository.
getResourceIds(ResourceCollectionIdentification $identification)
Class ResourceCollection.
CollectionIdentificationGenerator $id_generator
__construct(Repository\CollectionRepository $collection_repository, ?CollectionIdentificationGenerator $id_generator=null, ?\ILIAS\ResourceStorage\Lock\LockHandler $lock_handler=null)
validate(ResourceCollectionIdentification $identification)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
has(ResourceCollectionIdentification $identification)
Class ResourceIdentification.
store(ResourceCollection $collection)
Class CollectionIdentificationGenerator.
ILIAS ResourceStorage Lock LockHandler $lock_handler
Class UniqueIDCollectionIdentificationGenerator.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...