Manager

class OC\Collaboration\Resources\Manager
Source:lib/private/Collaboration/Resources/Manager.php#44
Implements:OCP\Collaboration\Resources\IManager

Constants

TABLE_COLLECTIONS = collres_collections
Source:lib/private/Collaboration/Resources/Manager.php#45
TABLE_RESOURCES = collres_resources
Source:lib/private/Collaboration/Resources/Manager.php#46
TABLE_ACCESS_CACHE = collres_accesscache
Source:lib/private/Collaboration/Resources/Manager.php#47

Properties

protected static property OC\Collaboration\Resources\Manager::$connection
Source:lib/private/Collaboration/Resources/Manager.php#50
Type:\OCP\IDBConnection
protected static property OC\Collaboration\Resources\Manager::$providerManager
Source:lib/private/Collaboration/Resources/Manager.php#52
Type:\OCP\Collaboration\Resources\IProviderManager
protected static property OC\Collaboration\Resources\Manager::$logger
Source:lib/private/Collaboration/Resources/Manager.php#54
Type:\Psr\Log\LoggerInterface
protected static property OC\Collaboration\Resources\Manager::$providers
Source:lib/private/Collaboration/Resources/Manager.php#57
Type:string[]

Methods

public OC\Collaboration\Resources\Manager::__construct($connection, $providerManager, $logger)
Source:lib/private/Collaboration/Resources/Manager.php#60
public OC\Collaboration\Resources\Manager::getCollection($id)
Source:

lib/private/Collaboration/Resources/Manager.php#72

Parameters:
  • $id (int)
Returns:

\OCP\Collaboration\Resources\ICollection

Throws:

\OCP\Collaboration\Resources\CollectionException when the collection could not be found

Since:

16.0.0

public OC\Collaboration\Resources\Manager::getCollectionForUser($id, $user)
Source:

lib/private/Collaboration/Resources/Manager.php#95

Parameters:
Returns:

\OCP\Collaboration\Resources\ICollection

Throws:

\OCP\Collaboration\Resources\CollectionException when the collection could not be found

Since:

16.0.0

public OC\Collaboration\Resources\Manager::searchCollections($user, $filter, $limit=50, $start=0)
Source:

lib/private/Collaboration/Resources/Manager.php#133

Parameters:
  • $user (OCP\IUser)
  • $filter (string)
  • $limit (int)
  • $start (int)
Returns:

\OCP\Collaboration\Resources\ICollection[]

Since:

16.0.0

public OC\Collaboration\Resources\Manager::newCollection($name)
Source:

lib/private/Collaboration/Resources/Manager.php#181

Parameters:
  • $name (string)
Returns:

\OCP\Collaboration\Resources\ICollection

Since:

16.0.0

public OC\Collaboration\Resources\Manager::createResource($type, $id)
Source:

lib/private/Collaboration/Resources/Manager.php#198

Parameters:
  • $type (string)
  • $id (string)
Returns:

\OCP\Collaboration\Resources\IResource

Since:

16.0.0

public OC\Collaboration\Resources\Manager::getResourceForUser($type, $id, $user)
Source:

lib/private/Collaboration/Resources/Manager.php#210

Parameters:
  • $type (string)
  • $id (string)
  • $user (OCP\IUser | null)
Returns:

\OCP\Collaboration\Resources\IResource

Throws:

\OCP\Collaboration\Resources\ResourceException

Since:

16.0.0

public OC\Collaboration\Resources\Manager::getResourcesByCollectionForUser($collection, $user)
Source:

lib/private/Collaboration/Resources/Manager.php#248

Parameters:
Returns:

\OCP\Collaboration\Resources\IResource[]

Since:

16.0.0

public OC\Collaboration\Resources\Manager::getResourceRichObject($resource)
Get the rich object data of a resource
Source:

lib/private/Collaboration/Resources/Manager.php#282

Parameters:
Returns:

array

Since:

16.0.0

public OC\Collaboration\Resources\Manager::canAccessResource($resource, $user)
Can a user/guest access the collection
Source:

lib/private/Collaboration/Resources/Manager.php#303

Parameters:
Returns:

bool

Since:

16.0.0

public OC\Collaboration\Resources\Manager::canAccessCollection($collection, $user)
Can a user/guest access the collection
Source:

lib/private/Collaboration/Resources/Manager.php#334

Parameters:
Returns:

bool

Since:

16.0.0

protected OC\Collaboration\Resources\Manager::checkAccessCacheForUserByResource($resource, $user)
Source:lib/private/Collaboration/Resources/Manager.php#355
protected OC\Collaboration\Resources\Manager::checkAccessCacheForUserByCollection($collection, $user)
Source:lib/private/Collaboration/Resources/Manager.php#376
public OC\Collaboration\Resources\Manager::cacheAccessForResource($resource, $user, $access)
Source:lib/private/Collaboration/Resources/Manager.php#396
public OC\Collaboration\Resources\Manager::cacheAccessForCollection($collection, $user, $access)
Source:lib/private/Collaboration/Resources/Manager.php#413
public OC\Collaboration\Resources\Manager::invalidateAccessCacheForUser($user)
Source:lib/private/Collaboration/Resources/Manager.php#429
public OC\Collaboration\Resources\Manager::invalidateAccessCacheForResource($resource)
Source:lib/private/Collaboration/Resources/Manager.php#438
public OC\Collaboration\Resources\Manager::invalidateAccessCacheForAllCollections()
Source:lib/private/Collaboration/Resources/Manager.php#451
public OC\Collaboration\Resources\Manager::invalidateAccessCacheForCollection($collection)
Source:lib/private/Collaboration/Resources/Manager.php#459
public OC\Collaboration\Resources\Manager::invalidateAccessCacheForProvider($provider)
Source:lib/private/Collaboration/Resources/Manager.php#467
public OC\Collaboration\Resources\Manager::invalidateAccessCacheForResourceByUser($resource, $user)
Source:lib/private/Collaboration/Resources/Manager.php#475
protected OC\Collaboration\Resources\Manager::invalidateAccessCacheForCollectionByUser($collection, $user)
Source:lib/private/Collaboration/Resources/Manager.php#489
public OC\Collaboration\Resources\Manager::invalidateAccessCacheForProviderByUser($provider, $user)
Source:lib/private/Collaboration/Resources/Manager.php#499
public OC\Collaboration\Resources\Manager::registerResourceProvider($provider)
Source:

lib/private/Collaboration/Resources/Manager.php#512

Parameters:
  • $provider (string)
public OC\Collaboration\Resources\Manager::getType()
Get the resource type of the provider
Source:lib/private/Collaboration/Resources/Manager.php#523
Returns:string
Since:16.0.0