1
0

IServerContainer.php 18 KB

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