1
0

IPublicReferenceProvider.php 936 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\Collaboration\Reference;
  8. /**
  9. * @since 30.0.0
  10. */
  11. interface IPublicReferenceProvider extends IReferenceProvider {
  12. /**
  13. * Return a reference with its metadata for a given reference identifier and sharingToken
  14. *
  15. * @since 30.0.0
  16. */
  17. public function resolveReferencePublic(string $referenceText, string $sharingToken): ?IReference;
  18. /**
  19. * Return a custom cache key to be used for caching the metadata
  20. * This could be for example the current sharingToken if the reference
  21. * access permissions are different for each share
  22. *
  23. * Should return null, if the cache is only related to the
  24. * reference id and has no further dependency
  25. *
  26. * @since 30.0.0
  27. */
  28. public function getCacheKeyPublic(string $referenceId, string $sharingToken): ?string;
  29. }