19 declare(strict_types=1);
60 return $this->collection_repository->has($identification);
68 yield
from $this->collection_repository->getResourceIdStrings($identification);
83 if (!$this->id_generator->validateScheme($identification->
serialize())) {
84 throw new \InvalidArgumentException(
'Invalid identification scheme');
90 return $this->collection_repository->blank(
91 $this->id_generator->getUniqueResourceCollectionIdentification(),
99 $existing = $this->collection_repository->existing($identification);
100 if ($existing->hasSpecificOwner()
101 && $existing->getOwner() !== $owner
116 if ($this->lock_handler !== null) {
117 $result = $this->lock_handler->lockTables(
118 $this->collection_repository->getNamesForLocking(),
119 function () use ($collection, $event_data_container):
void {
120 $this->collection_repository->update($collection, $event_data_container);
123 $result->runAndUnlock();
125 $this->collection_repository->update($collection, $event_data_container);
129 foreach ($event_data_container->get() as $event_data) {
130 $this->events->notify(Event::COLLECTION_RESOURCE_ADDED, $event_data);
138 $this->collection_repository->delete($identification);
144 $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
validate(ResourceCollectionIdentification $identification)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
has(ResourceCollectionIdentification $identification)
__construct(Repository\CollectionRepository $collection_repository, private Subject $events, ?CollectionIdentificationGenerator $id_generator=null, ?\ILIAS\ResourceStorage\Lock\LockHandler $lock_handler=null)
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...