diff options
author | Joas Schilling <coding@schilljs.com> | 2019-02-11 14:57:38 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-03-01 22:56:19 +0300 |
commit | 59c92a75139b9db1cc1171f41bac971c2c528873 (patch) | |
tree | c897e2fcec33a4c3509539f67198a90c17efc307 /lib/public/Collaboration/Resources/IManager.php | |
parent | ece471de360ebbebee6b098a20d65042dd69928c (diff) |
Further work on the access cache
Searching for all is still a problem
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public/Collaboration/Resources/IManager.php')
-rw-r--r-- | lib/public/Collaboration/Resources/IManager.php | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/lib/public/Collaboration/Resources/IManager.php b/lib/public/Collaboration/Resources/IManager.php index 77f958e513a..af371f7b4f0 100644 --- a/lib/public/Collaboration/Resources/IManager.php +++ b/lib/public/Collaboration/Resources/IManager.php @@ -22,6 +22,8 @@ declare(strict_types=1); namespace OCP\Collaboration\Resources; +use OCP\IUser; + /** * @since 16.0.0 */ @@ -36,27 +38,48 @@ interface IManager extends IProvider { public function getCollection(int $id): ICollection; /** + * @param int $id + * @param IUser|null $user + * @return ICollection + * @throws CollectionException when the collection could not be found + * @since 16.0.0 + */ + public function getCollectionForUser(int $id, ?IUser $user): ICollection; + + /** * @param string $name * @return ICollection * @since 16.0.0 */ public function newCollection(string $name): ICollection; + /** + * Can a user/guest access the collection + * + * @param ICollection $collection + * @param IUser|null $user + * @return bool + * @since 16.0.0 + */ + public function canAccessCollection(ICollection $collection, ?IUser $user): bool; /** - * @param string $name - * @return ICollection + * @param string $type + * @param string $id + * @return IResource * @since 16.0.0 */ - public function renameCollection(int $id, string $name): ICollection; + public function createResource(string $type, string $id): IResource; /** * @param string $type * @param string $id + * @param IUser|null $user * @return IResource + * @throws ResourceException * @since 16.0.0 */ - public function getResource(string $type, string $id): IResource; + public function getResourceForUser(string $type, string $id, ?IUser $user): IResource; /** * @param IProvider $provider |