IServerContainer.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  6. * SPDX-License-Identifier: AGPL-3.0-only
  7. */
  8. namespace OCP;
  9. use OCP\Federation\ICloudFederationFactory;
  10. use OCP\Federation\ICloudFederationProviderManager;
  11. use OCP\Log\ILogFactory;
  12. use OCP\Security\IContentSecurityPolicyManager;
  13. use Psr\Container\ContainerInterface;
  14. /**
  15. * This is a tagging interface for the server container
  16. *
  17. * The interface currently extends IContainer, but this interface is deprecated as of Nextcloud 20,
  18. * thus this interface won't extend it anymore once that was removed. So migrate to the ContainerInterface
  19. * only.
  20. *
  21. * @deprecated 20.0.0
  22. *
  23. * @since 6.0.0
  24. */
  25. interface IServerContainer extends ContainerInterface, IContainer {
  26. /**
  27. * The calendar manager will act as a broker between consumers for calendar information and
  28. * providers which actual deliver the calendar information.
  29. *
  30. * @return \OCP\Calendar\IManager
  31. * @since 13.0.0
  32. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  33. */
  34. public function getCalendarManager();
  35. /**
  36. * The calendar resource backend manager will act as a broker between consumers
  37. * for calendar resource information an providers which actual deliver the room information.
  38. *
  39. * @return \OCP\Calendar\Resource\IBackend
  40. * @since 14.0.0
  41. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  42. */
  43. public function getCalendarResourceBackendManager();
  44. /**
  45. * The calendar room backend manager will act as a broker between consumers
  46. * for calendar room information an providers which actual deliver the room information.
  47. *
  48. * @return \OCP\Calendar\Room\IBackend
  49. * @since 14.0.0
  50. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  51. */
  52. public function getCalendarRoomBackendManager();
  53. /**
  54. * The contacts manager will act as a broker between consumers for contacts information and
  55. * providers which actual deliver the contact information.
  56. *
  57. * @return \OCP\Contacts\IManager
  58. * @since 6.0.0
  59. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  60. */
  61. public function getContactsManager();
  62. /**
  63. * The current request object holding all information about the request currently being processed
  64. * is returned from this method.
  65. * In case the current execution was not initiated by a web request null is returned
  66. *
  67. * @return \OCP\IRequest
  68. * @since 6.0.0
  69. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  70. */
  71. public function getRequest();
  72. /**
  73. * Returns the preview manager which can create preview images for a given file
  74. *
  75. * @return \OCP\IPreview
  76. * @since 6.0.0
  77. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  78. */
  79. public function getPreviewManager();
  80. /**
  81. * Returns the tag manager which can get and set tags for different object types
  82. *
  83. * @see \OCP\ITagManager::load()
  84. * @return \OCP\ITagManager
  85. * @since 6.0.0
  86. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  87. */
  88. public function getTagManager();
  89. /**
  90. * Returns the root folder of ownCloud's data directory
  91. *
  92. * @return \OCP\Files\IRootFolder
  93. * @since 6.0.0 - between 6.0.0 and 8.0.0 this returned \OCP\Files\Folder
  94. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  95. */
  96. public function getRootFolder();
  97. /**
  98. * Returns a view to ownCloud's files folder
  99. *
  100. * @param string $userId user ID
  101. * @return \OCP\Files\Folder
  102. * @since 6.0.0 - parameter $userId was added in 8.0.0
  103. * @see getUserFolder in \OCP\Files\IRootFolder
  104. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  105. */
  106. public function getUserFolder($userId = null);
  107. /**
  108. * Returns a user manager
  109. *
  110. * @return \OCP\IUserManager
  111. * @since 8.0.0
  112. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  113. */
  114. public function getUserManager();
  115. /**
  116. * Returns a group manager
  117. *
  118. * @return \OCP\IGroupManager
  119. * @since 8.0.0
  120. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  121. */
  122. public function getGroupManager();
  123. /**
  124. * Returns the user session
  125. *
  126. * @return \OCP\IUserSession
  127. * @since 6.0.0
  128. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  129. */
  130. public function getUserSession();
  131. /**
  132. * Returns the navigation manager
  133. *
  134. * @return \OCP\INavigationManager
  135. * @since 6.0.0
  136. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  137. */
  138. public function getNavigationManager();
  139. /**
  140. * Returns the config manager
  141. *
  142. * @return \OCP\IConfig
  143. * @since 6.0.0
  144. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  145. */
  146. public function getConfig();
  147. /**
  148. * Returns a Crypto instance
  149. *
  150. * @return \OCP\Security\ICrypto
  151. * @since 8.0.0
  152. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  153. */
  154. public function getCrypto();
  155. /**
  156. * Returns a Hasher instance
  157. *
  158. * @return \OCP\Security\IHasher
  159. * @since 8.0.0
  160. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  161. */
  162. public function getHasher();
  163. /**
  164. * Returns a SecureRandom instance
  165. *
  166. * @return \OCP\Security\ISecureRandom
  167. * @since 8.1.0
  168. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  169. */
  170. public function getSecureRandom();
  171. /**
  172. * Returns a CredentialsManager instance
  173. *
  174. * @return \OCP\Security\ICredentialsManager
  175. * @since 9.0.0
  176. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  177. */
  178. public function getCredentialsManager();
  179. /**
  180. * Returns the app config manager
  181. *
  182. * @return \OCP\IAppConfig
  183. * @since 7.0.0
  184. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  185. */
  186. public function getAppConfig();
  187. /**
  188. * @return \OCP\L10N\IFactory
  189. * @since 8.2.0
  190. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  191. */
  192. public function getL10NFactory();
  193. /**
  194. * get an L10N instance
  195. * @param string $app appid
  196. * @param string $lang
  197. * @return \OCP\IL10N
  198. * @since 6.0.0 - parameter $lang was added in 8.0.0
  199. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  200. */
  201. public function getL10N($app, $lang = null);
  202. /**
  203. * @return \OC\Encryption\Manager
  204. * @since 8.1.0
  205. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  206. */
  207. public function getEncryptionManager();
  208. /**
  209. * @return \OC\Encryption\File
  210. * @since 8.1.0
  211. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  212. */
  213. public function getEncryptionFilesHelper();
  214. /**
  215. * @return \OCP\Encryption\Keys\IStorage
  216. * @since 8.1.0
  217. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  218. */
  219. public function getEncryptionKeyStorage();
  220. /**
  221. * Returns the URL generator
  222. *
  223. * @return \OCP\IURLGenerator
  224. * @since 6.0.0
  225. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  226. */
  227. public function getURLGenerator();
  228. /**
  229. * Returns an ICache instance
  230. *
  231. * @return \OCP\ICache
  232. * @since 6.0.0
  233. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  234. */
  235. public function getCache();
  236. /**
  237. * Returns an \OCP\CacheFactory instance
  238. *
  239. * @return \OCP\ICacheFactory
  240. * @since 7.0.0
  241. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  242. */
  243. public function getMemCacheFactory();
  244. /**
  245. * Returns the current session
  246. *
  247. * @return \OCP\ISession
  248. * @since 6.0.0
  249. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  250. */
  251. public function getSession();
  252. /**
  253. * Returns the activity manager
  254. *
  255. * @return \OCP\Activity\IManager
  256. * @since 6.0.0
  257. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  258. */
  259. public function getActivityManager();
  260. /**
  261. * Returns the current session
  262. *
  263. * @return \OCP\IDBConnection
  264. * @since 6.0.0
  265. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  266. */
  267. public function getDatabaseConnection();
  268. /**
  269. * Returns an avatar manager, used for avatar functionality
  270. *
  271. * @return \OCP\IAvatarManager
  272. * @since 6.0.0
  273. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  274. */
  275. public function getAvatarManager();
  276. /**
  277. * Returns an job list for controlling background jobs
  278. *
  279. * @return \OCP\BackgroundJob\IJobList
  280. * @since 7.0.0
  281. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  282. */
  283. public function getJobList();
  284. /**
  285. * Returns a logger instance
  286. *
  287. * @return \OCP\ILogger
  288. * @since 8.0.0
  289. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  290. */
  291. public function getLogger();
  292. /**
  293. * returns a log factory instance
  294. *
  295. * @return ILogFactory
  296. * @since 14.0.0
  297. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  298. */
  299. public function getLogFactory();
  300. /**
  301. * Returns a router for generating and matching urls
  302. *
  303. * @return \OCP\Route\IRouter
  304. * @since 7.0.0
  305. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  306. */
  307. public function getRouter();
  308. /**
  309. * Returns a search instance
  310. *
  311. * @return \OCP\ISearch
  312. * @since 7.0.0
  313. * @deprecated 20.0.0
  314. */
  315. public function getSearch();
  316. /**
  317. * Get the certificate manager
  318. *
  319. * @return \OCP\ICertificateManager
  320. * @since 8.0.0
  321. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  322. */
  323. public function getCertificateManager();
  324. /**
  325. * Returns an instance of the HTTP client service
  326. *
  327. * @return \OCP\Http\Client\IClientService
  328. * @since 8.1.0
  329. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  330. */
  331. public function getHTTPClientService();
  332. /**
  333. * Get the active event logger
  334. *
  335. * @return \OCP\Diagnostics\IEventLogger
  336. * @since 8.0.0
  337. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  338. */
  339. public function getEventLogger();
  340. /**
  341. * Get the active query logger
  342. *
  343. * The returned logger only logs data when debug mode is enabled
  344. *
  345. * @return \OCP\Diagnostics\IQueryLogger
  346. * @since 8.0.0
  347. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  348. */
  349. public function getQueryLogger();
  350. /**
  351. * Get the manager for temporary files and folders
  352. *
  353. * @return \OCP\ITempManager
  354. * @since 8.0.0
  355. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  356. */
  357. public function getTempManager();
  358. /**
  359. * Get the app manager
  360. *
  361. * @return \OCP\App\IAppManager
  362. * @since 8.0.0
  363. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  364. */
  365. public function getAppManager();
  366. /**
  367. * Get the webroot
  368. *
  369. * @return string
  370. * @since 8.0.0
  371. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  372. */
  373. public function getWebRoot();
  374. /**
  375. * @return \OCP\Files\Config\IMountProviderCollection
  376. * @since 8.0.0
  377. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  378. */
  379. public function getMountProviderCollection();
  380. /**
  381. * Get the IniWrapper
  382. *
  383. * @return \bantu\IniGetWrapper\IniGetWrapper
  384. * @since 8.0.0
  385. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  386. */
  387. public function getIniWrapper();
  388. /**
  389. * @return \OCP\Command\IBus
  390. * @since 8.1.0
  391. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  392. */
  393. public function getCommandBus();
  394. /**
  395. * Creates a new mailer
  396. *
  397. * @return \OCP\Mail\IMailer
  398. * @since 8.1.0
  399. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  400. */
  401. public function getMailer();
  402. /**
  403. * Get the locking provider
  404. *
  405. * @return \OCP\Lock\ILockingProvider
  406. * @since 8.1.0
  407. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  408. */
  409. public function getLockingProvider();
  410. /**
  411. * @return \OCP\Files\Mount\IMountManager
  412. * @since 8.2.0
  413. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  414. */
  415. public function getMountManager();
  416. /**
  417. * Get the MimeTypeDetector
  418. *
  419. * @return \OCP\Files\IMimeTypeDetector
  420. * @since 8.2.0
  421. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  422. */
  423. public function getMimeTypeDetector();
  424. /**
  425. * Get the MimeTypeLoader
  426. *
  427. * @return \OCP\Files\IMimeTypeLoader
  428. * @since 8.2.0
  429. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  430. */
  431. public function getMimeTypeLoader();
  432. /**
  433. * Get the Notification Manager
  434. *
  435. * @return \OCP\Notification\IManager
  436. * @since 9.0.0
  437. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  438. */
  439. public function getNotificationManager();
  440. /**
  441. * @return \OCP\Comments\ICommentsManager
  442. * @since 9.0.0
  443. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  444. */
  445. public function getCommentsManager();
  446. /**
  447. * Returns the system-tag manager
  448. *
  449. * @return \OCP\SystemTag\ISystemTagManager
  450. *
  451. * @since 9.0.0
  452. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  453. */
  454. public function getSystemTagManager();
  455. /**
  456. * Returns the system-tag object mapper
  457. *
  458. * @return \OCP\SystemTag\ISystemTagObjectMapper
  459. *
  460. * @since 9.0.0
  461. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  462. */
  463. public function getSystemTagObjectMapper();
  464. /**
  465. * Returns the share manager
  466. *
  467. * @return \OCP\Share\IManager
  468. * @since 9.0.0
  469. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  470. */
  471. public function getShareManager();
  472. /**
  473. * @return IContentSecurityPolicyManager
  474. * @since 9.0.0
  475. * @deprecated 17.0.0 Use the AddContentSecurityPolicyEvent
  476. */
  477. public function getContentSecurityPolicyManager();
  478. /**
  479. * @return \OCP\IDateTimeZone
  480. * @since 8.0.0
  481. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  482. */
  483. public function getDateTimeZone();
  484. /**
  485. * @return \OCP\IDateTimeFormatter
  486. * @since 8.0.0
  487. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  488. */
  489. public function getDateTimeFormatter();
  490. /**
  491. * @return \OCP\Federation\ICloudIdManager
  492. * @since 12.0.0
  493. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  494. */
  495. public function getCloudIdManager();
  496. /**
  497. * @return \OCP\GlobalScale\IConfig
  498. * @since 14.0.0
  499. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  500. */
  501. public function getGlobalScaleConfig();
  502. /**
  503. * @return ICloudFederationFactory
  504. * @since 14.0.0
  505. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  506. */
  507. public function getCloudFederationFactory();
  508. /**
  509. * @return ICloudFederationProviderManager
  510. * @since 14.0.0
  511. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  512. */
  513. public function getCloudFederationProviderManager();
  514. /**
  515. * @return \OCP\Remote\Api\IApiFactory
  516. * @since 13.0.0
  517. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  518. */
  519. public function getRemoteApiFactory();
  520. /**
  521. * @return \OCP\Remote\IInstanceFactory
  522. * @since 13.0.0
  523. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  524. */
  525. public function getRemoteInstanceFactory();
  526. /**
  527. * @return \OCP\Files\Storage\IStorageFactory
  528. * @since 15.0.0
  529. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  530. */
  531. public function getStorageFactory();
  532. }