IServerContainer.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590
  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. * Get the certificate manager
  310. *
  311. * @return \OCP\ICertificateManager
  312. * @since 8.0.0
  313. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  314. */
  315. public function getCertificateManager();
  316. /**
  317. * Returns an instance of the HTTP client service
  318. *
  319. * @return \OCP\Http\Client\IClientService
  320. * @since 8.1.0
  321. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  322. */
  323. public function getHTTPClientService();
  324. /**
  325. * Get the active event logger
  326. *
  327. * @return \OCP\Diagnostics\IEventLogger
  328. * @since 8.0.0
  329. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  330. */
  331. public function getEventLogger();
  332. /**
  333. * Get the active query logger
  334. *
  335. * The returned logger only logs data when debug mode is enabled
  336. *
  337. * @return \OCP\Diagnostics\IQueryLogger
  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 getQueryLogger();
  342. /**
  343. * Get the manager for temporary files and folders
  344. *
  345. * @return \OCP\ITempManager
  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 getTempManager();
  350. /**
  351. * Get the app manager
  352. *
  353. * @return \OCP\App\IAppManager
  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 getAppManager();
  358. /**
  359. * Get the webroot
  360. *
  361. * @return string
  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 getWebRoot();
  366. /**
  367. * @return \OCP\Files\Config\IMountProviderCollection
  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 getMountProviderCollection();
  372. /**
  373. * Get the IniWrapper
  374. *
  375. * @return \bantu\IniGetWrapper\IniGetWrapper
  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 getIniWrapper();
  380. /**
  381. * @return \OCP\Command\IBus
  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 getCommandBus();
  386. /**
  387. * Creates a new mailer
  388. *
  389. * @return \OCP\Mail\IMailer
  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 getMailer();
  394. /**
  395. * Get the locking provider
  396. *
  397. * @return \OCP\Lock\ILockingProvider
  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 getLockingProvider();
  402. /**
  403. * @return \OCP\Files\Mount\IMountManager
  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 getMountManager();
  408. /**
  409. * Get the MimeTypeDetector
  410. *
  411. * @return \OCP\Files\IMimeTypeDetector
  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 getMimeTypeDetector();
  416. /**
  417. * Get the MimeTypeLoader
  418. *
  419. * @return \OCP\Files\IMimeTypeLoader
  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 getMimeTypeLoader();
  424. /**
  425. * Get the Notification Manager
  426. *
  427. * @return \OCP\Notification\IManager
  428. * @since 9.0.0
  429. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  430. */
  431. public function getNotificationManager();
  432. /**
  433. * @return \OCP\Comments\ICommentsManager
  434. * @since 9.0.0
  435. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  436. */
  437. public function getCommentsManager();
  438. /**
  439. * Returns the system-tag manager
  440. *
  441. * @return \OCP\SystemTag\ISystemTagManager
  442. *
  443. * @since 9.0.0
  444. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  445. */
  446. public function getSystemTagManager();
  447. /**
  448. * Returns the system-tag object mapper
  449. *
  450. * @return \OCP\SystemTag\ISystemTagObjectMapper
  451. *
  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 getSystemTagObjectMapper();
  456. /**
  457. * Returns the share manager
  458. *
  459. * @return \OCP\Share\IManager
  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 getShareManager();
  464. /**
  465. * @return IContentSecurityPolicyManager
  466. * @since 9.0.0
  467. * @deprecated 17.0.0 Use the AddContentSecurityPolicyEvent
  468. */
  469. public function getContentSecurityPolicyManager();
  470. /**
  471. * @return \OCP\IDateTimeZone
  472. * @since 8.0.0
  473. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  474. */
  475. public function getDateTimeZone();
  476. /**
  477. * @return \OCP\IDateTimeFormatter
  478. * @since 8.0.0
  479. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  480. */
  481. public function getDateTimeFormatter();
  482. /**
  483. * @return \OCP\Federation\ICloudIdManager
  484. * @since 12.0.0
  485. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  486. */
  487. public function getCloudIdManager();
  488. /**
  489. * @return \OCP\GlobalScale\IConfig
  490. * @since 14.0.0
  491. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  492. */
  493. public function getGlobalScaleConfig();
  494. /**
  495. * @return ICloudFederationFactory
  496. * @since 14.0.0
  497. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  498. */
  499. public function getCloudFederationFactory();
  500. /**
  501. * @return ICloudFederationProviderManager
  502. * @since 14.0.0
  503. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  504. */
  505. public function getCloudFederationProviderManager();
  506. /**
  507. * @return \OCP\Remote\Api\IApiFactory
  508. * @since 13.0.0
  509. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  510. */
  511. public function getRemoteApiFactory();
  512. /**
  513. * @return \OCP\Remote\IInstanceFactory
  514. * @since 13.0.0
  515. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  516. */
  517. public function getRemoteInstanceFactory();
  518. /**
  519. * @return \OCP\Files\Storage\IStorageFactory
  520. * @since 15.0.0
  521. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  522. */
  523. public function getStorageFactory();
  524. }