DefaultShareProvider

class OC\Share20\DefaultShareProvider
Class DefaultShareProvider
Source:lib/private/Share20/DefaultShareProvider.php#64
Implements:OCP\Share\IShareProvider

Constants

SHARE_TYPE_USERGROUP = 2
Source:lib/private/Share20/DefaultShareProvider.php#67

Properties

Methods

public OC\Share20\DefaultShareProvider::__construct($connection, $userManager, $groupManager, $rootFolder, $mailer, $defaults, $l10nFactory, $urlGenerator, $config)
Source:lib/private/Share20/DefaultShareProvider.php#96
public OC\Share20\DefaultShareProvider::identifier()
Return the identifier of this provider.
Source:lib/private/Share20/DefaultShareProvider.php#122
Returns:string Containing only [a-zA-Z0-9]
public OC\Share20\DefaultShareProvider::create($share)
Share a path
Source:

lib/private/Share20/DefaultShareProvider.php#134

Parameters:
Returns:

\OCP\Share\IShare The share object

Throws:

\OCP\Share\Exceptions\ShareNotFound

Throws:

\Exception

Throws:

\OCP\Share\Exceptions\ShareNotFound

Throws:

\Exception

public OC\Share20\DefaultShareProvider::update($share)
Update a share
Source:

lib/private/Share20/DefaultShareProvider.php#245

Parameters:
Returns:

\OCP\Share\IShare The share object

Throws:

\OCP\Share\Exceptions\ShareNotFound

Throws:

\OCP\Files\InvalidPathException

Throws:

\OCP\Files\NotFoundException

Throws:

\OCP\Share\Exceptions\ShareNotFound

Throws:

\OCP\Files\InvalidPathException

Throws:

\OCP\Files\NotFoundException

Throws:

\OCP\Share\Exceptions\ShareNotFound

Throws:

\OCP\Files\InvalidPathException

Throws:

\OCP\Files\NotFoundException

public OC\Share20\DefaultShareProvider::acceptShare($share, $recipient)
Accept a share.
Source:

lib/private/Share20/DefaultShareProvider.php#337

Parameters:
Returns:

\OCP\Share\IShare The share object

Since:

9.0.0

public OC\Share20\DefaultShareProvider::getChildren($parent)
Get all children of this share
Source:

lib/private/Share20/DefaultShareProvider.php#401

Parameters:
Returns:

\OCP\Share\IShare[]

public OC\Share20\DefaultShareProvider::delete($share)
Delete a share
Source:

lib/private/Share20/DefaultShareProvider.php#438

Parameters:
public OC\Share20\DefaultShareProvider::deleteFromSelf($share, $recipient)
Unshare a share from the recipient. If this is a group share
this means we need a special entry in the share db.
Source:

lib/private/Share20/DefaultShareProvider.php#463

Parameters:
Throws:

\OC\Share20\Exception\BackendError

Throws:

\OC\Share20\Exception\ProviderException

Throws:

\OC\Share20\Exception\BackendError

Throws:

\OC\Share20\Exception\ProviderException

protected OC\Share20\DefaultShareProvider::createUserSpecificGroupShare($share, $recipient)
Source:lib/private/Share20/DefaultShareProvider.php#524
public OC\Share20\DefaultShareProvider::restore($share, $recipient)
Source:lib/private/Share20/DefaultShareProvider.php#552
public OC\Share20\DefaultShareProvider::move($share, $recipient)
Source:lib/private/Share20/DefaultShareProvider.php#584
public OC\Share20\DefaultShareProvider::getSharesInFolder($userId, $node, $reshares)
Source:lib/private/Share20/DefaultShareProvider.php#641
public OC\Share20\DefaultShareProvider::getSharesBy($userId, $shareType, $node, $reshares, $limit, $offset)
Source:lib/private/Share20/DefaultShareProvider.php#688
public OC\Share20\DefaultShareProvider::getShareById($id, $recipientId=null)
Source:lib/private/Share20/DefaultShareProvider.php#739
public OC\Share20\DefaultShareProvider::getSharesByPath($path)
Get shares for a given path
Source:

lib/private/Share20/DefaultShareProvider.php#788

Parameters:
Returns:

\OCP\Share\IShare[]

public OC\Share20\DefaultShareProvider::getSharedWith($userId, $shareType, $node, $limit, $offset)
Source:lib/private/Share20/DefaultShareProvider.php#838
public OC\Share20\DefaultShareProvider::getShareByToken($token)
Get a share by token
Source:

lib/private/Share20/DefaultShareProvider.php#973

Parameters:
  • $token (string)
Returns:

\OCP\Share\IShare

Throws:

\OCP\Share\Exceptions\ShareNotFound

public OC\Share20\DefaultShareProvider::userDeleted($uid, $shareType)
A user is deleted from the system
So clean up the relevant shares.
Source:

lib/private/Share20/DefaultShareProvider.php#1127

Parameters:
  • $uid (string)
  • $shareType (int)
public OC\Share20\DefaultShareProvider::groupDeleted($gid)
Delete all shares received by this group. As well as any custom group
shares for group members.
Source:

lib/private/Share20/DefaultShareProvider.php#1194

Parameters:
  • $gid (string)
public OC\Share20\DefaultShareProvider::userDeletedFromGroup($uid, $gid)
Delete custom group shares to this group for this user
Source:

lib/private/Share20/DefaultShareProvider.php#1237

Parameters:
  • $uid (string)
  • $gid (string)
public OC\Share20\DefaultShareProvider::getAccessList($nodes, $currentAccess)
Source:lib/private/Share20/DefaultShareProvider.php#1272
protected OC\Share20\DefaultShareProvider::filterSharesOfUser($shares)
For each user the path with the fewest slashes is returned
Source:

lib/private/Share20/DefaultShareProvider.php#1349

Parameters:
  • $shares (array)
Returns:

array

public OC\Share20\DefaultShareProvider::getAllShares()
Source:lib/private/Share20/DefaultShareProvider.php#1479