diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-02-04 12:51:23 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-02-04 12:51:23 +0100 |
commit | fc215d0980ec3cfa21ac64119bcec614cc1323bb (patch) | |
tree | 4b4aac5a83f642f35404fc1be7a593d58d77e8c8 /lib/public | |
parent | cd16ba5cb3bf9333b0ecacab4bf152c1b692ed59 (diff) | |
download | nextcloud-server-fc215d0980ec3cfa21ac64119bcec614cc1323bb.tar.gz nextcloud-server-fc215d0980ec3cfa21ac64119bcec614cc1323bb.zip |
Make the share object lazy
Share providers can now just pass in a fileId. And the node will only be
created once needed.
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/share/ishare.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/public/share/ishare.php b/lib/public/share/ishare.php index 5a82436c720..074f4117584 100644 --- a/lib/public/share/ishare.php +++ b/lib/public/share/ishare.php @@ -24,8 +24,7 @@ namespace OCP\Share; use OCP\Files\File; use OCP\Files\Folder; use OCP\Files\Node; -use OCP\IUser; -use OCP\IGroup; +use OCP\Files\NotFoundException; /** * Interface IShare @@ -55,21 +54,30 @@ interface IShare { /** * Set the node of the file/folder that is shared * - * @param File|Folder $path + * @param Node $node * @return \OCP\Share\IShare The modified object * @since 9.0.0 */ - public function setNode(Node $path); + public function setNode(Node $node); /** * Get the node of the file/folder that is shared * * @return File|Folder * @since 9.0.0 + * @throws NotFoundException */ public function getNode(); /** + * Set file id for lazy evaluation of the node + * @param int $fileId + * @return \OCP\Share\IShare The modified object + * @since 9.0.0 + */ + public function setNodeId($fileId); + + /** * Set the shareType * * @param int $shareType |