diff options
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r-- | lib/private/Server.php | 463 |
1 files changed, 1 insertions, 462 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php index 545ceacbe81..ea8c1ce3797 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -124,10 +124,6 @@ use OC\User\DisplayNameCache; use OC\User\Listeners\BeforeUserDeletedListener; use OC\User\Listeners\UserChangedListener; use OC\User\Session; -use OCA\Files_External\Service\BackendService; -use OCA\Files_External\Service\GlobalStoragesService; -use OCA\Files_External\Service\UserGlobalStoragesService; -use OCA\Files_External\Service\UserStoragesService; use OCA\Theming\ImageManager; use OCA\Theming\Service\BackgroundService; use OCA\Theming\ThemingDefaults; @@ -138,7 +134,6 @@ use OCP\AppFramework\Utility\ITimeFactory; use OCP\Authentication\LoginCredentials\IStore; use OCP\Authentication\Token\IProvider as OCPIProvider; use OCP\BackgroundJob\IJobList; -use OCP\Collaboration\AutoComplete\IManager; use OCP\Collaboration\Reference\IReferenceManager; use OCP\Command\IBus; use OCP\Comments\ICommentsManager; @@ -189,7 +184,6 @@ use OCP\IRequest; use OCP\IRequestId; use OCP\IServerContainer; use OCP\ISession; -use OCP\ITagManager; use OCP\ITempManager; use OCP\IURLGenerator; use OCP\IUserManager; @@ -212,7 +206,6 @@ use OCP\RichObjectStrings\IRichTextFormatter; use OCP\RichObjectStrings\IValidator; use OCP\Route\IRouter; use OCP\Security\Bruteforce\IThrottler; -use OCP\Security\IContentSecurityPolicyManager; use OCP\Security\ICredentialsManager; use OCP\Security\ICrypto; use OCP\Security\IHasher; @@ -1125,7 +1118,7 @@ class Server extends ServerContainer implements IServerContainer { $config = $c->get(\OCP\IConfig::class); $factoryClass = $config->getSystemValue('sharing.managerFactory', ProviderFactory::class); /** @var \OCP\Share\IProviderFactory $factory */ - return new $factoryClass($this); + return $c->get($factoryClass); }); $this->registerAlias(\OCP\Share\IManager::class, \OC\Share20\Manager::class); @@ -1305,30 +1298,6 @@ class Server extends ServerContainer implements IServerContainer { $hookConnector->viewToNode(); } - /** - * @return \OCP\Calendar\IManager - * @deprecated 20.0.0 - */ - public function getCalendarManager() { - return $this->get(\OC\Calendar\Manager::class); - } - - /** - * @return \OCP\Calendar\Resource\IManager - * @deprecated 20.0.0 - */ - public function getCalendarResourceBackendManager() { - return $this->get(\OC\Calendar\Resource\Manager::class); - } - - /** - * @return \OCP\Calendar\Room\IManager - * @deprecated 20.0.0 - */ - public function getCalendarRoomBackendManager() { - return $this->get(\OC\Calendar\Room\Manager::class); - } - private function connectDispatcher(): void { /** @var IEventDispatcher $eventDispatcher */ $eventDispatcher = $this->get(IEventDispatcher::class); @@ -1366,14 +1335,6 @@ class Server extends ServerContainer implements IServerContainer { } /** - * @return \OCP\Encryption\Keys\IStorage - * @deprecated 20.0.0 - */ - public function getEncryptionKeyStorage() { - return $this->get(IStorage::class); - } - - /** * The current request object holding all information about the request * currently being processed is returned from this method. * In case the current execution was not initiated by a web request null is returned @@ -1386,61 +1347,6 @@ class Server extends ServerContainer implements IServerContainer { } /** - * Returns the preview manager which can create preview images for a given file - * - * @return IPreview - * @deprecated 20.0.0 - */ - public function getPreviewManager() { - return $this->get(IPreview::class); - } - - /** - * Returns the tag manager which can get and set tags for different object types - * - * @see \OCP\ITagManager::load() - * @return ITagManager - * @deprecated 20.0.0 - */ - public function getTagManager() { - return $this->get(ITagManager::class); - } - - /** - * Returns the system-tag manager - * - * @return ISystemTagManager - * - * @since 9.0.0 - * @deprecated 20.0.0 - */ - public function getSystemTagManager() { - return $this->get(ISystemTagManager::class); - } - - /** - * Returns the system-tag object mapper - * - * @return ISystemTagObjectMapper - * - * @since 9.0.0 - * @deprecated 20.0.0 - */ - public function getSystemTagObjectMapper() { - return $this->get(ISystemTagObjectMapper::class); - } - - /** - * Returns the avatar manager, used for avatar functionality - * - * @return IAvatarManager - * @deprecated 20.0.0 - */ - public function getAvatarManager() { - return $this->get(IAvatarManager::class); - } - - /** * Returns the root folder of ownCloud's data directory * * @return IRootFolder @@ -1524,22 +1430,6 @@ class Server extends ServerContainer implements IServerContainer { } /** - * @return \OC\Authentication\TwoFactorAuth\Manager - * @deprecated 20.0.0 - */ - public function getTwoFactorAuthManager() { - return $this->get(\OC\Authentication\TwoFactorAuth\Manager::class); - } - - /** - * @return \OC\NavigationManager - * @deprecated 20.0.0 - */ - public function getNavigationManager() { - return $this->get(INavigationManager::class); - } - - /** * @return \OCP\IConfig * @deprecated 20.0.0 */ @@ -1556,16 +1446,6 @@ class Server extends ServerContainer implements IServerContainer { } /** - * Returns the app config manager - * - * @return IAppConfig - * @deprecated 20.0.0 - */ - public function getAppConfig() { - return $this->get(IAppConfig::class); - } - - /** * @return IFactory * @deprecated 20.0.0 */ @@ -1594,14 +1474,6 @@ class Server extends ServerContainer implements IServerContainer { } /** - * @return AppFetcher - * @deprecated 20.0.0 - */ - public function getAppFetcher() { - return $this->get(AppFetcher::class); - } - - /** * Returns an ICache instance. Since 8.1.0 it returns a fake cache. Use * getMemCacheFactory() instead. * @@ -1623,17 +1495,6 @@ class Server extends ServerContainer implements IServerContainer { } /** - * Returns an \OC\RedisFactory instance - * - * @return \OC\RedisFactory - * @deprecated 20.0.0 - */ - public function getGetRedisFactory() { - return $this->get('RedisFactory'); - } - - - /** * Returns the current session * * @return \OCP\IDBConnection @@ -1664,25 +1525,6 @@ class Server extends ServerContainer implements IServerContainer { } /** - * @return ILogFactory - * @throws \OCP\AppFramework\QueryException - * @deprecated 20.0.0 - */ - public function getLogFactory() { - return $this->get(ILogFactory::class); - } - - /** - * Returns a router for generating and matching urls - * - * @return IRouter - * @deprecated 20.0.0 - */ - public function getRouter() { - return $this->get(IRouter::class); - } - - /** * Returns a SecureRandom instance * * @return \OCP\Security\ISecureRandom @@ -1713,16 +1555,6 @@ class Server extends ServerContainer implements IServerContainer { } /** - * Returns a CredentialsManager instance - * - * @return ICredentialsManager - * @deprecated 20.0.0 - */ - public function getCredentialsManager() { - return $this->get(ICredentialsManager::class); - } - - /** * Get the certificate manager * * @return \OCP\ICertificateManager @@ -1732,40 +1564,6 @@ class Server extends ServerContainer implements IServerContainer { } /** - * Returns an instance of the HTTP client service - * - * @return IClientService - * @deprecated 20.0.0 - */ - public function getHTTPClientService() { - return $this->get(IClientService::class); - } - - /** - * Get the active event logger - * - * The returned logger only logs data when debug mode is enabled - * - * @return IEventLogger - * @deprecated 20.0.0 - */ - public function getEventLogger() { - return $this->get(IEventLogger::class); - } - - /** - * Get the active query logger - * - * The returned logger only logs data when debug mode is enabled - * - * @return IQueryLogger - * @deprecated 20.0.0 - */ - public function getQueryLogger() { - return $this->get(IQueryLogger::class); - } - - /** * Get the manager for temporary files and folders * * @return \OCP\ITempManager @@ -1806,66 +1604,6 @@ class Server extends ServerContainer implements IServerContainer { } /** - * @return \OC\OCSClient - * @deprecated 20.0.0 - */ - public function getOcsClient() { - return $this->get('OcsClient'); - } - - /** - * @return IDateTimeZone - * @deprecated 20.0.0 - */ - public function getDateTimeZone() { - return $this->get(IDateTimeZone::class); - } - - /** - * @return IDateTimeFormatter - * @deprecated 20.0.0 - */ - public function getDateTimeFormatter() { - return $this->get(IDateTimeFormatter::class); - } - - /** - * @return IMountProviderCollection - * @deprecated 20.0.0 - */ - public function getMountProviderCollection() { - return $this->get(IMountProviderCollection::class); - } - - /** - * Get the IniWrapper - * - * @return IniGetWrapper - * @deprecated 20.0.0 - */ - public function getIniWrapper() { - return $this->get(IniGetWrapper::class); - } - - /** - * @return \OCP\Command\IBus - * @deprecated 20.0.0 - */ - public function getCommandBus() { - return $this->get(IBus::class); - } - - /** - * Get the trusted domain helper - * - * @return TrustedDomainHelper - * @deprecated 20.0.0 - */ - public function getTrustedDomainHelper() { - return $this->get(TrustedDomainHelper::class); - } - - /** * Get the locking provider * * @return ILockingProvider @@ -1877,22 +1615,6 @@ class Server extends ServerContainer implements IServerContainer { } /** - * @return IMountManager - * @deprecated 20.0.0 - **/ - public function getMountManager() { - return $this->get(IMountManager::class); - } - - /** - * @return IUserMountCache - * @deprecated 20.0.0 - */ - public function getUserMountCache() { - return $this->get(IUserMountCache::class); - } - - /** * Get the MimeTypeDetector * * @return IMimeTypeDetector @@ -1913,16 +1635,6 @@ class Server extends ServerContainer implements IServerContainer { } /** - * Get the manager of all the capabilities - * - * @return CapabilitiesManager - * @deprecated 20.0.0 - */ - public function getCapabilitiesManager() { - return $this->get(CapabilitiesManager::class); - } - - /** * Get the Notification Manager * * @return \OCP\Notification\IManager @@ -1934,14 +1646,6 @@ class Server extends ServerContainer implements IServerContainer { } /** - * @return ICommentsManager - * @deprecated 20.0.0 - */ - public function getCommentsManager() { - return $this->get(ICommentsManager::class); - } - - /** * @return \OCA\Theming\ThemingDefaults * @deprecated 20.0.0 */ @@ -1958,14 +1662,6 @@ class Server extends ServerContainer implements IServerContainer { } /** - * @return \OC\Session\CryptoWrapper - * @deprecated 20.0.0 - */ - public function getSessionCryptoWrapper() { - return $this->get('CryptoWrapper'); - } - - /** * @return CsrfTokenManager * @deprecated 20.0.0 */ @@ -1974,22 +1670,6 @@ class Server extends ServerContainer implements IServerContainer { } /** - * @return IThrottler - * @deprecated 20.0.0 - */ - public function getBruteForceThrottler() { - return $this->get(Throttler::class); - } - - /** - * @return IContentSecurityPolicyManager - * @deprecated 20.0.0 - */ - public function getContentSecurityPolicyManager() { - return $this->get(ContentSecurityPolicyManager::class); - } - - /** * @return ContentSecurityPolicyNonceManager * @deprecated 20.0.0 */ @@ -1998,80 +1678,6 @@ class Server extends ServerContainer implements IServerContainer { } /** - * Not a public API as of 8.2, wait for 9.0 - * - * @return \OCA\Files_External\Service\BackendService - * @deprecated 20.0.0 - */ - public function getStoragesBackendService() { - return $this->get(BackendService::class); - } - - /** - * Not a public API as of 8.2, wait for 9.0 - * - * @return \OCA\Files_External\Service\GlobalStoragesService - * @deprecated 20.0.0 - */ - public function getGlobalStoragesService() { - return $this->get(GlobalStoragesService::class); - } - - /** - * Not a public API as of 8.2, wait for 9.0 - * - * @return \OCA\Files_External\Service\UserGlobalStoragesService - * @deprecated 20.0.0 - */ - public function getUserGlobalStoragesService() { - return $this->get(UserGlobalStoragesService::class); - } - - /** - * Not a public API as of 8.2, wait for 9.0 - * - * @return \OCA\Files_External\Service\UserStoragesService - * @deprecated 20.0.0 - */ - public function getUserStoragesService() { - return $this->get(UserStoragesService::class); - } - - /** - * @return \OCP\Share\IManager - * @deprecated 20.0.0 - */ - public function getShareManager() { - return $this->get(\OCP\Share\IManager::class); - } - - /** - * @return \OCP\Collaboration\Collaborators\ISearch - * @deprecated 20.0.0 - */ - public function getCollaboratorSearch() { - return $this->get(\OCP\Collaboration\Collaborators\ISearch::class); - } - - /** - * @return \OCP\Collaboration\AutoComplete\IManager - * @deprecated 20.0.0 - */ - public function getAutoCompleteManager() { - return $this->get(IManager::class); - } - - /** - * Returns the LDAP Provider - * - * @return \OCP\LDAP\ILDAPProvider - * @deprecated 20.0.0 - */ - public function getLDAPProvider() { - return $this->get('LDAPProvider'); - } - - /** * @return \OCP\Settings\IManager * @deprecated 20.0.0 */ @@ -2090,14 +1696,6 @@ class Server extends ServerContainer implements IServerContainer { } /** - * @return \OCP\Lockdown\ILockdownManager - * @deprecated 20.0.0 - */ - public function getLockdownManager() { - return $this->get('LockdownManager'); - } - - /** * @return \OCP\Federation\ICloudIdManager * @deprecated 20.0.0 */ @@ -2105,65 +1703,6 @@ class Server extends ServerContainer implements IServerContainer { return $this->get(ICloudIdManager::class); } - /** - * @return \OCP\GlobalScale\IConfig - * @deprecated 20.0.0 - */ - public function getGlobalScaleConfig() { - return $this->get(IConfig::class); - } - - /** - * @return \OCP\Federation\ICloudFederationProviderManager - * @deprecated 20.0.0 - */ - public function getCloudFederationProviderManager() { - return $this->get(ICloudFederationProviderManager::class); - } - - /** - * @return \OCP\Remote\Api\IApiFactory - * @deprecated 20.0.0 - */ - public function getRemoteApiFactory() { - return $this->get(IApiFactory::class); - } - - /** - * @return \OCP\Federation\ICloudFederationFactory - * @deprecated 20.0.0 - */ - public function getCloudFederationFactory() { - return $this->get(ICloudFederationFactory::class); - } - - /** - * @return \OCP\Remote\IInstanceFactory - * @deprecated 20.0.0 - */ - public function getRemoteInstanceFactory() { - return $this->get(IInstanceFactory::class); - } - - /** - * @return IStorageFactory - * @deprecated 20.0.0 - */ - public function getStorageFactory() { - return $this->get(IStorageFactory::class); - } - - /** - * Get the Preview GeneratorHelper - * - * @return GeneratorHelper - * @since 17.0.0 - * @deprecated 20.0.0 - */ - public function getGeneratorHelper() { - return $this->get(\OC\Preview\GeneratorHelper::class); - } - private function registerDeprecatedAlias(string $alias, string $target) { $this->registerService($alias, function (ContainerInterface $container) use ($target, $alias) { try { |