IReference.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright Copyright (c) 2022 Julius Härtl <jus@bitgrid.net>
  5. *
  6. * @author Julius Härtl <jus@bitgrid.net>
  7. *
  8. * @license GNU AGPL version 3 or any later version
  9. *
  10. * This program is free software: you can redistribute it and/or modify
  11. * it under the terms of the GNU Affero General Public License as
  12. * published by the Free Software Foundation, either version 3 of the
  13. * License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Affero General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public License
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. */
  23. namespace OCP\Collaboration\Reference;
  24. use JsonSerializable;
  25. /**
  26. * @since 25.0.0
  27. */
  28. interface IReference extends JsonSerializable {
  29. /**
  30. * @since 25.0.0
  31. */
  32. public function getId(): string;
  33. /**
  34. * Accessible flag indicates if the user has access to the provided reference
  35. *
  36. * @since 25.0.0
  37. */
  38. public function setAccessible(bool $accessible): void;
  39. /**
  40. * Accessible flag indicates if the user has access to the provided reference
  41. *
  42. * @since 25.0.0
  43. */
  44. public function getAccessible(): bool;
  45. /**
  46. * @since 25.0.0
  47. */
  48. public function setTitle(string $title): void;
  49. /**
  50. * @since 25.0.0
  51. */
  52. public function getTitle(): string;
  53. /**
  54. * @since 25.0.0
  55. */
  56. public function setDescription(?string $description): void;
  57. /**
  58. * @since 25.0.0
  59. */
  60. public function getDescription(): ?string;
  61. /**
  62. * @since 25.0.0
  63. */
  64. public function setImageUrl(?string $imageUrl): void;
  65. /**
  66. * @since 25.0.0
  67. */
  68. public function getImageUrl(): ?string;
  69. /**
  70. * @since 25.0.0
  71. */
  72. public function setImageContentType(?string $contentType): void;
  73. /**
  74. * @since 25.0.0
  75. */
  76. public function getImageContentType(): ?string;
  77. /**
  78. * @since 25.0.0
  79. */
  80. public function setUrl(?string $url): void;
  81. /**
  82. * @since 25.0.0
  83. */
  84. public function getUrl(): string;
  85. /**
  86. * Set the reference specific rich object representation
  87. *
  88. * @since 25.0.0
  89. */
  90. public function setRichObject(string $type, ?array $richObject): void;
  91. /**
  92. * Returns the type of the reference specific rich object
  93. *
  94. * @since 25.0.0
  95. */
  96. public function getRichObjectType(): string;
  97. /**
  98. * Returns the reference specific rich object representation
  99. *
  100. * @since 25.0.0
  101. */
  102. public function getRichObject(): array;
  103. /**
  104. * Returns the opengraph rich object representation
  105. *
  106. * @since 25.0.0
  107. */
  108. public function getOpenGraphObject(): array;
  109. }