IServerContainer.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  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 log factory instance
  286. *
  287. * @return ILogFactory
  288. * @since 14.0.0
  289. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  290. */
  291. public function getLogFactory();
  292. /**
  293. * Returns a router for generating and matching urls
  294. *
  295. * @return \OCP\Route\IRouter
  296. * @since 7.0.0
  297. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  298. */
  299. public function getRouter();
  300. /**
  301. * Get the certificate manager
  302. *
  303. * @return \OCP\ICertificateManager
  304. * @since 8.0.0
  305. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  306. */
  307. public function getCertificateManager();
  308. /**
  309. * Returns an instance of the HTTP client service
  310. *
  311. * @return \OCP\Http\Client\IClientService
  312. * @since 8.1.0
  313. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  314. */
  315. public function getHTTPClientService();
  316. /**
  317. * Get the active event logger
  318. *
  319. * @return \OCP\Diagnostics\IEventLogger
  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 getEventLogger();
  324. /**
  325. * Get the active query logger
  326. *
  327. * The returned logger only logs data when debug mode is enabled
  328. *
  329. * @return \OCP\Diagnostics\IQueryLogger
  330. * @since 8.0.0
  331. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  332. */
  333. public function getQueryLogger();
  334. /**
  335. * Get the manager for temporary files and folders
  336. *
  337. * @return \OCP\ITempManager
  338. * @since 8.0.0
  339. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  340. */
  341. public function getTempManager();
  342. /**
  343. * Get the app manager
  344. *
  345. * @return \OCP\App\IAppManager
  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 getAppManager();
  350. /**
  351. * Get the webroot
  352. *
  353. * @return string
  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 getWebRoot();
  358. /**
  359. * @return \OCP\Files\Config\IMountProviderCollection
  360. * @since 8.0.0
  361. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  362. */
  363. public function getMountProviderCollection();
  364. /**
  365. * Get the IniWrapper
  366. *
  367. * @return \bantu\IniGetWrapper\IniGetWrapper
  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 getIniWrapper();
  372. /**
  373. * @return \OCP\Command\IBus
  374. * @since 8.1.0
  375. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  376. */
  377. public function getCommandBus();
  378. /**
  379. * Creates a new mailer
  380. *
  381. * @return \OCP\Mail\IMailer
  382. * @since 8.1.0
  383. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  384. */
  385. public function getMailer();
  386. /**
  387. * Get the locking provider
  388. *
  389. * @return \OCP\Lock\ILockingProvider
  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 getLockingProvider();
  394. /**
  395. * @return \OCP\Files\Mount\IMountManager
  396. * @since 8.2.0
  397. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  398. */
  399. public function getMountManager();
  400. /**
  401. * Get the MimeTypeDetector
  402. *
  403. * @return \OCP\Files\IMimeTypeDetector
  404. * @since 8.2.0
  405. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  406. */
  407. public function getMimeTypeDetector();
  408. /**
  409. * Get the MimeTypeLoader
  410. *
  411. * @return \OCP\Files\IMimeTypeLoader
  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 getMimeTypeLoader();
  416. /**
  417. * Get the Notification Manager
  418. *
  419. * @return \OCP\Notification\IManager
  420. * @since 9.0.0
  421. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  422. */
  423. public function getNotificationManager();
  424. /**
  425. * @return \OCP\Comments\ICommentsManager
  426. * @since 9.0.0
  427. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  428. */
  429. public function getCommentsManager();
  430. /**
  431. * Returns the system-tag manager
  432. *
  433. * @return \OCP\SystemTag\ISystemTagManager
  434. *
  435. * @since 9.0.0
  436. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  437. */
  438. public function getSystemTagManager();
  439. /**
  440. * Returns the system-tag object mapper
  441. *
  442. * @return \OCP\SystemTag\ISystemTagObjectMapper
  443. *
  444. * @since 9.0.0
  445. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  446. */
  447. public function getSystemTagObjectMapper();
  448. /**
  449. * Returns the share manager
  450. *
  451. * @return \OCP\Share\IManager
  452. * @since 9.0.0
  453. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  454. */
  455. public function getShareManager();
  456. /**
  457. * @return IContentSecurityPolicyManager
  458. * @since 9.0.0
  459. * @deprecated 17.0.0 Use the AddContentSecurityPolicyEvent
  460. */
  461. public function getContentSecurityPolicyManager();
  462. /**
  463. * @return \OCP\IDateTimeZone
  464. * @since 8.0.0
  465. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  466. */
  467. public function getDateTimeZone();
  468. /**
  469. * @return \OCP\IDateTimeFormatter
  470. * @since 8.0.0
  471. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  472. */
  473. public function getDateTimeFormatter();
  474. /**
  475. * @return \OCP\Federation\ICloudIdManager
  476. * @since 12.0.0
  477. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  478. */
  479. public function getCloudIdManager();
  480. /**
  481. * @return \OCP\GlobalScale\IConfig
  482. * @since 14.0.0
  483. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  484. */
  485. public function getGlobalScaleConfig();
  486. /**
  487. * @return ICloudFederationFactory
  488. * @since 14.0.0
  489. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  490. */
  491. public function getCloudFederationFactory();
  492. /**
  493. * @return ICloudFederationProviderManager
  494. * @since 14.0.0
  495. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  496. */
  497. public function getCloudFederationProviderManager();
  498. /**
  499. * @return \OCP\Remote\Api\IApiFactory
  500. * @since 13.0.0
  501. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  502. */
  503. public function getRemoteApiFactory();
  504. /**
  505. * @return \OCP\Remote\IInstanceFactory
  506. * @since 13.0.0
  507. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  508. */
  509. public function getRemoteInstanceFactory();
  510. /**
  511. * @return \OCP\Files\Storage\IStorageFactory
  512. * @since 15.0.0
  513. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  514. */
  515. public function getStorageFactory();
  516. }