diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-01-13 13:02:23 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-01-13 16:35:15 +0100 |
commit | cbd3050f4c5d0c98cc627cfab5d1ab8b85f1ae7c (patch) | |
tree | 50e58fd40b41fc11f4d669591b9d816fe0e06716 /lib/private/share20/ishare.php | |
parent | 67b7ebccd134d68329fae201669924118a4d98fc (diff) | |
download | nextcloud-server-cbd3050f4c5d0c98cc627cfab5d1ab8b85f1ae7c.tar.gz nextcloud-server-cbd3050f4c5d0c98cc627cfab5d1ab8b85f1ae7c.zip |
[Share 2.0] Use full share id (providerId:shareId)
Now that we support multiple managers we communicate shares to the
outside as 'providerId:shareId'. This makes sures that id's are unique
when references from the OCS API.
However, since we do not want to break the OCS API v1 we need to
somewhat hack around this.
When we switch to OCS API v2 (which we should when we support more
custom providers). We will change the id to always be the fullShareId.
Diffstat (limited to 'lib/private/share20/ishare.php')
-rw-r--r-- | lib/private/share20/ishare.php | 43 |
1 files changed, 33 insertions, 10 deletions
diff --git a/lib/private/share20/ishare.php b/lib/private/share20/ishare.php index 53cfe76916d..34d1dfa4d3d 100644 --- a/lib/private/share20/ishare.php +++ b/lib/private/share20/ishare.php @@ -36,10 +36,33 @@ interface IShare { public function getId(); /** + * Set the id of the share + * + * @param string $id + * @return IShare The modified share object + */ + public function setId($id); + + /** + * Get the full share id + * + * @return string + */ + public function getFullId(); + + /** + * Set the provider id + * + * @param string $id + * @return IShare The modified share object + */ + public function setProviderId($id); + + /** * Set the path of this share * * @param Node $path - * @return Share The modified object + * @return IShare The modified object */ public function setPath(Node $path); @@ -54,7 +77,7 @@ interface IShare { * Set the shareType * * @param int $shareType - * @return Share The modified object + * @return IShare The modified object */ public function setShareType($shareType); @@ -69,7 +92,7 @@ interface IShare { * Set the receiver of this share * * @param IUser|IGroup|string - * @return Share The modified object + * @return IShare The modified object */ public function setSharedWith($sharedWith); @@ -84,7 +107,7 @@ interface IShare { * Set the permissions * * @param int $permissions - * @return Share The modified object + * @return IShare The modified object */ public function setPermissions($permissions); @@ -99,7 +122,7 @@ interface IShare { * Set the expiration date * * @param \DateTime $expireDate - * @return Share The modified object + * @return IShare The modified object */ public function setExpirationDate($expireDate); @@ -114,7 +137,7 @@ interface IShare { * Set the sharer of the path * * @param IUser|string $sharedBy - * @return Share The modified object + * @return IShare The modified object */ public function setSharedBy($sharedBy); @@ -130,7 +153,7 @@ interface IShare { * * @param IUser|string * - * @return Share The modified object + * @return IShare The modified object */ public function setShareOwner($shareOwner); @@ -146,7 +169,7 @@ interface IShare { * * @param string $password * - * @return Share The modified object + * @return IShare The modified object */ public function setPassword($password); @@ -161,7 +184,7 @@ interface IShare { * Set the token * * @param string $token - * @return Share The modified object + * @return IShare The modified object */ public function setToken($token); @@ -183,7 +206,7 @@ interface IShare { * Set the target of this share * * @param string $target - * @return Share The modified object + * @return IShare The modified object */ public function setTarget($target); |