You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

IIndexService.php 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * FullTextSearch - Full text search framework for Nextcloud
  5. *
  6. * This file is licensed under the Affero General Public License version 3 or
  7. * later. See the COPYING file.
  8. *
  9. * @author Maxence Lange <maxence@artificial-owl.com>
  10. * @copyright 2018, Maxence Lange <maxence@artificial-owl.com>
  11. * @license GNU AGPL version 3 or any later version
  12. *
  13. * This program is free software: you can redistribute it and/or modify
  14. * it under the terms of the GNU Affero General Public License as
  15. * published by the Free Software Foundation, either version 3 of the
  16. * License, or (at your option) any later version.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU Affero General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU Affero General Public License
  24. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  25. *
  26. */
  27. namespace OCP\FullTextSearch\Service;
  28. use OCP\FullTextSearch\Model\IIndex;
  29. /**
  30. * Interface IIndexService
  31. *
  32. * @since 15.0.0
  33. *
  34. * @package OCP\FullTextSearch\Service
  35. */
  36. interface IIndexService {
  37. /**
  38. * Retrieve an Index from the database, based on the Id of the Provider
  39. * and the Id of the Document
  40. *
  41. * @since 15.0.0
  42. *
  43. * @param string $providerId
  44. * @param string $documentId
  45. *
  46. * @return IIndex
  47. */
  48. public function getIndex(string $providerId, string $documentId): IIndex;
  49. /**
  50. * Update the status of an Index. status is a bit flag, setting $reset to
  51. * true will reset the status to the value defined in the parameter.
  52. *
  53. * @since 15.0.0
  54. *
  55. * @param string $providerId
  56. * @param string $documentId
  57. * @param int $status
  58. * @param bool $reset
  59. */
  60. public function updateIndexStatus(string $providerId, string $documentId, int $status, bool $reset = false);
  61. /**
  62. * Update the status of an array of Index. status is a bit flag, setting $reset to
  63. * true will reset the status to the value defined in the parameter.
  64. *
  65. * @since 15.0.0
  66. *
  67. * @param string $providerId
  68. * @param array $documentIds
  69. * @param int $status
  70. * @param bool $reset
  71. */
  72. public function updateIndexesStatus(string $providerId, array $documentIds, int $status, bool $reset = false);
  73. /**
  74. * Update an array of Index.
  75. *
  76. * @since 15.0.0
  77. *
  78. * @param array $indexes
  79. */
  80. public function updateIndexes(array $indexes);
  81. }