imanager.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <?php
  2. /**
  3. * ownCloud
  4. *
  5. * @author Thomas Müller
  6. * @copyright 2013 Thomas Müller deepdiver@owncloud.com
  7. *
  8. * This library is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
  10. * License as published by the Free Software Foundation; either
  11. * version 3 of the License, or any later version.
  12. *
  13. * This library is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
  17. *
  18. * You should have received a copy of the GNU Affero General Public
  19. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. /**
  23. * Public interface of ownCloud for apps to use.
  24. * Activity/IManager interface
  25. */
  26. // use OCP namespace for all classes that are considered public.
  27. // This means that they should be used by apps instead of the internal ownCloud classes
  28. namespace OCP\Activity;
  29. interface IManager {
  30. /**
  31. * @param $app
  32. * @param $subject
  33. * @param $subjectParams
  34. * @param $message
  35. * @param $messageParams
  36. * @param $file
  37. * @param $link
  38. * @param $affectedUser
  39. * @param $type
  40. * @param $priority
  41. * @return mixed
  42. */
  43. function publishActivity($app, $subject, $subjectParams, $message, $messageParams, $file, $link, $affectedUser, $type, $priority);
  44. /**
  45. * In order to improve lazy loading a closure can be registered which will be called in case
  46. * activity consumers are actually requested
  47. *
  48. * $callable has to return an instance of \OCP\Activity\IConsumer
  49. *
  50. * @param \Closure $callable
  51. * @return void
  52. */
  53. function registerConsumer(\Closure $callable);
  54. /**
  55. * In order to improve lazy loading a closure can be registered which will be called in case
  56. * activity consumers are actually requested
  57. *
  58. * $callable has to return an instance of \OCP\Activity\IExtension
  59. *
  60. * @param \Closure $callable
  61. * @return void
  62. */
  63. function registerExtension(\Closure $callable);
  64. /**
  65. * Will return additional notification types as specified by other apps
  66. * @param string $languageCode
  67. * @return array
  68. */
  69. function getNotificationTypes($languageCode);
  70. /**
  71. * @param array $types
  72. * @param string $filter
  73. * @return array
  74. */
  75. function filterNotificationTypes($types, $filter);
  76. /**
  77. * @param string $method
  78. * @return array
  79. */
  80. function getDefaultTypes($method);
  81. /**
  82. * @param string $app
  83. * @param string $text
  84. * @param array $params
  85. * @param boolean $stripPath
  86. * @param boolean $highlightParams
  87. * @param string $languageCode
  88. * @return string|false
  89. */
  90. function translate($app, $text, $params, $stripPath, $highlightParams, $languageCode);
  91. /**
  92. * @param string $app
  93. * @param string $text
  94. * @return array|false
  95. */
  96. function getSpecialParameterList($app, $text);
  97. /**
  98. * @param string $type
  99. * @return string
  100. */
  101. function getTypeIcon($type);
  102. /**
  103. * @param array $activity
  104. * @return integer|false
  105. */
  106. function getGroupParameter($activity);
  107. /**
  108. * @return array
  109. */
  110. function getNavigation();
  111. /**
  112. * @param string $filterValue
  113. * @return boolean
  114. */
  115. function isFilterValid($filterValue);
  116. /**
  117. * @param string $filter
  118. * @return array
  119. */
  120. function getQueryForFilter($filter);
  121. }