Interface URIProvider

All Known Implementing Classes:
BinaryDownloadUriProvider

@ProviderType public interface URIProvider
Provides a URI in exchange for a Resource. Typically the Resource will represent something where is a URI is valiable and usefull. Implementations of this interface must ensure that the any underlying security model is delegated securely and not circumvented. Typically resource provider bundles should implement this provider as in most cases internal implementation details of the resource will be required to achieve the implementation. Ideally implementations should be carefully reviewed by peers.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Defines which operation the URI may be used to perform.
    static enum 
    Defines the scope in which the URI may be used.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull URI
    toURI(@NotNull Resource resource, URIProvider.Scope scope, URIProvider.Operation operation)
    Return a URI applicable to the defined scope.
  • Method Details

    • toURI

      @NotNull @NotNull URI toURI(@NotNull @NotNull Resource resource, @NotNull URIProvider.Scope scope, @NotNull URIProvider.Operation operation)
      Return a URI applicable to the defined scope.
      Parameters:
      resource - the resource to convert from.
      scope - the required scope.
      operation - the required operation.
      Returns:
      a URI if the resource has a URI suitable for the requested scope and operation, otherwise the implementation should throw an IlleagalArgumentException.
      Throws:
      IllegalArgumentException - if a URI for the requested scope and operation cannot be provided to the caller.