Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Collaboration/Resources/IManager.php')
-rw-r--r--lib/public/Collaboration/Resources/IManager.php31
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