Interface URIProvider


  • @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.
    • Method Detail

      • toURI

        @NotNull
        @NotNull java.net.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:
        java.lang.IllegalArgumentException - if a URI for the requested scope and operation cannot be provided to the caller.